aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-22 13:56:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-22 13:56:34 -0400
commit8d6fcbdb4e039544e3f60a909a0cd819f3f68ad9 (patch)
tree12a4673f9fd75bf1b3485031bf40f80e1a59fad5 /net
parent931cb03afed7b541392295f3afc4638da32f08a0 (diff)
parent88a9e31c506c00c8b7a2f1611406d0e38dcb33b3 (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 66e4fcdd1c6b..a4bb856de08f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1342,7 +1342,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1342 struct ieee80211_local *local = sdata->local; 1342 struct ieee80211_local *local = sdata->local;
1343 struct sta_info *sta; 1343 struct sta_info *sta;
1344 u32 changed = 0; 1344 u32 changed = 0;
1345 u8 bssid[ETH_ALEN];
1346 1345
1347 ASSERT_MGD_MTX(ifmgd); 1346 ASSERT_MGD_MTX(ifmgd);
1348 1347
@@ -1354,10 +1353,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1354 1353
1355 ieee80211_stop_poll(sdata); 1354 ieee80211_stop_poll(sdata);
1356 1355
1357 memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
1358
1359 ifmgd->associated = NULL; 1356 ifmgd->associated = NULL;
1360 memset(ifmgd->bssid, 0, ETH_ALEN);
1361 1357
1362 /* 1358 /*
1363 * we need to commit the associated = NULL change because the 1359 * we need to commit the associated = NULL change because the
@@ -1377,7 +1373,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1377 netif_carrier_off(sdata->dev); 1373 netif_carrier_off(sdata->dev);
1378 1374
1379 mutex_lock(&local->sta_mtx); 1375 mutex_lock(&local->sta_mtx);
1380 sta = sta_info_get(sdata, bssid); 1376 sta = sta_info_get(sdata, ifmgd->bssid);
1381 if (sta) { 1377 if (sta) {
1382 set_sta_flag(sta, WLAN_STA_BLOCK_BA); 1378 set_sta_flag(sta, WLAN_STA_BLOCK_BA);
1383 ieee80211_sta_tear_down_BA_sessions(sta, tx); 1379 ieee80211_sta_tear_down_BA_sessions(sta, tx);
@@ -1386,13 +1382,16 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1386 1382
1387 /* deauthenticate/disassociate now */ 1383 /* deauthenticate/disassociate now */
1388 if (tx || frame_buf) 1384 if (tx || frame_buf)
1389 ieee80211_send_deauth_disassoc(sdata, bssid, stype, reason, 1385 ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype,
1390 tx, frame_buf); 1386 reason, tx, frame_buf);
1391 1387
1392 /* flush out frame */ 1388 /* flush out frame */
1393 if (tx) 1389 if (tx)
1394 drv_flush(local, false); 1390 drv_flush(local, false);
1395 1391
1392 /* clear bssid only after building the needed mgmt frames */
1393 memset(ifmgd->bssid, 0, ETH_ALEN);
1394
1396 /* remove AP and TDLS peers */ 1395 /* remove AP and TDLS peers */
1397 sta_info_flush(local, sdata); 1396 sta_info_flush(local, sdata);
1398 1397