Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2014 01:20:11 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264906 - head/sys/net80211
Message-ID:  <201404250120.s3P1KBAt043435@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404250120.s3P1KBAt043435>