diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-06-29 12:07:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-29 12:07:37 -0400 |
commit | 42fb0b0278e6b9a44bee8adec051de5f43e10b2b (patch) | |
tree | f53513819d11445385346cf75be05054dae3438d /net/mac80211/mlme.c | |
parent | mwifiex: retrieve correct max_power information in reg_notifier handler (diff) | |
parent | mwifiex: fix memory leak associated with IE manamgement (diff) | |
download | linux-dev-42fb0b0278e6b9a44bee8adec051de5f43e10b2b.tar.xz linux-dev-42fb0b0278e6b9a44bee8adec051de5f43e10b2b.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f1a80da4e56a..e6fe84a08443 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1324,7 +1324,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, struct ieee80211_local *local = sdata->local; struct sta_info *sta; u32 changed = 0; - u8 bssid[ETH_ALEN]; ASSERT_MGD_MTX(ifmgd); @@ -1336,10 +1335,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, ieee80211_stop_poll(sdata); - memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); - ifmgd->associated = NULL; - memset(ifmgd->bssid, 0, ETH_ALEN); /* * we need to commit the associated = NULL change because the @@ -1359,7 +1355,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, netif_carrier_off(sdata->dev); mutex_lock(&local->sta_mtx); - sta = sta_info_get(sdata, bssid); + sta = sta_info_get(sdata, ifmgd->bssid); if (sta) { set_sta_flag(sta, WLAN_STA_BLOCK_BA); ieee80211_sta_tear_down_BA_sessions(sta, tx); @@ -1368,13 +1364,16 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, /* deauthenticate/disassociate now */ if (tx || frame_buf) - ieee80211_send_deauth_disassoc(sdata, bssid, stype, reason, - tx, frame_buf); + ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype, + reason, tx, frame_buf); /* flush out frame */ if (tx) drv_flush(local, false); + /* clear bssid only after building the needed mgmt frames */ + memset(ifmgd->bssid, 0, ETH_ALEN); + /* remove AP and TDLS peers */ sta_info_flush(local, sdata); |