aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/mlme.c15
-rw-r--r--net/mac80211/offchannel.c4
2 files changed, 11 insertions, 8 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
1373void ieee80211_beacon_connection_loss_work(struct work_struct *work) 1374void 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
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 13427b194ced..767d26b3f98b 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -211,8 +211,6 @@ static void ieee80211_hw_roc_start(struct work_struct *work)
211 return; 211 return;
212 } 212 }
213 213
214 ieee80211_recalc_idle(local);
215
216 if (local->hw_roc_skb) { 214 if (local->hw_roc_skb) {
217 sdata = IEEE80211_DEV_TO_SUB_IF(local->hw_roc_dev); 215 sdata = IEEE80211_DEV_TO_SUB_IF(local->hw_roc_dev);
218 ieee80211_tx_skb(sdata, local->hw_roc_skb); 216 ieee80211_tx_skb(sdata, local->hw_roc_skb);
@@ -226,6 +224,8 @@ static void ieee80211_hw_roc_start(struct work_struct *work)
226 GFP_KERNEL); 224 GFP_KERNEL);
227 } 225 }
228 226
227 ieee80211_recalc_idle(local);
228
229 mutex_unlock(&local->mtx); 229 mutex_unlock(&local->mtx);
230} 230}
231 231