Skip to content

Commit b71d304

Browse files
Bjoern A. ZeebBjoern A. Zeeb
authored andcommitted
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
1 parent a6413bc commit b71d304

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

sys/compat/linuxkpi/common/src/linux_80211.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ SYSCTL_NODE(_compat_linuxkpi, OID_AUTO, 80211, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
107107
static bool lkpi_hwcrypto = false;
108108
SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, hw_crypto, CTLFLAG_RDTUN,
109109
&lkpi_hwcrypto, 0, "Enable LinuxKPI 802.11 hardware crypto offload");
110+
111+
static bool lkpi_hwcrypto_tkip = false;
112+
SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, tkip, CTLFLAG_RDTUN,
113+
&lkpi_hwcrypto_tkip, 0, "Enable LinuxKPI 802.11 TKIP crypto offload");
110114
#endif
111115

112116
/* Keep public for as long as header files are using it too. */
@@ -6085,8 +6089,13 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw)
60856089
hwciphers &= (IEEE80211_CRYPTO_WEP |
60866090
IEEE80211_CRYPTO_TKIP | IEEE80211_CRYPTO_TKIPMIC |
60876091
IEEE80211_CRYPTO_AES_CCM | IEEE80211_CRYPTO_AES_GCM_128);
6088-
/* We only support CCMP here, so further filter. */
6089-
hwciphers &= IEEE80211_CRYPTO_AES_CCM;
6092+
/*
6093+
* We only support CCMP here, so further filter.
6094+
* Also permit TKIP if turned on.
6095+
*/
6096+
hwciphers &= (IEEE80211_CRYPTO_AES_CCM |
6097+
(lkpi_hwcrypto_tkip ? (IEEE80211_CRYPTO_TKIP |
6098+
IEEE80211_CRYPTO_TKIPMIC) : 0));
60906099
ieee80211_set_hardware_ciphers(ic, hwciphers);
60916100
}
60926101
#endif

0 commit comments

Comments
 (0)