Skip to content

Commit

Permalink
mac80211: Drop out of associated state if link is lost
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Wu authored and David S. Miller committed Dec 20, 2007
1 parent 4486c5f commit 2d192d9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions net/mac80211/ieee80211_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d192d9

Please sign in to comment.