Commit d7131c04 authored by Bartosz Markowski's avatar Bartosz Markowski Committed by Kalle Valo

ath10k: fix PMF by using AES-CMAC/IGTK software crypto

While testing with older supplicant, .drv_set_key() was failing due to
higher than ath10k firmware could handle key_index (WMI_MAX_KEY_INDEX == 3).

--
wpa_driver_nl80211_set_key: ifindex=15 alg=4 addr=0x7f02b129fbe3 key_idx=4 set_tx=0 seq_len=6 key_len=16
    broadcast key
nl80211: set_key failed; err=-22 Invalid argument)
wlan0: WPA: Failed to configure IGTK to the driver
wlan0: RSN: Failed to configure IGTK
--

In order to fix this case (PMF: AES-CMAC/IGTK) force the AES_CMAC cipher to
be handled by software.
Signed-off-by: default avatarBartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent cc9904e6
...@@ -66,8 +66,8 @@ static int ath10k_send_key(struct ath10k_vif *arvif, ...@@ -66,8 +66,8 @@ static int ath10k_send_key(struct ath10k_vif *arvif,
arg.key_cipher = WMI_CIPHER_WEP; arg.key_cipher = WMI_CIPHER_WEP;
break; break;
case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_AES_CMAC:
/* this one needs to be done in software */ WARN_ON(1);
return 1; return -EINVAL;
default: default:
ath10k_warn(ar, "cipher %d is not supported\n", key->cipher); ath10k_warn(ar, "cipher %d is not supported\n", key->cipher);
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -4070,6 +4070,10 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -4070,6 +4070,10 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
int ret = 0; int ret = 0;
u32 flags = 0; u32 flags = 0;
/* this one needs to be done in software */
if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC)
return 1;
if (key->keyidx > WMI_MAX_KEY_INDEX) if (key->keyidx > WMI_MAX_KEY_INDEX)
return -ENOSPC; return -ENOSPC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment