LinuxKPI: 802.11: WEP noise

While we decided that we will not provide WEP support for the LinuxKPI
802.11 compat code, some of it is in there already (also because drivers
still support it).  Put proper keylen checks in place as net80211 only
knows about WEP while LinuxKPI has WEP40 and WEP104.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb
2025-06-05 11:11:49 +00:00
parent 29ddd58369
commit aaee0ed3d1
+7 -2
View File
@@ -1064,10 +1064,15 @@ lkpi_net80211_to_l80211_cipher_suite(uint32_t cipher, uint8_t keylen)
switch (cipher) {
case IEEE80211_CIPHER_WEP:
if (keylen < 8)
if (keylen == (40/NBBY))
return (WLAN_CIPHER_SUITE_WEP40);
else
else if (keylen == (104/NBBY))
return (WLAN_CIPHER_SUITE_WEP104);
else {
printf("%s: WEP with unsupported keylen %d\n",
__func__, keylen * NBBY);
return (0);
}
break;
case IEEE80211_CIPHER_TKIP:
return (WLAN_CIPHER_SUITE_TKIP);