From: Christian Lamparter <chunkeey@googlemail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Sean Patrick Santos" <quantheory@gmail.com>,
linux-wireless@vger.kernel.org, nbd@openwrt.org,
helmut.schaa@googlemail.com, mar.kolya@gmail.com,
"Per-Erik Westerberg" <per-erik.westerberg@bredband.net>,
"Mikołaj Kuligowski" <mikolaj.q@wp.pl>
Subject: Re: [RFC v2] mac80211: follow 802.11-2007 11.5.3 Error recovery upon HT BA failure
Date: Sat, 9 Jun 2012 14:14:41 +0200 [thread overview]
Message-ID: <201206091414.41940.chunkeey@googlemail.com> (raw)
In-Reply-To: <1339228767.4539.3.camel@jlt3.sipsolutions.net>
On Saturday 09 June 2012 09:59:27 Johannes Berg wrote:
> > introduced a TX BA session timeout timer. However the
> > timer was reset for each outgoing transmission instead
> > what 802.11-2007 11.5.3 specifies:
>
> You should probably reference 802.11-2012 now since some
> things were renumbered.
yeah, I should. But 802.11-2012 is not yet available for
free like the old 802.11-2007 through IEEE 802 Get.
> > "The inactivity timer at the originator is reset when a
> > BlockAck frame corresponding to the TID for which the
> > Block Ack policy is set is received."
>
> > This patch was only compile-tested and the design has
> > some rather big problems:
>
> Maybe then we should just revert Nikolay's patch?
(I was referring to this RFC patch and not his patch)
I don't think we can/should revert it, just change it
a bit so the timeout reset is triggered by a received
BA from the peer.
> > - The spec says we should test for BlockAcks, however
> > that is not feasible because it is a control frame
> > (so FIF_CONTROL might filter it on some hardware).
>
> In some way, all devices are going to have to report these
> frames. Maybe not as the frame itself, but as some other
> notification, to allow cleaning up the TX queues
> accordingly, I think? There's a BA notification in iwlwifi
> for example.
Alright, I guess this means that we probably need a new HW
feature flag like:
IEEE80211_HW_REPORTS_BA_NOTIFICATION
for hardware/firmware which filter BA frames, but have a BA
notification trap. And every other driver need to pass BA
to the stack where a new rx handler will update the last_tx
accordingly.
(yeah, that IEEE80211_HW_HAS_RATE_CONTROL vs. ACK_REPORT mix-up
was a stupid error - anyway here's the last updated version
of this approach - v3 will use IEEE80211_HW_REPORTS_BA_NOTIFICATION)
---
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 3bb24a1..fbe84a7 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -103,7 +103,7 @@ enum ieee80211_sta_info_flags {
* @dialog_token: dialog token for aggregation session
* @timeout: session timeout value to be filled in ADDBA requests
* @state: session state (see above)
- * @last_tx: jiffies of last tx activity
+ * @last_tx: jiffies of last successful tx activity
* @stop_initiator: initiator of a session stop
* @tx_stop: TX DelBA frame when stopping
* @buf_size: reorder buffer size at receiver
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 6b4f425..dfc61de 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -439,6 +439,28 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
}
}
+ if (ieee80211_is_data_qos(fc) && acked &&
+ info->flags & IEEE80211_TX_CTL_AMPDU &&
+ local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) {
+ struct tid_ampdu_tx *tid_tx;
+ u8 *qc;
+ u16 tid;
+
+ qc = ieee80211_get_qos_ctl(hdr);
+ tid = qc[0] & 0xf;
+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
+ if (tid_tx) {
+ /*
+ * 802.11-2007 11.5.3 Error recovery upon a peer failure
+ *
+ * The inactivity timer at the originator is reset when
+ * a BlockAck frame corresponding to the TID for which
+ * the Block Ack policy is set is received.
+ */
+ tid_tx->last_tx = jiffies;
+ }
+ }
+
if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) {
ieee80211_handle_filtered_frame(local, sta, skb);
rcu_read_unlock();
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index af25c4e..67887c5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1098,7 +1098,9 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
/* do nothing, let packet pass through */
} else if (test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) {
info->flags |= IEEE80211_TX_CTL_AMPDU;
- reset_agg_timer = true;
+ if (!(tx->local->hw.flags &
+ IEEE80211_HW_REPORTS_TX_ACK_STATUS))
+ reset_agg_timer = true;
} else {
queued = true;
info->control.vif = &tx->sdata->vif;
next prev parent reply other threads:[~2012-06-09 12:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 6:53 Sean Patrick Santos
2012-06-07 13:18 ` carl9170 issue Christian Lamparter
2012-06-07 19:31 ` Sean Patrick Santos
2012-06-08 7:57 ` Sean Patrick Santos
2012-06-09 0:18 ` BA session issue due to old BARs? Christian Lamparter
2012-06-09 1:11 ` [RFC] mac80211: follow 802.11-2007 11.5.3 Error recovery upon HT BA failure Christian Lamparter
2012-06-09 7:59 ` Johannes Berg
2012-06-09 12:14 ` Christian Lamparter [this message]
2012-06-09 12:28 ` [RFC v2] " Johannes Berg
2012-06-09 14:01 ` [RFC v3] " Christian Lamparter
2012-06-10 5:13 ` Emmanuel Grumbach
2012-06-10 12:20 ` Christian Lamparter
2012-06-10 18:55 ` Emmanuel Grumbach
2012-06-09 12:20 ` BA session issue due to old BARs? Helmut Schaa
2012-06-09 14:23 ` Christian Lamparter
2012-06-09 14:55 ` Felix Fietkau
2012-06-09 17:40 ` Christian Lamparter
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=201206091414.41940.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=helmut.schaa@googlemail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mar.kolya@gmail.com \
--cc=mikolaj.q@wp.pl \
--cc=nbd@openwrt.org \
--cc=per-erik.westerberg@bredband.net \
--cc=quantheory@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.