Search Linux Wireless

[PATCH 1/2] mac80211: use timeout from addba resp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  If other side sent us non zero timeout in addba response use it as a
timeout for TX session.

Signed-off-by: Nikolay Martynov <mar.kolya@xxxxxxxxx>
---
 net/mac80211/agg-tx.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 5eeac6d..e363120 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -761,12 +761,13 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
 				  size_t len)
 {
 	struct tid_ampdu_tx *tid_tx;
-	u16 capab, tid;
+	u16 capab, tid, timeout;
 	u8 buf_size;
 
 	capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
 	tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
 	buf_size = (capab & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK) >> 6;
+	timeout = le16_to_cpu(mgmt->u.action.u.addba_resp.timeout);
 
 	mutex_lock(&sta->ampdu_mlme.mtx);
 
@@ -802,6 +803,13 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
 
 		tid_tx->buf_size = buf_size;
 
+		/*
+		 * If other side sent us nonzero timeout - use it,
+		 * otherwise stick to our local value.
+		 */
+		if(timeout)
+			tid_tx->timeout = timeout;
+
 		if (test_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state))
 			ieee80211_agg_tx_operational(local, sta, tid);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux