Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2025 11:42:01 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9c29ee712c96 - stable/14 - LinuxKPI: 802.11: add tunable to enable TKIP
Message-ID:  <202504291142.53TBg1x7047543@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz:

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

commit 9c29ee712c969641de8c9f62c43b5bcc9b97d034
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-04-23 00:29:23 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-04-29 10:49:32 +0000

    LinuxKPI: 802.11: add tunable to enable TKIP
    
    On one hand TKIP support for other drivers or older iwlwifi chipsets
    likely needs more work (see mac80211.h), on the other hand we should
    no longer use TKIP (but we understand people still need to).
    
    Add a tunable to enable it for those who want to test it with modern
    iwlwifi chipsets.  hw_crypto also still needs to be enabled.
    
    I could only test it with legacy rates as none of my (non-FreeBSD)
    APs allowed me by default to use TKIP anymore (had to force it on)
    and then they would not let me associate with HT or VHT at all if
    TKIP was on.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit b71d3043c38acbde2fff7ed184a057d631e0d656)
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 4ac8856a09e5..3edbcb141dd8 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -107,6 +107,10 @@ SYSCTL_NODE(_compat_linuxkpi, OID_AUTO, 80211, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
 static bool lkpi_hwcrypto = false;
 SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, hw_crypto, CTLFLAG_RDTUN,
     &lkpi_hwcrypto, 0, "Enable LinuxKPI 802.11 hardware crypto offload");
+
+static bool lkpi_hwcrypto_tkip = false;
+SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, tkip, CTLFLAG_RDTUN,
+    &lkpi_hwcrypto_tkip, 0, "Enable LinuxKPI 802.11 TKIP crypto offload");
 #endif
 
 /* Keep public for as long as header files are using it too. */
@@ -6086,8 +6090,13 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw)
 		hwciphers &= (IEEE80211_CRYPTO_WEP |
 		    IEEE80211_CRYPTO_TKIP | IEEE80211_CRYPTO_TKIPMIC |
 		    IEEE80211_CRYPTO_AES_CCM | IEEE80211_CRYPTO_AES_GCM_128);
-		/* We only support CCMP here, so further filter. */
-		hwciphers &= IEEE80211_CRYPTO_AES_CCM;
+		/*
+		 * We only support CCMP here, so further filter.
+		 * Also permit TKIP if turned on.
+		 */
+		hwciphers &= (IEEE80211_CRYPTO_AES_CCM |
+		    (lkpi_hwcrypto_tkip ? (IEEE80211_CRYPTO_TKIP |
+		    IEEE80211_CRYPTO_TKIPMIC) : 0));
 		ieee80211_set_hardware_ciphers(ic, hwciphers);
 	}
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504291142.53TBg1x7047543>