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/agg-tx.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/agg-tx.c')
-rw-r--r-- | net/mac80211/agg-tx.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index eb9df22418f0..e0656d77b313 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -150,8 +150,7 @@ void ieee80211_assign_tid_tx(struct sta_info *sta, int tid, | |||
150 | } | 150 | } |
151 | 151 | ||
152 | int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | 152 | int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, |
153 | enum ieee80211_back_parties initiator, | 153 | enum ieee80211_agg_stop_reason reason) |
154 | bool tx) | ||
155 | { | 154 | { |
156 | struct ieee80211_local *local = sta->local; | 155 | struct ieee80211_local *local = sta->local; |
157 | struct tid_ampdu_tx *tid_tx; | 156 | struct tid_ampdu_tx *tid_tx; |
@@ -212,8 +211,10 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | |||
212 | */ | 211 | */ |
213 | synchronize_net(); | 212 | synchronize_net(); |
214 | 213 | ||
215 | tid_tx->stop_initiator = initiator; | 214 | tid_tx->stop_initiator = reason == AGG_STOP_PEER_REQUEST ? |
216 | tid_tx->tx_stop = tx; | 215 | WLAN_BACK_RECIPIENT : |
216 | WLAN_BACK_INITIATOR; | ||
217 | tid_tx->tx_stop = reason == AGG_STOP_LOCAL_REQUEST; | ||
217 | 218 | ||
218 | ret = drv_ampdu_action(local, sta->sdata, | 219 | ret = drv_ampdu_action(local, sta->sdata, |
219 | IEEE80211_AMPDU_TX_STOP, | 220 | IEEE80211_AMPDU_TX_STOP, |
@@ -660,14 +661,13 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, | |||
660 | EXPORT_SYMBOL(ieee80211_start_tx_ba_cb_irqsafe); | 661 | EXPORT_SYMBOL(ieee80211_start_tx_ba_cb_irqsafe); |
661 | 662 | ||
662 | int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | 663 | int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, |
663 | enum ieee80211_back_parties initiator, | 664 | enum ieee80211_agg_stop_reason reason) |
664 | bool tx) | ||
665 | { | 665 | { |
666 | int ret; | 666 | int ret; |
667 | 667 | ||
668 | mutex_lock(&sta->ampdu_mlme.mtx); | 668 | mutex_lock(&sta->ampdu_mlme.mtx); |
669 | 669 | ||
670 | ret = ___ieee80211_stop_tx_ba_session(sta, tid, initiator, tx); | 670 | ret = ___ieee80211_stop_tx_ba_session(sta, tid, reason); |
671 | 671 | ||
672 | mutex_unlock(&sta->ampdu_mlme.mtx); | 672 | mutex_unlock(&sta->ampdu_mlme.mtx); |
673 | 673 | ||
@@ -868,8 +868,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, | |||
868 | } | 868 | } |
869 | 869 | ||
870 | } else { | 870 | } else { |
871 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR, | 871 | ___ieee80211_stop_tx_ba_session(sta, tid, AGG_STOP_DECLINED); |
872 | false); | ||
873 | } | 872 | } |
874 | 873 | ||
875 | out: | 874 | out: |