git: 0533923acf22 - main - LinuxKPI: 802.11: use IEEE80211_FEXT_AMPDU_OFFLOAD
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 02 Sep 2025 11:06:57 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=0533923acf22d4f308590b651aacd17441f4a9b8
commit 0533923acf22d4f308590b651aacd17441f4a9b8
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-04-14 18:27:28 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-09-02 11:04:28 +0000
LinuxKPI: 802.11: use IEEE80211_FEXT_AMPDU_OFFLOAD
Set IEEE80211_FEXT_AMPDU_OFFLOAD if the driver/firmware does AMPDU[-TX]
offload and net80211 should stay out of the way.
Later use IEEE80211_CONF_AMPDU_OFFLOAD() (the IEEE80211_FEXT_AMPDU_OFFLOAD
net80211 flag) rather than the LinuxKPI check to clear AMPDU-RX if we do
not support crypto offload. This may seem odd at first as AMPDU-RX is
mandatory but we would not be able to get anything working if we would
let net80211 do a (*ic_ampdu_rx_start)() call.
Some of this is neccessary until we have the code for all drivers (rtw8x
use further interfaces) sorted.
Sponsored by: The FreeBSD Foundation (originally)
MFC after: 3 days
Fixes: ac2c7271b7c26
---
sys/compat/linuxkpi/common/src/linux_80211.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 87390145a296..4cf9053f053b 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -4059,13 +4059,9 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
* Modern chipset/fw/drv will do A-MPDU in drv/fw and fail
* to do so if they cannot do the crypto too.
*/
- if (!lkpi_hwcrypto && ieee80211_hw_check(hw, AMPDU_AGGREGATION))
+ if (!lkpi_hwcrypto && IEEE80211_CONF_AMPDU_OFFLOAD(ic))
vap->iv_flags_ht &= ~IEEE80211_FHT_AMPDU_RX;
#endif
-#if defined(LKPI_80211_HT)
- /* 20250125-BZ Keep A-MPDU TX cleared until we sorted out AddBA for all drivers. */
- vap->iv_flags_ht &= ~IEEE80211_FHT_AMPDU_TX;
-#endif
if (hw->max_listen_interval == 0)
hw->max_listen_interval = 7 * (ic->ic_lintval / ic->ic_bintval);
@@ -6609,6 +6605,14 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw)
if (ieee80211_hw_check(hw, SUPPORTS_TX_FRAG))
ic->ic_flags_ext |= IEEE80211_FEXT_FRAG_OFFLOAD;
+ /* Does HW support full AMPDU[-TX] offload? */
+ if (ieee80211_hw_check(hw, AMPDU_AGGREGATION))
+ ic->ic_flags_ext |= IEEE80211_FEXT_AMPDU_OFFLOAD;
+#ifdef __notyet__
+ if (ieee80211_hw_check(hw, TX_AMSDU))
+ if (ieee80211_hw_check(hw, SUPPORTS_AMSDU_IN_AMPDU))
+#endif
+
/*
* The wiphy variables report bitmasks of avail antennas.
* (*get_antenna) get the current bitmask sets which can be