mac80211: use timeout from addba resp
cover mac80211: use timeout from addba resp
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(-)
Signature · 1 line
1.7.4.1
PATCH 1/2 mac80211: use timeout from addba resp
If other side sent us non zero timeout in addba response use it as a
timeout for TX session.
--- net/mac80211/agg-tx.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
net/mac80211/agg-tx.c +9 -1
@@ -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);
Signature · 1 line
1.7.4.1
PATCH 2/2 mac80211: add session timeout to agg_status debugfs file
In reply to Nikolay Martynov Add session timeout value for both rx and tx agg sessions toagg_status debugfs file.
--- net/mac80211/debugfs_sta.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
net/mac80211/debugfs_sta.c +7 -2
@@ -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 ();
Signature · 1 line
1.7.4.1
Johannes Berg
maintainerQuoted 4 lines · 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.
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
Hi
2011/11/28 Johannes Berg <[email protected]>:
Quoted 10 lines · Nikolay Martynov
Quoted 4 lines
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!
Signature · 3 lines
Truthfully yours, Martynov Nikolay. Email: [email protected]
Johannes Berg
maintainerQuoted 3 lines · Nikolay Martynov
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 :)
Quoted 2 lines
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