aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-10 04:21:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:28 -0400
commita93e364430de7f7a5f4eedd604ad1ab3d825dde5 (patch)
tree441f0f69dc5b08d79c5f5f4e7adae88ad18dbd86 /net/mac80211/iface.c
parentf955ebb44798e0058c987a0817810d2542e87349 (diff)
mac80211: change RX aggregation locking
To prepare for allowing drivers to sleep in ampdu_action, change the locking in the RX aggregation code to use a mutex, so that it would already allow drivers to sleep. But explicitly disable BHs around the callback for now since the TX part cannot yet sleep, and drivers' locking might require it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 9f00d3f174e4..490be2f3af27 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -740,7 +740,7 @@ static void ieee80211_iface_work(struct work_struct *work)
740 mgmt->u.action.category == WLAN_CATEGORY_BACK) { 740 mgmt->u.action.category == WLAN_CATEGORY_BACK) {
741 int len = skb->len; 741 int len = skb->len;
742 742
743 rcu_read_lock(); 743 mutex_lock(&local->sta_mtx);
744 sta = sta_info_get(sdata, mgmt->sa); 744 sta = sta_info_get(sdata, mgmt->sa);
745 if (sta) { 745 if (sta) {
746 switch (mgmt->u.action.u.addba_req.action_code) { 746 switch (mgmt->u.action.u.addba_req.action_code) {
@@ -761,7 +761,7 @@ static void ieee80211_iface_work(struct work_struct *work)
761 break; 761 break;
762 } 762 }
763 } 763 }
764 rcu_read_unlock(); 764 mutex_unlock(&local->sta_mtx);
765 } else if (ieee80211_is_data_qos(mgmt->frame_control)) { 765 } else if (ieee80211_is_data_qos(mgmt->frame_control)) {
766 struct ieee80211_hdr *hdr = (void *)mgmt; 766 struct ieee80211_hdr *hdr = (void *)mgmt;
767 /* 767 /*
@@ -781,7 +781,7 @@ static void ieee80211_iface_work(struct work_struct *work)
781 * a block-ack session was active. That cannot be 781 * a block-ack session was active. That cannot be
782 * right, so terminate the session. 782 * right, so terminate the session.
783 */ 783 */
784 rcu_read_lock(); 784 mutex_lock(&local->sta_mtx);
785 sta = sta_info_get(sdata, mgmt->sa); 785 sta = sta_info_get(sdata, mgmt->sa);
786 if (sta) { 786 if (sta) {
787 u16 tid = *ieee80211_get_qos_ctl(hdr) & 787 u16 tid = *ieee80211_get_qos_ctl(hdr) &
@@ -791,7 +791,7 @@ static void ieee80211_iface_work(struct work_struct *work)
791 sta, tid, WLAN_BACK_RECIPIENT, 791 sta, tid, WLAN_BACK_RECIPIENT,
792 WLAN_REASON_QSTA_REQUIRE_SETUP); 792 WLAN_REASON_QSTA_REQUIRE_SETUP);
793 } 793 }
794 rcu_read_unlock(); 794 mutex_unlock(&local->sta_mtx);
795 } else switch (sdata->vif.type) { 795 } else switch (sdata->vif.type) {
796 case NL80211_IFTYPE_STATION: 796 case NL80211_IFTYPE_STATION:
797 ieee80211_sta_rx_queued_mgmt(sdata, skb); 797 ieee80211_sta_rx_queued_mgmt(sdata, skb);