DHDAXCW-Rockchip-OpenWrt/package/kernel/mac80211/patches/subsys/315-mac80211-check-and-refresh-aggregation-session-in-en.patch
AmadeusGhost 86bc29e4a8
kernel: bump 5.4 to 5.4.68 (#5555)
[mac80211]
 ca5ee6e mac80211: Fix potential endless loop
 2c14710 mac80211: add more AQL fixes/improvements
 91fb3ce mac80211: remove an obsolete patch that is no longer doing anything useful
 acf1733 mac80211: add preliminary support for enabling 802.11ax in config
 d717343 mac80211: update encap offload patches to the latest version
 673062f mac80211: allow bigger A-MSDU sizes in VHT, even if HT is limited
 caf7277 mac80211: do not allow bigger VHT MPDUs than the hardware supports
 cd36c0d mac80211: select the first available channel for 5GHz interfaces
 1c6d456 mac80211: fix regression in station connection monitor optimization
 4bd7689 mac80211: update sta connection monitor regression fix

[target]
 Sync: at91, ath25, ath79, lantiq, mediatek, mvebu.
2020-10-03 00:36:16 +08:00

46 lines
1.3 KiB
Diff

From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 17 Aug 2020 21:11:25 +0200
Subject: [PATCH] mac80211: check and refresh aggregation session in
encap offload tx
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>
---
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4189,6 +4189,8 @@ static void ieee80211_8023_xmit(struct i
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;
@@ -4226,6 +4228,22 @@ static void ieee80211_8023_xmit(struct i
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,