diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/d3.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 85ae902df7c0..29ae58ebf223 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -309,9 +309,9 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw, | |||
309 | * to transmit packets to the AP, i.e. the PTK. | 309 | * to transmit packets to the AP, i.e. the PTK. |
310 | */ | 310 | */ |
311 | if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) { | 311 | if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) { |
312 | key->hw_key_idx = 0; | ||
313 | mvm->ptk_ivlen = key->iv_len; | 312 | mvm->ptk_ivlen = key->iv_len; |
314 | mvm->ptk_icvlen = key->icv_len; | 313 | mvm->ptk_icvlen = key->icv_len; |
314 | ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, 0); | ||
315 | } else { | 315 | } else { |
316 | /* | 316 | /* |
317 | * firmware only supports TSC/RSC for a single key, | 317 | * firmware only supports TSC/RSC for a single key, |
@@ -319,12 +319,11 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw, | |||
319 | * with new ones -- this relies on mac80211 doing | 319 | * with new ones -- this relies on mac80211 doing |
320 | * list_add_tail(). | 320 | * list_add_tail(). |
321 | */ | 321 | */ |
322 | key->hw_key_idx = 1; | ||
323 | mvm->gtk_ivlen = key->iv_len; | 322 | mvm->gtk_ivlen = key->iv_len; |
324 | mvm->gtk_icvlen = key->icv_len; | 323 | mvm->gtk_icvlen = key->icv_len; |
324 | ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, 1); | ||
325 | } | 325 | } |
326 | 326 | ||
327 | ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, true); | ||
328 | data->error = ret != 0; | 327 | data->error = ret != 0; |
329 | out_unlock: | 328 | out_unlock: |
330 | mutex_unlock(&mvm->mutex); | 329 | mutex_unlock(&mvm->mutex); |
@@ -772,9 +771,6 @@ static int iwl_mvm_switch_to_d3(struct iwl_mvm *mvm) | |||
772 | */ | 771 | */ |
773 | set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status); | 772 | set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status); |
774 | 773 | ||
775 | /* We reprogram keys and shouldn't allocate new key indices */ | ||
776 | memset(mvm->fw_key_table, 0, sizeof(mvm->fw_key_table)); | ||
777 | |||
778 | mvm->ptk_ivlen = 0; | 774 | mvm->ptk_ivlen = 0; |
779 | mvm->ptk_icvlen = 0; | 775 | mvm->ptk_icvlen = 0; |
780 | mvm->ptk_ivlen = 0; | 776 | mvm->ptk_ivlen = 0; |