svn commit: r264906 - head/sys/net80211

Adrian Chadd adrian at FreeBSD.org
Fri Apr 25 01:20:11 UTC 2014


Author: adrian
Date: Fri Apr 25 01:20:10 2014
New Revision: 264906
URL: http://svnweb.freebsd.org/changeset/base/264906

Log:
  Add a SLEEP->SCAN transition.  Without this a disassociate or scan
  request during SLEEP results in a hang.
  
  Whilst I'm here, add in some disabled code that will transition to RUN
  if there's multicast traffic.  It's not needed for Atheros hardware but
  it may be for other hardware.
  
  Tested:
  
  * AR5416, STA mode (powersave)
  * AR5212, STA mode (powersave)

Modified:
  head/sys/net80211/ieee80211_sta.c

Modified: head/sys/net80211/ieee80211_sta.c
==============================================================================
--- head/sys/net80211/ieee80211_sta.c	Thu Apr 24 23:56:56 2014	(r264905)
+++ head/sys/net80211/ieee80211_sta.c	Fri Apr 25 01:20:10 2014	(r264906)
@@ -300,12 +300,18 @@ sta_newstate(struct ieee80211vap *vap, e
 			if (vap->iv_roaming == IEEE80211_ROAMING_AUTO)
 				ieee80211_check_scan_current(vap);
 			break;
+		case IEEE80211_S_SLEEP:		/* beacon miss */
+			/*
+			 * XXX if in sleep we need to wakeup the hardware.
+			 */
+			/* FALLTHROUGH */
 		case IEEE80211_S_RUN:		/* beacon miss */
 			/*
 			 * Beacon miss.  Notify user space and if not
 			 * under control of a user application (roaming
 			 * manual) kick off a scan to re-connect.
 			 */
+
 			ieee80211_sta_leave(ni);
 			if (vap->iv_roaming == IEEE80211_ROAMING_AUTO)
 				ieee80211_check_scan_current(vap);
@@ -1417,19 +1423,12 @@ sta_recv_mgmt(struct ieee80211_node *ni,
 				 * for the multicast bit being set.
 				 */
 #if 0
-				if ((tim->tim_bitctl & 1) ||
-				    (min <= ix && ix <= max &&
-				     isset(tim->tim_bitmap - min, aid))) {
-					/* 
-					 * XXX Do not let bg scan kick off
-					 * we are expecting data.
-					 */
+				if (tim->tim_bitctl & 1) {
 					ieee80211_sta_tim_notify(vap, 1);
 					ic->ic_lastdata = ticks;
-					// XXX not yet?
-//					vap->iv_sta_ps(vap, 0);
 				}
 #endif
+
 				ni->ni_dtim_count = tim->tim_count;
 				ni->ni_dtim_period = tim->tim_period;
 			}


More information about the svn-src-all mailing list