summaryrefslogtreecommitdiff
path: root/net/mac80211/ht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-10 12:21:48 +0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 23:39:28 +0400
commitcfcdbde35e2b621cf56bedc38a3a81e8c28addb9 (patch)
treecd0664681dc4629f7ce9a3319868eebb005060ff /net/mac80211/ht.c
parent83a5cbf73a13d0c8be019b22afec4407e4285aed (diff)
downloadlinux-cfcdbde35e2b621cf56bedc38a3a81e8c28addb9.tar.xz
mac80211: change TX aggregation locking
To prepare for allowing drivers to sleep in ampdu_action, change the locking in the TX aggregation code to use the mutex the RX part already uses. The spinlock is still necessary around some code to avoid races with TX, but now we can also synchronize_net() to avoid getting an inconsistent sequence number. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r--net/mac80211/ht.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index e29be64083c3..be928ef7ef51 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -6,7 +6,7 @@
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
- * Copyright 2007-2008, Intel Corporation
+ * Copyright 2007-2010, Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -136,11 +136,7 @@ void ieee80211_ba_session_work(struct work_struct *work)
___ieee80211_stop_rx_ba_session(
sta, tid, WLAN_BACK_RECIPIENT,
WLAN_REASON_QSTA_TIMEOUT);
- }
- mutex_unlock(&sta->ampdu_mlme.mtx);
- spin_lock_bh(&sta->lock);
- for (tid = 0; tid < STA_TID_NUM; tid++) {
tid_tx = sta->ampdu_mlme.tid_tx[tid];
if (!tid_tx)
continue;
@@ -152,7 +148,7 @@ void ieee80211_ba_session_work(struct work_struct *work)
___ieee80211_stop_tx_ba_session(sta, tid,
WLAN_BACK_INITIATOR);
}
- spin_unlock_bh(&sta->lock);
+ mutex_unlock(&sta->ampdu_mlme.mtx);
}
void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,