summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMichael Wu <flamingice@sourmilk.net>2007-11-10 06:15:25 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2007-12-20 01:43:45 +0100
commit2d192d9552881f4cf88e62072047c72ef2b5aa7f (patch)
tree6a2a972b9d38ccd5528ec83962c6e9252d22f3b9 /net
parentMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/... (diff)
downloadlinux-2d192d9552881f4cf88e62072047c72ef2b5aa7f.tar.xz
linux-2d192d9552881f4cf88e62072047c72ef2b5aa7f.zip
mac80211: Drop out of associated state if link is lost
There is no point in staying in IEEE80211_ASSOCIATED if there is no sta_info entry to receive frames with. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211_sta.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 16afd24d4f6b..bee8080f2249 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -808,12 +808,8 @@ static void ieee80211_associated(struct net_device *dev,
sta_info_put(sta);
}
if (disassoc) {
- union iwreq_data wrqu;
- memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
- wrqu.ap_addr.sa_family = ARPHRD_ETHER;
- wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
- mod_timer(&ifsta->timer, jiffies +
- IEEE80211_MONITORING_INTERVAL + 30 * HZ);
+ ifsta->state = IEEE80211_DISABLED;
+ ieee80211_set_associated(dev, ifsta, 0);
} else {
mod_timer(&ifsta->timer, jiffies +
IEEE80211_MONITORING_INTERVAL);