diff options
| -rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index b280d5d87127..7554f7053830 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
| @@ -602,16 +602,6 @@ static int iwl_mvm_cancel_regular_scan(struct iwl_mvm *mvm) | |||
| 602 | SCAN_COMPLETE_NOTIFICATION }; | 602 | SCAN_COMPLETE_NOTIFICATION }; |
| 603 | int ret; | 603 | int ret; |
| 604 | 604 | ||
| 605 | if (mvm->scan_status == IWL_MVM_SCAN_NONE) | ||
| 606 | return 0; | ||
| 607 | |||
| 608 | if (iwl_mvm_is_radio_killed(mvm)) { | ||
| 609 | ieee80211_scan_completed(mvm->hw, true); | ||
| 610 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | ||
| 611 | mvm->scan_status = IWL_MVM_SCAN_NONE; | ||
| 612 | return 0; | ||
| 613 | } | ||
| 614 | |||
| 615 | iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort, | 605 | iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort, |
| 616 | scan_abort_notif, | 606 | scan_abort_notif, |
| 617 | ARRAY_SIZE(scan_abort_notif), | 607 | ARRAY_SIZE(scan_abort_notif), |
| @@ -1400,6 +1390,16 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm, | |||
| 1400 | 1390 | ||
| 1401 | int iwl_mvm_cancel_scan(struct iwl_mvm *mvm) | 1391 | int iwl_mvm_cancel_scan(struct iwl_mvm *mvm) |
| 1402 | { | 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 | |||
| 1403 | 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) |
| 1404 | return iwl_mvm_scan_offload_stop(mvm, true); | 1404 | return iwl_mvm_scan_offload_stop(mvm, true); |
| 1405 | return iwl_mvm_cancel_regular_scan(mvm); | 1405 | return iwl_mvm_cancel_regular_scan(mvm); |
