git: cda79e505e21 - main - LinuxKPI: 802.11: set flag if frame should be part of an A-MPDU

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 05 Jun 2026 12:10:11 UTC
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=cda79e505e2120fe3b4c4f16cb18d92bf2e01e4e

commit cda79e505e2120fe3b4c4f16cb18d92bf2e01e4e
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-04-27 00:55:27 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-06-05 12:09:23 +0000

    LinuxKPI: 802.11: set flag if frame should be part of an A-MPDU
    
    In the output path where we are sending a frame to the driver mark it
    if it should be part of an A-MPDU based on its tid, type, and whether
    net80211 thinks that we are in the right state for this.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 11c37f9529de..c6dcae2bffff 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -5849,6 +5849,18 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m)
 		info->flags |= IEEE80211_TX_CTL_USE_MINRATE;	/* mt76 */
 	}
 	info->control.vif = vif;
+
+	if (tid != IEEE80211_NONQOS_TID) {
+		struct ieee80211_tx_ampdu *tap;
+
+		tap = &ni->ni_tx_ampdu[tid];
+		if (ieee80211_is_data_qos(hdr->frame_control) &&
+		    !ieee80211_is_qos_nullfunc(hdr->frame_control) &&
+		    !is_multicast_ether_addr(hdr->addr1) &&
+		    IEEE80211_AMPDU_RUNNING(tap))
+			info->flags |= IEEE80211_TX_CTL_AMPDU;
+	}
+
 	/* XXX-BZ info->control.rates */
 #ifdef __notyet__
 #ifdef LKPI_80211_HT