aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-rx.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/agg-rx.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/agg-rx.c')
-rw-r--r--net/mac80211/agg-rx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index aa858a03951c..a843df26f384 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -6,7 +6,7 @@
6 * Copyright 2005-2006, Devicescape Software, Inc. 6 * Copyright 2005-2006, Devicescape Software, Inc.
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2007-2008, Intel Corporation 9 * Copyright 2007-2010, Intel Corporation
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as 12 * it under the terms of the GNU General Public License version 2 as
@@ -38,7 +38,7 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
38 struct ieee80211_local *local = sta->local; 38 struct ieee80211_local *local = sta->local;
39 struct tid_ampdu_rx *tid_rx; 39 struct tid_ampdu_rx *tid_rx;
40 40
41 lockdep_assert_held(&sta->lock); 41 lockdep_assert_held(&sta->ampdu_mlme.mtx);
42 42
43 tid_rx = sta->ampdu_mlme.tid_rx[tid]; 43 tid_rx = sta->ampdu_mlme.tid_rx[tid];
44 44
@@ -70,9 +70,9 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
70void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, 70void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
71 u16 initiator, u16 reason) 71 u16 initiator, u16 reason)
72{ 72{
73 spin_lock_bh(&sta->lock); 73 mutex_lock(&sta->ampdu_mlme.mtx);
74 ___ieee80211_stop_rx_ba_session(sta, tid, initiator, reason); 74 ___ieee80211_stop_rx_ba_session(sta, tid, initiator, reason);
75 spin_unlock_bh(&sta->lock); 75 mutex_unlock(&sta->ampdu_mlme.mtx);
76} 76}
77 77
78/* 78/*
@@ -205,7 +205,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
205 205
206 206
207 /* examine state machine */ 207 /* examine state machine */
208 spin_lock_bh(&sta->lock); 208 mutex_lock(&sta->ampdu_mlme.mtx);
209 209
210 if (sta->ampdu_mlme.tid_rx[tid]) { 210 if (sta->ampdu_mlme.tid_rx[tid]) {
211#ifdef CONFIG_MAC80211_HT_DEBUG 211#ifdef CONFIG_MAC80211_HT_DEBUG
@@ -279,7 +279,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
279 mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); 279 mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout));
280 280
281end: 281end:
282 spin_unlock_bh(&sta->lock); 282 mutex_unlock(&sta->ampdu_mlme.mtx);
283 283
284end_no_lock: 284end_no_lock:
285 ieee80211_send_addba_resp(sta->sdata, sta->sta.addr, tid, 285 ieee80211_send_addba_resp(sta->sdata, sta->sta.addr, tid,