kick the state machine when we receive failure notice from an ap (when
operating in sta mode); this speeds up the state machine, previously we were acting on a timeout
This commit is contained in:
parent
4fd1a57d92
commit
181181ac41
@ -908,10 +908,10 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh,
|
||||
if (ni != ic->ic_bss)
|
||||
ni->ni_fails++;
|
||||
ic->ic_stats.is_rx_auth_fail++;
|
||||
return;
|
||||
}
|
||||
ieee80211_new_state(ic, IEEE80211_S_ASSOC,
|
||||
wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
|
||||
ieee80211_new_state(ic, IEEE80211_S_SCAN, 0);
|
||||
} else
|
||||
ieee80211_new_state(ic, IEEE80211_S_ASSOC,
|
||||
wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1169,6 +1169,14 @@ ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh,
|
||||
ieee80211_send_error(ic, ni, wh->i_addr2,
|
||||
IEEE80211_FC0_SUBTYPE_AUTH,
|
||||
(seq + 1) | (estatus<<16));
|
||||
} else if (ic->ic_opmode == IEEE80211_M_STA) {
|
||||
/*
|
||||
* Kick the state machine. This short-circuits
|
||||
* using the mgt frame timeout to trigger the
|
||||
* state transition.
|
||||
*/
|
||||
if (ic->ic_state == IEEE80211_S_AUTH)
|
||||
ieee80211_new_state(ic, IEEE80211_S_SCAN, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2414,6 +2422,7 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
|
||||
if (ni != ic->ic_bss) /* XXX never true? */
|
||||
ni->ni_fails++;
|
||||
ic->ic_stats.is_rx_assoc_norate++;
|
||||
ieee80211_new_state(ic, IEEE80211_S_SCAN, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user