* [PATCH 0/2] mac80211: use timeout from addba resp
@ 2011-11-27 22:15 Nikolay Martynov
2011-11-27 22:15 ` [PATCH 1/2] " Nikolay Martynov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Nikolay Martynov @ 2011-11-27 22:15 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Nikolay Martynov
If other side sent us non zero timeout in addba response use it as a
timeout for TX session. Before this patch initiator and recipient
could have different timeouts if recipient decides to change timeout
offered by initiator.
This patchset also adds timeout information into agg_status sysfs file.
This should be applied after patches for "timeout tx agg sessions in
way similar to rx agg sessions".
All comments and suggestions are appreciated.
Thanks.
Nikolay Martynov (2):
mac80211: Use timeout from addba resp
mac80211: add session timeout to agg_status debugfs file
net/mac80211/agg-tx.c | 10 +++++++++-
net/mac80211/debugfs_sta.c | 9 +++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] mac80211: use timeout from addba resp
2011-11-27 22:15 [PATCH 0/2] mac80211: use timeout from addba resp Nikolay Martynov
@ 2011-11-27 22:15 ` Nikolay Martynov
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
2 siblings, 0 replies; 6+ messages in thread
From: Nikolay Martynov @ 2011-11-27 22:15 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Nikolay Martynov
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] mac80211: add session timeout to agg_status debugfs file
2011-11-27 22:15 [PATCH 0/2] mac80211: use timeout from addba resp Nikolay Martynov
2011-11-27 22:15 ` [PATCH 1/2] " Nikolay Martynov
@ 2011-11-27 22:15 ` Nikolay Martynov
2011-11-28 8:30 ` [PATCH 0/2] mac80211: use timeout from addba resp Johannes Berg
2 siblings, 0 replies; 6+ messages in thread
From: Nikolay Martynov @ 2011-11-27 22:15 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Nikolay Martynov
Add session timeout value for both rx and tx agg sessions to
agg_status debugfs file.
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
---
net/mac80211/debugfs_sta.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 2406b3e..c2a0063 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -154,24 +154,29 @@ static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
p += scnprintf(p, sizeof(buf) + buf - p, "next dialog_token: %#02x\n",
sta->ampdu_mlme.dialog_token_allocator + 1);
p += scnprintf(p, sizeof(buf) + buf - p,
- "TID\t\tRX active\tDTKN\tSSN\t\tTX\tDTKN\tpending\n");
+ "TID\t\tRX active\tDTKN\tSSN\ttimeout\t\t"
+ "TX active\tDTKN\tpending\ttimeout\n");
for (i = 0; i < STA_TID_NUM; i++) {
tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[i]);
tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[i]);
p += scnprintf(p, sizeof(buf) + buf - p, "%02d", i);
- p += scnprintf(p, sizeof(buf) + buf - p, "\t\t%x", !!tid_rx);
+ p += scnprintf(p, sizeof(buf) + buf - p, "\t\t\t%x", !!tid_rx);
p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.2x",
tid_rx ? tid_rx->dialog_token : 0);
p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.3x",
tid_rx ? tid_rx->ssn : 0);
+ p += scnprintf(p, sizeof(buf) + buf - p, "\t%d",
+ tid_rx ? tid_rx->timeout : 0);
p += scnprintf(p, sizeof(buf) + buf - p, "\t\t%x", !!tid_tx);
p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.2x",
tid_tx ? tid_tx->dialog_token : 0);
p += scnprintf(p, sizeof(buf) + buf - p, "\t%03d",
tid_tx ? skb_queue_len(&tid_tx->pending) : 0);
+ p += scnprintf(p, sizeof(buf) + buf - p, "\t%d",
+ tid_tx ? tid_tx->timeout : 0);
p += scnprintf(p, sizeof(buf) + buf - p, "\n");
}
rcu_read_unlock();
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] mac80211: use timeout from addba resp
2011-11-27 22:15 [PATCH 0/2] mac80211: use timeout from addba resp Nikolay Martynov
2011-11-27 22:15 ` [PATCH 1/2] " Nikolay Martynov
2011-11-27 22:15 ` [PATCH 2/2] mac80211: add session timeout to agg_status debugfs file Nikolay Martynov
@ 2011-11-28 8:30 ` Johannes Berg
2011-11-28 15:44 ` Nikolay Martynov
2 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2011-11-28 8:30 UTC (permalink / raw)
To: Nikolay Martynov; +Cc: linville, linux-wireless
On Sun, 2011-11-27 at 17:15 -0500, Nikolay Martynov wrote:
> If other side sent us non zero timeout in addba response use it as a
> timeout for TX session. Before this patch initiator and recipient
> could have different timeouts if recipient decides to change timeout
> offered by initiator.
I'm not convinced this is correct, can you say where the standard says
that we should take the recipient's timeout? The way I read it, the
originator informs the recipient of its timeout, not the other way
around, and we implement that in agg-rx.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] mac80211: use timeout from addba resp
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
0 siblings, 1 reply; 6+ messages in thread
From: Nikolay Martynov @ 2011-11-28 15:44 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, linux-wireless
Hi
2011/11/28 Johannes Berg <johannes@sipsolutions.net>:
> On Sun, 2011-11-27 at 17:15 -0500, Nikolay Martynov wrote:
>> If other side sent us non zero timeout in addba response use it as a
>> timeout for TX session. Before this patch initiator and recipient
>> could have different timeouts if recipient decides to change timeout
>> offered by initiator.
>
> I'm not convinced this is correct, can you say where the standard says
> that we should take the recipient's timeout? The way I read it, the
> originator informs the recipient of its timeout, not the other way
> around, and we implement that in agg-rx.
Sorry, about this. I just though that if addba resp contains timeout
then there should be some use of it. If this goes against standard
just disregard this patch.
BTW, is it possible to download a copy of the standard or is it
something I need to pay for/subscribe to?
Thanks!
--
Truthfully yours,
Martynov Nikolay.
Email: mar.kolya@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] mac80211: use timeout from addba resp
2011-11-28 15:44 ` Nikolay Martynov
@ 2011-11-28 15:54 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2011-11-28 15:54 UTC (permalink / raw)
To: Nikolay Martynov; +Cc: linville, linux-wireless
On Mon, 2011-11-28 at 10:44 -0500, Nikolay Martynov wrote:
> Sorry, about this. I just though that if addba resp contains timeout
> then there should be some use of it. If this goes against standard
> just disregard this patch.
Well, ok, I thought you checked and found we were doing it wrong :)
> BTW, is it possible to download a copy of the standard or is it
> something I need to pay for/subscribe to?
Google for getieee 802.11.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-28 15:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27 22:15 [PATCH 0/2] mac80211: use timeout from addba resp Nikolay Martynov
2011-11-27 22:15 ` [PATCH 1/2] " Nikolay Martynov
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
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).