Skip to content

Commit

Permalink
LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM
Browse files Browse the repository at this point in the history
In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites
to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we
accidentally returned the bit number instead of the shifted value
which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT,
which in turned lead to us trying to decode the frame again despite
HW had already done it.  This was found out of a discussion in D43634.

MFC after:	3 days
Reviewed by:	cc, adrian
Differential Revision: https://reviews.freebsd.org/D44208
  • Loading branch information
Bjoern A. Zeeb authored and Bjoern A. Zeeb committed Mar 12, 2024
1 parent f254aad commit 906521f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/compat/linuxkpi/common/src/linux_80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite)
case WLAN_CIPHER_SUITE_TKIP:
return (IEEE80211_CRYPTO_TKIP);
case WLAN_CIPHER_SUITE_CCMP:
return (IEEE80211_CIPHER_AES_CCM);
return (IEEE80211_CRYPTO_AES_CCM);
case WLAN_CIPHER_SUITE_WEP104:
return (IEEE80211_CRYPTO_WEP);
case WLAN_CIPHER_SUITE_AES_CMAC:
Expand Down

0 comments on commit 906521f

Please sign in to comment.