diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5174bfc5710d..2f9ed8b9c3f0 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -973,6 +973,14 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
973 | sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL | | 973 | sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL | |
974 | IEEE80211_STA_BEACON_POLL); | 974 | IEEE80211_STA_BEACON_POLL); |
975 | 975 | ||
976 | /* | ||
977 | * Always handle WMM once after association regardless | ||
978 | * of the first value the AP uses. Setting -1 here has | ||
979 | * that effect because the AP values is an unsigned | ||
980 | * 4-bit value. | ||
981 | */ | ||
982 | sdata->u.mgd.wmm_last_param_set = -1; | ||
983 | |||
976 | ieee80211_led_assoc(local, 1); | 984 | ieee80211_led_assoc(local, 1); |
977 | 985 | ||
978 | sdata->vif.bss_conf.assoc = 1; | 986 | sdata->vif.bss_conf.assoc = 1; |
@@ -1142,8 +1150,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1142 | 1150 | ||
1143 | ieee80211_set_wmm_default(sdata); | 1151 | ieee80211_set_wmm_default(sdata); |
1144 | 1152 | ||
1145 | ieee80211_recalc_idle(local); | ||
1146 | |||
1147 | /* channel(_type) changes are handled by ieee80211_hw_config */ | 1153 | /* channel(_type) changes are handled by ieee80211_hw_config */ |
1148 | local->oper_channel_type = NL80211_CHAN_NO_HT; | 1154 | local->oper_channel_type = NL80211_CHAN_NO_HT; |
1149 | 1155 | ||
@@ -1429,6 +1435,7 @@ ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | |||
1429 | 1435 | ||
1430 | if (!wk) { | 1436 | if (!wk) { |
1431 | ieee80211_set_disassoc(sdata, true); | 1437 | ieee80211_set_disassoc(sdata, true); |
1438 | ieee80211_recalc_idle(sdata->local); | ||
1432 | } else { | 1439 | } else { |
1433 | list_del(&wk->list); | 1440 | list_del(&wk->list); |
1434 | kfree(wk); | 1441 | kfree(wk); |
@@ -1462,6 +1469,7 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1462 | sdata->name, mgmt->sa, reason_code); | 1469 | sdata->name, mgmt->sa, reason_code); |
1463 | 1470 | ||
1464 | ieee80211_set_disassoc(sdata, false); | 1471 | ieee80211_set_disassoc(sdata, false); |
1472 | ieee80211_recalc_idle(sdata->local); | ||
1465 | return RX_MGMT_CFG80211_DISASSOC; | 1473 | return RX_MGMT_CFG80211_DISASSOC; |
1466 | } | 1474 | } |
1467 | 1475 | ||
@@ -2164,6 +2172,7 @@ static void ieee80211_sta_work(struct work_struct *work) | |||
2164 | " after %dms, disconnecting.\n", | 2172 | " after %dms, disconnecting.\n", |
2165 | bssid, (1000 * IEEE80211_PROBE_WAIT)/HZ); | 2173 | bssid, (1000 * IEEE80211_PROBE_WAIT)/HZ); |
2166 | ieee80211_set_disassoc(sdata, true); | 2174 | ieee80211_set_disassoc(sdata, true); |
2175 | ieee80211_recalc_idle(local); | ||
2167 | mutex_unlock(&ifmgd->mtx); | 2176 | mutex_unlock(&ifmgd->mtx); |
2168 | /* | 2177 | /* |
2169 | * must be outside lock due to cfg80211, | 2178 | * must be outside lock due to cfg80211, |
@@ -2612,6 +2621,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2612 | IEEE80211_STYPE_DEAUTH, req->reason_code, | 2621 | IEEE80211_STYPE_DEAUTH, req->reason_code, |
2613 | cookie); | 2622 | cookie); |
2614 | 2623 | ||
2624 | ieee80211_recalc_idle(sdata->local); | ||
2625 | |||
2615 | return 0; | 2626 | return 0; |
2616 | } | 2627 | } |
2617 | 2628 | ||
@@ -2644,5 +2655,8 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
2644 | ieee80211_send_deauth_disassoc(sdata, req->bss->bssid, | 2655 | ieee80211_send_deauth_disassoc(sdata, req->bss->bssid, |
2645 | IEEE80211_STYPE_DISASSOC, req->reason_code, | 2656 | IEEE80211_STYPE_DISASSOC, req->reason_code, |
2646 | cookie); | 2657 | cookie); |
2658 | |||
2659 | ieee80211_recalc_idle(sdata->local); | ||
2660 | |||
2647 | return 0; | 2661 | return 0; |
2648 | } | 2662 | } |