diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b25567a32f92..da17c3008782 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1357,9 +1357,6 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata) | |||
1357 | ieee80211_set_disassoc(sdata, true, true); | 1357 | ieee80211_set_disassoc(sdata, true, true); |
1358 | mutex_unlock(&ifmgd->mtx); | 1358 | mutex_unlock(&ifmgd->mtx); |
1359 | 1359 | ||
1360 | mutex_lock(&local->mtx); | ||
1361 | ieee80211_recalc_idle(local); | ||
1362 | mutex_unlock(&local->mtx); | ||
1363 | /* | 1360 | /* |
1364 | * must be outside lock due to cfg80211, | 1361 | * must be outside lock due to cfg80211, |
1365 | * but that's not a problem. | 1362 | * but that's not a problem. |
@@ -1368,6 +1365,10 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata) | |||
1368 | IEEE80211_STYPE_DEAUTH, | 1365 | IEEE80211_STYPE_DEAUTH, |
1369 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, | 1366 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, |
1370 | NULL, true); | 1367 | NULL, true); |
1368 | |||
1369 | mutex_lock(&local->mtx); | ||
1370 | ieee80211_recalc_idle(local); | ||
1371 | mutex_unlock(&local->mtx); | ||
1371 | } | 1372 | } |
1372 | 1373 | ||
1373 | void ieee80211_beacon_connection_loss_work(struct work_struct *work) | 1374 | void ieee80211_beacon_connection_loss_work(struct work_struct *work) |
@@ -2134,9 +2135,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, | |||
2134 | 2135 | ||
2135 | ieee80211_set_disassoc(sdata, true, true); | 2136 | ieee80211_set_disassoc(sdata, true, true); |
2136 | mutex_unlock(&ifmgd->mtx); | 2137 | mutex_unlock(&ifmgd->mtx); |
2137 | mutex_lock(&local->mtx); | ||
2138 | ieee80211_recalc_idle(local); | ||
2139 | mutex_unlock(&local->mtx); | ||
2140 | /* | 2138 | /* |
2141 | * must be outside lock due to cfg80211, | 2139 | * must be outside lock due to cfg80211, |
2142 | * but that's not a problem. | 2140 | * but that's not a problem. |
@@ -2144,6 +2142,11 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, | |||
2144 | ieee80211_send_deauth_disassoc(sdata, bssid, | 2142 | ieee80211_send_deauth_disassoc(sdata, bssid, |
2145 | IEEE80211_STYPE_DEAUTH, reason, | 2143 | IEEE80211_STYPE_DEAUTH, reason, |
2146 | NULL, true); | 2144 | NULL, true); |
2145 | |||
2146 | mutex_lock(&local->mtx); | ||
2147 | ieee80211_recalc_idle(local); | ||
2148 | mutex_unlock(&local->mtx); | ||
2149 | |||
2147 | mutex_lock(&ifmgd->mtx); | 2150 | mutex_lock(&ifmgd->mtx); |
2148 | } | 2151 | } |
2149 | 2152 | ||