summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2016-07-10 21:02:20 +0300
committerKalle Valo <kvalo@codeaurora.org>2016-07-10 21:07:29 +0300
commit8a185006bce519738fe06350aa8d5195e9a1da62 (patch)
tree5b10f3cb75949f721cf3f91c2f8ddcc87c06aaae /drivers/net/wireless/intel/iwlwifi/mvm/sta.c
parent238ad2ddf34bb3cd13f0f86c0d1b112bf9ef43ac (diff)
parent034fdd4a17ff089c2428ece18efa65c5396810d2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git
This is to fix some conflicts in iwlwifi. Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c drivers/net/wireless/intel/iwlwifi/mvm/scan.c
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c16
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 61f16c3f4f10..3130b9c68a74 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -2310,12 +2310,18 @@ static struct iwl_mvm_sta *iwl_mvm_get_key_sta(struct iwl_mvm *mvm,
mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) {
u8 sta_id = mvmvif->ap_sta_id;
+ sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id],
+ lockdep_is_held(&mvm->mutex));
+
/*
* It is possible that the 'sta' parameter is NULL,
* for example when a GTK is removed - the sta_id will then
* be the AP ID, and no station was passed by mac80211.
*/
- return iwl_mvm_sta_from_staid_protected(mvm, sta_id);
+ if (IS_ERR_OR_NULL(sta))
+ return NULL;
+
+ return iwl_mvm_sta_from_mac80211(sta);
}
return NULL;
@@ -2420,6 +2426,14 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm,
struct ieee80211_key_seq seq;
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);
ieee80211_get_key_rx_seq(keyconf, 0, &seq);
pn = seq.aes_cmac.pn;