From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net
Subject: [PATCH v3 08/13] mac80211: check and refresh aggregation session in encap offload tx
Date: Fri, 21 Aug 2020 10:49:21 +0200 [thread overview]
Message-ID: <20200821084926.10650-9-nbd@nbd.name> (raw)
In-Reply-To: <20200821084926.10650-1-nbd@nbd.name>
Update the last_tx timestamp to avoid tearing down the aggregation session
early. Fall back to the slow path if the session setup is still running
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
net/mac80211/tx.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 04d8e528357b..64590ad930fe 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4198,6 +4198,8 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
bool authorized = false;
bool multicast;
unsigned char *ra = ehdr->h_dest;
+ struct tid_ampdu_tx *tid_tx;
+ u8 tid;
if (IS_ERR(sta) || (sta && !sta->uploaded))
sta = NULL;
@@ -4235,6 +4237,22 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
memset(info, 0, sizeof(*info));
+ if (sta) {
+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
+ if (tid_tx) {
+ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) {
+ /* fall back to non-offload slow path */
+ __ieee80211_subif_start_xmit(skb, dev, 0, 0, NULL);
+ return;
+ }
+
+ info->flags |= IEEE80211_TX_CTL_AMPDU;
+ if (tid_tx->timeout)
+ tid_tx->last_tx = jiffies;
+ }
+ }
+
if (unlikely(!multicast && skb->sk &&
skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS))
info->ack_frame_id = ieee80211_store_ack_skb(local, skb,
--
2.28.0
next prev parent reply other threads:[~2020-08-21 8:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 8:49 [PATCH v3 00/13] mac80211 encapsulation offload / performance patches Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 01/13] mac80211: rework tx encapsulation offload API Felix Fietkau
2020-08-27 12:42 ` Johannes Berg
2020-08-27 14:41 ` Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 02/13] mac80211: reduce duplication in tx status functions Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 03/13] mac80211: remove tx status call to ieee80211_sta_register_airtime Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 04/13] mac80211: optimize station connection monitor Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 05/13] mac80211: swap NEED_TXPROCESSING and HW_80211_ENCAP tx flags Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 06/13] mac80211: unify 802.3 (offload) and 802.11 tx status codepath Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 07/13] mac80211: add missing queue/hash initialization to 802.3 xmit Felix Fietkau
2020-08-21 8:49 ` Felix Fietkau [this message]
2020-08-21 8:49 ` [PATCH v3 09/13] mac80211: support using ieee80211_tx_status_ext to free skbs without status info Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 10/13] mac80211: extend ieee80211_tx_status_ext to support bulk free Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 11/13] mac80211: notify the driver when a sta uses 4-address mode Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 12/13] mac80211: skip encap offload for tx multicast/control packets Felix Fietkau
2020-08-21 8:49 ` [PATCH v3 13/13] mac80211: set info->control.hw_key for encap offload packets Felix Fietkau
2020-08-27 12:48 ` [PATCH v3 00/13] mac80211 encapsulation offload / performance patches 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=20200821084926.10650-9-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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