diff mbox series

[06/15] iwlwifi: mvm: Don't install CMAC/GMAC key in AP mode

Message ID iwlwifi.20200926002540.019a64e96d44.I609a995611ac5286e442cd54f764eaf4a7249ac0@changeid
State New
Headers show
Series [01/15] iwlwifi: dbg: remove IWL_FW_INI_TIME_POINT_WDG_TIMEOUT | expand

Commit Message

Luca Coelho Sept. 25, 2020, 9:30 p.m. UTC
From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

Due to a missing break, the management multicast key was installed even
though we don't really support it. Fix that, so mac80211 would know that
it should protect frames in software.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Luca Coelho Oct. 1, 2020, 6:58 p.m. UTC | #1
Luca Coelho <luca@coelho.fi> wrote:

> From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

> 

> Due to a missing break, the management multicast key was installed even

> though we don't really support it. Fix that, so mac80211 would know that

> it should protect frames in software.

> 

> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


10 patches applied to iwlwifi-next.git, thanks.

a1c2ff302413 iwlwifi: mvm: Don't install CMAC/GMAC key in AP mode
870bde78576c iwlwifi: mvm: add support for new version of WOWLAN_TKIP_SETTING_API_S
2b3eb122342c iwlwifi: mvm: process ba-notifications also when sta rcu is invalid
090a5d7c8b19 iwlwifi: don't export acpi functions unnecessarily
ee3ae3a18a74 iwlwifi: mvm: add support for new WOWLAN_TSC_RSC_PARAM version
cfa5d0ca0f61 iwlwifi: mvm: remove redundant support_umac_log field
59ca9572dee9 iwlwifi: mvm: use CHECKSUM_COMPLETE
f604324eefec iwlwifi: remove iwl_validate_sar_geo_profile() export
f961e9fc35cc iwlwifi: acpi: remove dummy definition of iwl_sar_set_profile()
38cb52dd4e86 iwlwifi: add new card for MA family
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 73280a2607a5..5e141eb47abc 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -3438,15 +3438,16 @@  static int __iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
 			 */
 			if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC ||
 			    key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 ||
-			    key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256)
+			    key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256) {
 				ret = -EOPNOTSUPP;
-			else
-				ret = 0;
+				break;
+			}
 
 			if (key->cipher != WLAN_CIPHER_SUITE_GCMP &&
 			    key->cipher != WLAN_CIPHER_SUITE_GCMP_256 &&
 			    !iwl_mvm_has_new_tx_api(mvm)) {
 				key->hw_key_idx = STA_KEY_IDX_INVALID;
+				ret = 0;
 				break;
 			}
 
@@ -3462,6 +3463,8 @@  static int __iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
 
 				if (i >= ARRAY_SIZE(mvmvif->ap_early_keys))
 					ret = -ENOSPC;
+				else
+					ret = 0;
 
 				break;
 			}