diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-18 07:31:31 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 07:01:41 -0500 |
commit | c82c4a80bbb9c8ffa1d783070a8caa37f2db45b6 (patch) | |
tree | efafa9bdbba034bf4012dc4d2c727d7bd903fd28 /net/mac80211/ht.c | |
parent | d582cffbcd04eae0bd8a83b05648bfd54bfd21c9 (diff) |
mac80211: split aggregation stop by reason
The initiator/tx doesn't really identify why an
aggregation session is stopped, give a reason
for stopping that more clearly identifies what's
going on. This will help tell the driver clearly
what is expected of it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r-- | net/mac80211/ht.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 8a6d68f1f404..df46cd8e55f5 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -182,16 +182,19 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, | |||
182 | ieee80211_apply_htcap_overrides(sdata, ht_cap); | 182 | ieee80211_apply_htcap_overrides(sdata, ht_cap); |
183 | } | 183 | } |
184 | 184 | ||
185 | void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx) | 185 | void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, |
186 | enum ieee80211_agg_stop_reason reason) | ||
186 | { | 187 | { |
187 | int i; | 188 | int i; |
188 | 189 | ||
189 | cancel_work_sync(&sta->ampdu_mlme.work); | 190 | cancel_work_sync(&sta->ampdu_mlme.work); |
190 | 191 | ||
191 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) { | 192 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) { |
192 | __ieee80211_stop_tx_ba_session(sta, i, WLAN_BACK_INITIATOR, tx); | 193 | __ieee80211_stop_tx_ba_session(sta, i, reason); |
193 | __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, | 194 | __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, |
194 | WLAN_REASON_QSTA_LEAVE_QBSS, tx); | 195 | WLAN_REASON_QSTA_LEAVE_QBSS, |
196 | reason != AGG_STOP_DESTROY_STA && | ||
197 | reason != AGG_STOP_PEER_REQUEST); | ||
195 | } | 198 | } |
196 | } | 199 | } |
197 | 200 | ||
@@ -248,8 +251,7 @@ void ieee80211_ba_session_work(struct work_struct *work) | |||
248 | if (tid_tx && test_and_clear_bit(HT_AGG_STATE_WANT_STOP, | 251 | if (tid_tx && test_and_clear_bit(HT_AGG_STATE_WANT_STOP, |
249 | &tid_tx->state)) | 252 | &tid_tx->state)) |
250 | ___ieee80211_stop_tx_ba_session(sta, tid, | 253 | ___ieee80211_stop_tx_ba_session(sta, tid, |
251 | WLAN_BACK_INITIATOR, | 254 | AGG_STOP_LOCAL_REQUEST); |
252 | true); | ||
253 | } | 255 | } |
254 | mutex_unlock(&sta->ampdu_mlme.mtx); | 256 | mutex_unlock(&sta->ampdu_mlme.mtx); |
255 | } | 257 | } |
@@ -317,8 +319,7 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, | |||
317 | __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0, | 319 | __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0, |
318 | true); | 320 | true); |
319 | else | 321 | else |
320 | __ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, | 322 | __ieee80211_stop_tx_ba_session(sta, tid, AGG_STOP_PEER_REQUEST); |
321 | true); | ||
322 | } | 323 | } |
323 | 324 | ||
324 | int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, | 325 | int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, |