mac80211: fix probe response processing
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 24 Apr 2009 13:15:25 +0000 (15:15 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 May 2009 19:14:38 +0000 (15:14 -0400)
commit16cf438a1eca2b7206bd7ac7763637c2a87c00c6
tree2da715b1c9bb8ed4f828a340643d6bbc1a131e29
parentd91f190c412aff940a46cabaccf114361c133605
mac80211: fix probe response processing

Due to the use of a _REQ_DIRECT_PROBE bit, which is
unnecessary (and I wonder why it was done that way),
an interesting situation can arise:
 1) we try to probe an access point
 2) the AP doesn't response in time
 3) we tell userspace that we gave up
 4) the AP suddenly responds
 5) we auth/assoc with the AP

I've seen 4) happen in testing with hostapd SIGSTOPped,
and when SIGCONTinued it processes the probe requests
that came in and send responses. But 5) is not supposed
to happen after we tell everybody we've given up on the
AP.

To fix this, remove the _REQ_DIRECT_PROBE request bit,
and process probe responses when we're in the relevant
MLME state, namely IEEE80211_STA_MLME_DIRECT_PROBE.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c