diff options
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index f5c786ddc526..614d67810d05 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -2120,7 +2120,8 @@ int iwl_mvm_add_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
2120 | if (!iwl_mvm_is_dqa_supported(mvm)) | 2120 | if (!iwl_mvm_is_dqa_supported(mvm)) |
2121 | return 0; | 2121 | return 0; |
2122 | 2122 | ||
2123 | if (WARN_ON(vif->type != NL80211_IFTYPE_AP)) | 2123 | if (WARN_ON(vif->type != NL80211_IFTYPE_AP && |
2124 | vif->type != NL80211_IFTYPE_ADHOC)) | ||
2124 | return -ENOTSUPP; | 2125 | return -ENOTSUPP; |
2125 | 2126 | ||
2126 | /* | 2127 | /* |
@@ -2155,6 +2156,16 @@ int iwl_mvm_add_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
2155 | mvmvif->cab_queue = queue; | 2156 | mvmvif->cab_queue = queue; |
2156 | } else if (!fw_has_api(&mvm->fw->ucode_capa, | 2157 | } else if (!fw_has_api(&mvm->fw->ucode_capa, |
2157 | IWL_UCODE_TLV_API_STA_TYPE)) { | 2158 | IWL_UCODE_TLV_API_STA_TYPE)) { |
2159 | /* | ||
2160 | * In IBSS, ieee80211_check_queues() sets the cab_queue to be | ||
2161 | * invalid, so make sure we use the queue we want. | ||
2162 | * Note that this is done here as we want to avoid making DQA | ||
2163 | * changes in mac80211 layer. | ||
2164 | */ | ||
2165 | if (vif->type == NL80211_IFTYPE_ADHOC) { | ||
2166 | vif->cab_queue = IWL_MVM_DQA_GCAST_QUEUE; | ||
2167 | mvmvif->cab_queue = vif->cab_queue; | ||
2168 | } | ||
2158 | iwl_mvm_enable_txq(mvm, vif->cab_queue, vif->cab_queue, 0, | 2169 | iwl_mvm_enable_txq(mvm, vif->cab_queue, vif->cab_queue, 0, |
2159 | &cfg, timeout); | 2170 | &cfg, timeout); |
2160 | } | 2171 | } |
@@ -3321,18 +3332,15 @@ int iwl_mvm_remove_sta_key(struct iwl_mvm *mvm, | |||
3321 | 3332 | ||
3322 | /* Get the station from the mvm local station table */ | 3333 | /* Get the station from the mvm local station table */ |
3323 | mvm_sta = iwl_mvm_get_key_sta(mvm, vif, sta); | 3334 | mvm_sta = iwl_mvm_get_key_sta(mvm, vif, sta); |
3324 | if (!mvm_sta) { | 3335 | if (mvm_sta) |
3325 | IWL_ERR(mvm, "Failed to find station\n"); | 3336 | sta_id = mvm_sta->sta_id; |
3326 | return -EINVAL; | ||
3327 | } | ||
3328 | sta_id = mvm_sta->sta_id; | ||
3329 | 3337 | ||
3330 | IWL_DEBUG_WEP(mvm, "mvm remove dynamic key: idx=%d sta=%d\n", | 3338 | IWL_DEBUG_WEP(mvm, "mvm remove dynamic key: idx=%d sta=%d\n", |
3331 | keyconf->keyidx, sta_id); | 3339 | keyconf->keyidx, sta_id); |
3332 | 3340 | ||
3333 | if (keyconf->cipher == WLAN_CIPHER_SUITE_AES_CMAC || | 3341 | if (mvm_sta && (keyconf->cipher == WLAN_CIPHER_SUITE_AES_CMAC || |
3334 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 || | 3342 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 || |
3335 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256) | 3343 | keyconf->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256)) |
3336 | return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); | 3344 | return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); |
3337 | 3345 | ||
3338 | if (!__test_and_clear_bit(keyconf->hw_key_idx, mvm->fw_key_table)) { | 3346 | if (!__test_and_clear_bit(keyconf->hw_key_idx, mvm->fw_key_table)) { |