]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
mac80211: deauth before flushing STA information
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>
Tue, 10 Mar 2009 13:11:09 +0000 (10:11 -0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Mar 2009 22:09:39 +0000 (18:09 -0400)
commit1a28c78b46caec7628985728e7f0c4aef68e33e7
treeca2c3dc7e5bf426c579b4d363db769545a57865f
parentaf88b9078d4aa31d667d2d82601ede9cae3bac37
mac80211: deauth before flushing STA information

Even after commit "mac80211: deauth when interface is marked down"
(e327b847 on Linus tree), userspace still isn't notified when interface
goes down. There isn't a problem with this commit, but because of other
code changes it doesn't work on kernels >= 2.6.28 (works if same/similar
change applied on 2.6.27 for example).

The issue is as follows: after commit "mac80211: restructure disassoc/deauth
flows" in 2.6.28, the call to ieee80211_sta_deauthenticate added by
commit e327b847 will not work: because we do sta_info_flush(local, sdata)
inside ieee80211_stop (iface.c), all stations in interface are cleared, so
when calling ieee80211_sta_deauthenticate->ieee80211_set_disassoc (mlme.c),
inside ieee80211_set_disassoc we have this in the beginning:

         sta = sta_info_get(local, ifsta->bssid);
         if (!sta) {

The !sta check triggers, thus the function returns early and
ieee80211_sta_send_apinfo(sdata, ifsta) later isn't called, so
wpa_supplicant/userspace isn't notified with SIOCGIWAP.

This commit moves deauthentication to before flushing STA info
(sta_info_flush), thus the above can't happen and userspace is really
notified when interface goes down.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/iface.c