diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index cb85e63c20aa..7554f7053830 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
@@ -459,7 +459,8 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm, | |||
459 | basic_ssid ? 1 : 0); | 459 | basic_ssid ? 1 : 0); |
460 | 460 | ||
461 | cmd->tx_cmd.tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | | 461 | cmd->tx_cmd.tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | |
462 | TX_CMD_FLG_BT_DIS); | 462 | 3 << TX_CMD_FLG_BT_PRIO_POS); |
463 | |||
463 | cmd->tx_cmd.sta_id = mvm->aux_sta.sta_id; | 464 | cmd->tx_cmd.sta_id = mvm->aux_sta.sta_id; |
464 | cmd->tx_cmd.life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); | 465 | cmd->tx_cmd.life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); |
465 | cmd->tx_cmd.rate_n_flags = | 466 | cmd->tx_cmd.rate_n_flags = |
@@ -601,16 +602,6 @@ static int iwl_mvm_cancel_regular_scan(struct iwl_mvm *mvm) | |||
601 | SCAN_COMPLETE_NOTIFICATION }; | 602 | SCAN_COMPLETE_NOTIFICATION }; |
602 | int ret; | 603 | int ret; |
603 | 604 | ||
604 | if (mvm->scan_status == IWL_MVM_SCAN_NONE) | ||
605 | return 0; | ||
606 | |||
607 | if (iwl_mvm_is_radio_killed(mvm)) { | ||
608 | ieee80211_scan_completed(mvm->hw, true); | ||
609 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | ||
610 | mvm->scan_status = IWL_MVM_SCAN_NONE; | ||
611 | return 0; | ||
612 | } | ||
613 | |||
614 | iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort, | 605 | iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort, |
615 | scan_abort_notif, | 606 | scan_abort_notif, |
616 | ARRAY_SIZE(scan_abort_notif), | 607 | ARRAY_SIZE(scan_abort_notif), |
@@ -1399,6 +1390,16 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm, | |||
1399 | 1390 | ||
1400 | int iwl_mvm_cancel_scan(struct iwl_mvm *mvm) | 1391 | int iwl_mvm_cancel_scan(struct iwl_mvm *mvm) |
1401 | { | 1392 | { |
1393 | if (mvm->scan_status == IWL_MVM_SCAN_NONE) | ||
1394 | return 0; | ||
1395 | |||
1396 | if (iwl_mvm_is_radio_killed(mvm)) { | ||
1397 | ieee80211_scan_completed(mvm->hw, true); | ||
1398 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | ||
1399 | mvm->scan_status = IWL_MVM_SCAN_NONE; | ||
1400 | return 0; | ||
1401 | } | ||
1402 | |||
1402 | if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_LMAC_SCAN) | 1403 | if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_LMAC_SCAN) |
1403 | return iwl_mvm_scan_offload_stop(mvm, true); | 1404 | return iwl_mvm_scan_offload_stop(mvm, true); |
1404 | return iwl_mvm_cancel_regular_scan(mvm); | 1405 | return iwl_mvm_cancel_regular_scan(mvm); |