2011-06-22 22:15:33

by Arik Nemtsov

[permalink] [raw]
Subject: [PATCH] mac80211: reestablish mis-configured existing Rx BA sessions

When forming a Rx BA session, sometimes the ADDBA response gets lost.
This leads to a situation where the session is configured locally, but
doesn't exist on the remote side. Subsequent ADDBA requests are declined
by mac80211.

Fix this by assuming the session state of the initiator is the correct
one. When receiving an unexpected ADDBA request on a TID with an active
Rx BA session, delete the existing one and establish a new session.

Signed-off-by: Arik Nemtsov <[email protected]>
---
net/mac80211/agg-rx.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 9c0d76c..f0a4d90 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -247,7 +247,11 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
"%pM on tid %u\n",
mgmt->sa, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */
- goto end;
+
+ /* delete existing Rx BA session on the same tid */
+ ___ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT,
+ WLAN_STATUS_UNSPECIFIED_QOS,
+ false);
}

/* prepare A-MPDU MLME for Rx aggregation */
--
1.7.4.1



2011-06-23 08:03:48

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: reestablish mis-configured existing Rx BA sessions

On Thu, 2011-06-23 at 01:15 +0300, Arik Nemtsov wrote:
> When forming a Rx BA session, sometimes the ADDBA response gets lost.
> This leads to a situation where the session is configured locally, but
> doesn't exist on the remote side. Subsequent ADDBA requests are declined
> by mac80211.
>
> Fix this by assuming the session state of the initiator is the correct
> one. When receiving an unexpected ADDBA request on a TID with an active
> Rx BA session, delete the existing one and establish a new session.

It all does seem a little strange, but we might as well do this.

Acked-by: Johannes Berg <[email protected]>