浏览代码

iwlwifi: mvm: set the encryption type of an IGTK key

The FW expect the driver to set the encryption algorithm type when
installing the IGTK key in the HW.
Currently when installing CMAC IGTK key we don't set the algorithm type
and as a result the FW fails to calculate the MIC of multicast management
frames.
Fix it.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Ayala Beker 9 年之前
父节点
当前提交
aa950524d5
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      drivers/net/wireless/intel/iwlwifi/mvm/sta.c

+ 8 - 0
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

@@ -1961,6 +1961,14 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm,
 		struct ieee80211_key_seq seq;
 		struct ieee80211_key_seq seq;
 		const u8 *pn;
 		const u8 *pn;
 
 
+		switch (keyconf->cipher) {
+		case WLAN_CIPHER_SUITE_AES_CMAC:
+			igtk_cmd.ctrl_flags |= cpu_to_le32(STA_KEY_FLG_CCM);
+			break;
+		default:
+			return -EINVAL;
+		}
+
 		memcpy(igtk_cmd.IGTK, keyconf->key, keyconf->keylen);
 		memcpy(igtk_cmd.IGTK, keyconf->key, keyconf->keylen);
 		ieee80211_get_key_rx_seq(keyconf, 0, &seq);
 		ieee80211_get_key_rx_seq(keyconf, 0, &seq);
 		pn = seq.aes_cmac.pn;
 		pn = seq.aes_cmac.pn;