|
@@ -1103,8 +1103,11 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
|
|
printk(KERN_DEBUG "Connection to AP %pM lost.\n", bssid);
|
|
printk(KERN_DEBUG "Connection to AP %pM lost.\n", bssid);
|
|
|
|
|
|
ieee80211_set_disassoc(sdata, true);
|
|
ieee80211_set_disassoc(sdata, true);
|
|
- ieee80211_recalc_idle(local);
|
|
|
|
mutex_unlock(&ifmgd->mtx);
|
|
mutex_unlock(&ifmgd->mtx);
|
|
|
|
+
|
|
|
|
+ mutex_lock(&local->mtx);
|
|
|
|
+ ieee80211_recalc_idle(local);
|
|
|
|
+ mutex_unlock(&local->mtx);
|
|
/*
|
|
/*
|
|
* must be outside lock due to cfg80211,
|
|
* must be outside lock due to cfg80211,
|
|
* but that's not a problem.
|
|
* but that's not a problem.
|
|
@@ -1173,7 +1176,9 @@ ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
|
|
sdata->name, bssid, reason_code);
|
|
sdata->name, bssid, reason_code);
|
|
|
|
|
|
ieee80211_set_disassoc(sdata, true);
|
|
ieee80211_set_disassoc(sdata, true);
|
|
|
|
+ mutex_lock(&sdata->local->mtx);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
|
|
+ mutex_unlock(&sdata->local->mtx);
|
|
|
|
|
|
return RX_MGMT_CFG80211_DEAUTH;
|
|
return RX_MGMT_CFG80211_DEAUTH;
|
|
}
|
|
}
|
|
@@ -1203,7 +1208,9 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
|
|
sdata->name, mgmt->sa, reason_code);
|
|
sdata->name, mgmt->sa, reason_code);
|
|
|
|
|
|
ieee80211_set_disassoc(sdata, true);
|
|
ieee80211_set_disassoc(sdata, true);
|
|
|
|
+ mutex_lock(&sdata->local->mtx);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
|
|
+ mutex_unlock(&sdata->local->mtx);
|
|
return RX_MGMT_CFG80211_DISASSOC;
|
|
return RX_MGMT_CFG80211_DISASSOC;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1840,8 +1847,10 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
|
|
" after %dms, disconnecting.\n",
|
|
" after %dms, disconnecting.\n",
|
|
bssid, (1000 * IEEE80211_PROBE_WAIT)/HZ);
|
|
bssid, (1000 * IEEE80211_PROBE_WAIT)/HZ);
|
|
ieee80211_set_disassoc(sdata, true);
|
|
ieee80211_set_disassoc(sdata, true);
|
|
- ieee80211_recalc_idle(local);
|
|
|
|
mutex_unlock(&ifmgd->mtx);
|
|
mutex_unlock(&ifmgd->mtx);
|
|
|
|
+ mutex_lock(&local->mtx);
|
|
|
|
+ ieee80211_recalc_idle(local);
|
|
|
|
+ mutex_unlock(&local->mtx);
|
|
/*
|
|
/*
|
|
* must be outside lock due to cfg80211,
|
|
* must be outside lock due to cfg80211,
|
|
* but that's not a problem.
|
|
* but that's not a problem.
|
|
@@ -2319,7 +2328,9 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
|
|
if (assoc_bss)
|
|
if (assoc_bss)
|
|
sta_info_destroy_addr(sdata, bssid);
|
|
sta_info_destroy_addr(sdata, bssid);
|
|
|
|
|
|
|
|
+ mutex_lock(&sdata->local->mtx);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
|
|
+ mutex_unlock(&sdata->local->mtx);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -2357,7 +2368,9 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
|
|
cookie, !req->local_state_change);
|
|
cookie, !req->local_state_change);
|
|
sta_info_destroy_addr(sdata, bssid);
|
|
sta_info_destroy_addr(sdata, bssid);
|
|
|
|
|
|
|
|
+ mutex_lock(&sdata->local->mtx);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
ieee80211_recalc_idle(sdata->local);
|
|
|
|
+ mutex_unlock(&sdata->local->mtx);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|