diff options
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 498c315291cf..98d123dd7177 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. |
9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
11 | * Copyright(c) 2018 Intel Corporation | 11 | * Copyright(c) 2018 - 2019 Intel Corporation |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify | 13 | * This program is free software; you can redistribute it and/or modify |
14 | * it under the terms of version 2 of the GNU General Public License as | 14 | * it under the terms of version 2 of the GNU General Public License as |
@@ -31,7 +31,7 @@ | |||
31 | * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. | 31 | * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. |
32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
34 | * Copyright(c) 2018 Intel Corporation | 34 | * Copyright(c) 2018 - 2019 Intel Corporation |
35 | * All rights reserved. | 35 | * All rights reserved. |
36 | * | 36 | * |
37 | * Redistribution and use in source and binary forms, with or without | 37 | * Redistribution and use in source and binary forms, with or without |
@@ -1399,7 +1399,9 @@ void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk) | |||
1399 | 1399 | ||
1400 | iwl_mvm_sta_alloc_queue(mvm, txq->sta, txq->ac, tid); | 1400 | iwl_mvm_sta_alloc_queue(mvm, txq->sta, txq->ac, tid); |
1401 | list_del_init(&mvmtxq->list); | 1401 | list_del_init(&mvmtxq->list); |
1402 | local_bh_disable(); | ||
1402 | iwl_mvm_mac_itxq_xmit(mvm->hw, txq); | 1403 | iwl_mvm_mac_itxq_xmit(mvm->hw, txq); |
1404 | local_bh_enable(); | ||
1403 | } | 1405 | } |
1404 | 1406 | ||
1405 | mutex_unlock(&mvm->mutex); | 1407 | mutex_unlock(&mvm->mutex); |
@@ -2333,21 +2335,6 @@ int iwl_mvm_add_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
2333 | iwl_mvm_enable_txq(mvm, NULL, mvmvif->cab_queue, 0, &cfg, | 2335 | iwl_mvm_enable_txq(mvm, NULL, mvmvif->cab_queue, 0, &cfg, |
2334 | timeout); | 2336 | timeout); |
2335 | 2337 | ||
2336 | if (mvmvif->ap_wep_key) { | ||
2337 | u8 key_offset = iwl_mvm_set_fw_key_idx(mvm); | ||
2338 | |||
2339 | __set_bit(key_offset, mvm->fw_key_table); | ||
2340 | |||
2341 | if (key_offset == STA_KEY_IDX_INVALID) | ||
2342 | return -ENOSPC; | ||
2343 | |||
2344 | ret = iwl_mvm_send_sta_key(mvm, mvmvif->mcast_sta.sta_id, | ||
2345 | mvmvif->ap_wep_key, true, 0, NULL, 0, | ||
2346 | key_offset, 0); | ||
2347 | if (ret) | ||
2348 | return ret; | ||
2349 | } | ||
2350 | |||
2351 | return 0; | 2338 | return 0; |
2352 | } | 2339 | } |
2353 | 2340 | ||
@@ -2419,28 +2406,6 @@ int iwl_mvm_rm_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
2419 | 2406 | ||
2420 | iwl_mvm_disable_txq(mvm, NULL, mvmvif->cab_queue, 0, 0); | 2407 | iwl_mvm_disable_txq(mvm, NULL, mvmvif->cab_queue, 0, 0); |
2421 | 2408 | ||
2422 | if (mvmvif->ap_wep_key) { | ||
2423 | int i; | ||
2424 | |||
2425 | if (!__test_and_clear_bit(mvmvif->ap_wep_key->hw_key_idx, | ||
2426 | mvm->fw_key_table)) { | ||
2427 | IWL_ERR(mvm, "offset %d not used in fw key table.\n", | ||
2428 | mvmvif->ap_wep_key->hw_key_idx); | ||
2429 | return -ENOENT; | ||
2430 | } | ||
2431 | |||
2432 | /* track which key was deleted last */ | ||
2433 | for (i = 0; i < STA_KEY_MAX_NUM; i++) { | ||
2434 | if (mvm->fw_key_deleted[i] < U8_MAX) | ||
2435 | mvm->fw_key_deleted[i]++; | ||
2436 | } | ||
2437 | mvm->fw_key_deleted[mvmvif->ap_wep_key->hw_key_idx] = 0; | ||
2438 | ret = __iwl_mvm_remove_sta_key(mvm, mvmvif->mcast_sta.sta_id, | ||
2439 | mvmvif->ap_wep_key, true); | ||
2440 | if (ret) | ||
2441 | return ret; | ||
2442 | } | ||
2443 | |||
2444 | ret = iwl_mvm_rm_sta_common(mvm, mvmvif->mcast_sta.sta_id); | 2409 | ret = iwl_mvm_rm_sta_common(mvm, mvmvif->mcast_sta.sta_id); |
2445 | if (ret) | 2410 | if (ret) |
2446 | IWL_WARN(mvm, "Failed sending remove station\n"); | 2411 | IWL_WARN(mvm, "Failed sending remove station\n"); |