aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 2db01e9541e7..f0d3b483dabd 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -822,10 +822,13 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
822 * until the aggregation stop completes. Refer 822 * until the aggregation stop completes. Refer
823 * http://thread.gmane.org/gmane.linux.kernel.wireless.general/81936 823 * http://thread.gmane.org/gmane.linux.kernel.wireless.general/81936
824 */ 824 */
825
826 mutex_lock(&sta->ampdu_mlme.mtx);
827
825 for (i = 0; i < STA_TID_NUM; i++) { 828 for (i = 0; i < STA_TID_NUM; i++) {
826 if (!sta->ampdu_mlme.tid_tx[i]) 829 tid_tx = rcu_dereference_protected_tid_tx(sta, i);
830 if (!tid_tx)
827 continue; 831 continue;
828 tid_tx = sta->ampdu_mlme.tid_tx[i];
829 if (skb_queue_len(&tid_tx->pending)) { 832 if (skb_queue_len(&tid_tx->pending)) {
830#ifdef CONFIG_MAC80211_HT_DEBUG 833#ifdef CONFIG_MAC80211_HT_DEBUG
831 wiphy_debug(local->hw.wiphy, "TX A-MPDU purging %d " 834 wiphy_debug(local->hw.wiphy, "TX A-MPDU purging %d "
@@ -837,6 +840,8 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
837 kfree_rcu(tid_tx, rcu_head); 840 kfree_rcu(tid_tx, rcu_head);
838 } 841 }
839 842
843 mutex_unlock(&sta->ampdu_mlme.mtx);
844
840 sta_info_free(local, sta); 845 sta_info_free(local, sta);
841 846
842 return 0; 847 return 0;
@@ -941,6 +946,9 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
941 946
942 mutex_lock(&local->sta_mtx); 947 mutex_lock(&local->sta_mtx);
943 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) 948 list_for_each_entry_safe(sta, tmp, &local->sta_list, list)
949 if (sdata != sta->sdata)
950 continue;
951
944 if (time_after(jiffies, sta->last_rx + exp_time)) { 952 if (time_after(jiffies, sta->last_rx + exp_time)) {
945#ifdef CONFIG_MAC80211_IBSS_DEBUG 953#ifdef CONFIG_MAC80211_IBSS_DEBUG
946 printk(KERN_DEBUG "%s: expiring inactive STA %pM\n", 954 printk(KERN_DEBUG "%s: expiring inactive STA %pM\n",