git: b71d3043c38a - main - LinuxKPI: 802.11: add tunable to enable TKIP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Apr 2025 16:25:26 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b71d3043c38acbde2fff7ed184a057d631e0d656 commit b71d3043c38acbde2fff7ed184a057d631e0d656 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-23 16:24:21 +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 MFC after: 3 days --- 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 6f9fda2e2234..5b2950338456 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. */ @@ -6085,8 +6089,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