linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Martynov <mar.kolya@gmail.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, Nikolay Martynov <mar.kolya@gmail.com>
Subject: [PATCH 1/2] mac80211: use timeout from addba resp
Date: Sun, 27 Nov 2011 17:15:52 -0500	[thread overview]
Message-ID: <1322432153-17425-2-git-send-email-mar.kolya@gmail.com> (raw)
In-Reply-To: <1322432153-17425-1-git-send-email-mar.kolya@gmail.com>

  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@gmail.com>
---
 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


  reply	other threads:[~2011-11-27 22:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-27 22:15 [PATCH 0/2] mac80211: use timeout from addba resp Nikolay Martynov
2011-11-27 22:15 ` Nikolay Martynov [this message]
2011-11-27 22:15 ` [PATCH 2/2] mac80211: add session timeout to agg_status debugfs file Nikolay Martynov
2011-11-28  8:30 ` [PATCH 0/2] mac80211: use timeout from addba resp Johannes Berg
2011-11-28 15:44   ` Nikolay Martynov
2011-11-28 15:54     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322432153-17425-2-git-send-email-mar.kolya@gmail.com \
    --to=mar.kolya@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).