aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-29 05:09:16 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-29 15:30:30 -0500
commitdd318575ff0aae91ac4cbcc5b60c184e59267212 (patch)
tree140a0104b99b8edef7b961b4de9182e092782cf9 /net/mac80211/sta_info.h
parent8b7f8532d15631776ce8bec2bbbc58f6aad738d1 (diff)
mac80211: fix RX aggregation locking
The RX aggregation locking documentation was wrong, which led Christian to also code the timer timeout handling for it somewhat wrongly. Fix the documentation, the two places that need to hold the reorder lock across accesses to the structure, and the debugfs code that should just use RCU. Also, remove acquiring the sta->lock across reorder timeouts since it isn't necessary, and change a few places to GFP_KERNEL because the code path here doesn't need atomic allocations as I noticed when reviewing all this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index b562d9b6a702..05f11302443b 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -81,13 +81,14 @@ enum ieee80211_sta_info_flags {
81 * @stop_initiator: initiator of a session stop 81 * @stop_initiator: initiator of a session stop
82 * @tx_stop: TX DelBA frame when stopping 82 * @tx_stop: TX DelBA frame when stopping
83 * 83 *
84 * This structure is protected by RCU and the per-station 84 * This structure's lifetime is managed by RCU, assignments to
85 * spinlock. Assignments to the array holding it must hold 85 * the array holding it must hold the aggregation mutex.
86 * the spinlock, only the TX path can access it under RCU 86 *
87 * lock-free if, and only if, the state has the flag 87 * The TX path can access it under RCU lock-free if, and
88 * %HT_AGG_STATE_OPERATIONAL set. Otherwise, the TX path 88 * only if, the state has the flag %HT_AGG_STATE_OPERATIONAL
89 * must also acquire the spinlock and re-check the state, 89 * set. Otherwise, the TX path must also acquire the spinlock
90 * see comments in the tx code touching it. 90 * and re-check the state, see comments in the tx code
91 * touching it.
91 */ 92 */
92struct tid_ampdu_tx { 93struct tid_ampdu_tx {
93 struct rcu_head rcu_head; 94 struct rcu_head rcu_head;
@@ -115,15 +116,13 @@ struct tid_ampdu_tx {
115 * @rcu_head: RCU head used for freeing this struct 116 * @rcu_head: RCU head used for freeing this struct
116 * @reorder_lock: serializes access to reorder buffer, see below. 117 * @reorder_lock: serializes access to reorder buffer, see below.
117 * 118 *
118 * This structure is protected by RCU and the per-station 119 * This structure's lifetime is managed by RCU, assignments to
119 * spinlock. Assignments to the array holding it must hold 120 * the array holding it must hold the aggregation mutex.
120 * the spinlock.
121 * 121 *
122 * The @reorder_lock is used to protect the variables and 122 * The @reorder_lock is used to protect the members of this
123 * arrays such as @reorder_buf, @reorder_time, @head_seq_num, 123 * struct, except for @timeout, @buf_size and @dialog_token,
124 * @stored_mpdu_num and @reorder_time from being corrupted by 124 * which are constant across the lifetime of the struct (the
125 * concurrent access of the RX path and the expired frame 125 * dialog token being used only for debugging).
126 * release timer.
127 */ 126 */
128struct tid_ampdu_rx { 127struct tid_ampdu_rx {
129 struct rcu_head rcu_head; 128 struct rcu_head rcu_head;