aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-10 04:21:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:27 -0400
commit67c282c00c9c06733aae229662d209957f6d23a7 (patch)
tree698270941e46c873e2c34fda0428ea457cd1926b /net/mac80211/ht.c
parent0ab337032a0dfcd5f2527d3306d3deeba5f95b59 (diff)
mac80211: move BA session work
Move the block-ack session works into common code, since it will be needed for RX agg too in the next patches. 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.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 4dfba7808a24..531a19d358df 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -114,6 +114,38 @@ void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta)
114 } 114 }
115} 115}
116 116
117void ieee80211_ba_session_work(struct work_struct *work)
118{
119 struct sta_info *sta =
120 container_of(work, struct sta_info, ampdu_mlme.work);
121 struct tid_ampdu_tx *tid_tx;
122 int tid;
123
124 /*
125 * When this flag is set, new sessions should be
126 * blocked, and existing sessions will be torn
127 * down by the code that set the flag, so this
128 * need not run.
129 */
130 if (test_sta_flags(sta, WLAN_STA_BLOCK_BA))
131 return;
132
133 spin_lock_bh(&sta->lock);
134 for (tid = 0; tid < STA_TID_NUM; tid++) {
135 tid_tx = sta->ampdu_mlme.tid_tx[tid];
136 if (!tid_tx)
137 continue;
138
139 if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state))
140 ieee80211_tx_ba_session_handle_start(sta, tid);
141 else if (test_and_clear_bit(HT_AGG_STATE_WANT_STOP,
142 &tid_tx->state))
143 ___ieee80211_stop_tx_ba_session(sta, tid,
144 WLAN_BACK_INITIATOR);
145 }
146 spin_unlock_bh(&sta->lock);
147}
148
117void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, 149void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
118 const u8 *da, u16 tid, 150 const u8 *da, u16 tid,
119 u16 initiator, u16 reason_code) 151 u16 initiator, u16 reason_code)