summaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-tx.c
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2014-11-19 06:47:38 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 12:45:36 -0500
commitb6da911b3cf1d342f2f7123c9eb6463d299bca4e (patch)
tree7e90aaf36e8149ca731e4d8589d9d18556de933b /net/mac80211/agg-tx.c
parent4f9610d528a6aa5642fa350fa93fbd905a753ae8 (diff)
mac80211: synchronously reserve TID per station
In TDLS (e.g., TDLS off-channel) there is a requirement for some drivers to supply an unused TID between the AP and the device to the FW, to allow sending PTI requests and to allow the FW to aggregate on a specific TID for better throughput. To ensure that the allocated TID is indeed unused, this patch introduces an API for blocking the driver from TXing on that TID. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/agg-tx.c')
-rw-r--r--net/mac80211/agg-tx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 9242c60048cf..a360c15cc978 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -509,6 +509,10 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
509 struct tid_ampdu_tx *tid_tx; 509 struct tid_ampdu_tx *tid_tx;
510 int ret = 0; 510 int ret = 0;
511 511
512 if (WARN(sta->reserved_tid == tid,
513 "Requested to start BA session on reserved tid=%d", tid))
514 return -EINVAL;
515
512 trace_api_start_tx_ba_session(pubsta, tid); 516 trace_api_start_tx_ba_session(pubsta, tid);
513 517
514 if (WARN_ON_ONCE(!local->ops->ampdu_action)) 518 if (WARN_ON_ONCE(!local->ops->ampdu_action))
@@ -765,6 +769,9 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
765 goto unlock; 769 goto unlock;
766 } 770 }
767 771
772 WARN(sta->reserved_tid == tid,
773 "Requested to stop BA session on reserved tid=%d", tid);
774
768 if (test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { 775 if (test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) {
769 /* already in progress stopping it */ 776 /* already in progress stopping it */
770 ret = 0; 777 ret = 0;