diff options
author | sam <sam@FreeBSD.org> | 2005-06-10 01:47:28 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-06-10 01:47:28 +0000 |
commit | 6bac24f11af33730d7fa70a59d4b6e1ba54eee1c (patch) | |
tree | dfcfc0f79e28ef53be7126a4f80b0df0b75016b1 /sys/net80211/ieee80211_input.c | |
parent | 78c35576deb4e0fc2079b10c5d793bab28fcc371 (diff) | |
download | FreeBSD-src-6bac24f11af33730d7fa70a59d4b6e1ba54eee1c.zip FreeBSD-src-6bac24f11af33730d7fa70a59d4b6e1ba54eee1c.tar.gz |
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
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 265642d..f2295ee 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -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 @@ bad: 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; } |