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)
This commit is contained in:
parent
0cfee0c223
commit
f3b04ec629
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264906
@ -300,12 +300,18 @@ sta_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
|
||||
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, struct mbuf *m0,
|
||||
* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user