diff options
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index fea4d3437e2f..b23ab4a4504f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -1852,12 +1852,18 @@ static struct iwl_mvm_sta *iwl_mvm_get_key_sta(struct iwl_mvm *mvm, | |||
1852 | mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) { | 1852 | mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) { |
1853 | u8 sta_id = mvmvif->ap_sta_id; | 1853 | u8 sta_id = mvmvif->ap_sta_id; |
1854 | 1854 | ||
1855 | sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id], | ||
1856 | lockdep_is_held(&mvm->mutex)); | ||
1857 | |||
1855 | /* | 1858 | /* |
1856 | * It is possible that the 'sta' parameter is NULL, | 1859 | * It is possible that the 'sta' parameter is NULL, |
1857 | * for example when a GTK is removed - the sta_id will then | 1860 | * for example when a GTK is removed - the sta_id will then |
1858 | * be the AP ID, and no station was passed by mac80211. | 1861 | * be the AP ID, and no station was passed by mac80211. |
1859 | */ | 1862 | */ |
1860 | return iwl_mvm_sta_from_staid_protected(mvm, sta_id); | 1863 | if (IS_ERR_OR_NULL(sta)) |
1864 | return NULL; | ||
1865 | |||
1866 | return iwl_mvm_sta_from_mac80211(sta); | ||
1861 | } | 1867 | } |
1862 | 1868 | ||
1863 | return NULL; | 1869 | return NULL; |
@@ -1955,6 +1961,14 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm, | |||
1955 | struct ieee80211_key_seq seq; | 1961 | struct ieee80211_key_seq seq; |
1956 | const u8 *pn; | 1962 | const u8 *pn; |
1957 | 1963 | ||
1964 | switch (keyconf->cipher) { | ||
1965 | case WLAN_CIPHER_SUITE_AES_CMAC: | ||
1966 | igtk_cmd.ctrl_flags |= cpu_to_le32(STA_KEY_FLG_CCM); | ||
1967 | break; | ||
1968 | default: | ||
1969 | return -EINVAL; | ||
1970 | } | ||
1971 | |||
1958 | memcpy(igtk_cmd.IGTK, keyconf->key, keyconf->keylen); | 1972 | memcpy(igtk_cmd.IGTK, keyconf->key, keyconf->keylen); |
1959 | ieee80211_get_key_rx_seq(keyconf, 0, &seq); | 1973 | ieee80211_get_key_rx_seq(keyconf, 0, &seq); |
1960 | pn = seq.aes_cmac.pn; | 1974 | pn = seq.aes_cmac.pn; |