aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2015-03-10 04:06:02 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-26 03:11:37 -0400
commit4ffb36505c0d4e0909aa1812b0269eb181a51390 (patch)
treed18fda4076c8604c8c5f42beff3c264c8f3ef937 /drivers/net/wireless
parent939e4904e09044f0446a5eccd2bb93090087d713 (diff)
iwlwifi: mvm: inform mac80211 about umac scans that was aborted by restart
In nic restart flow we inform mac80211 that scan was aborted, but it was based only on scan_status which is not set by UMAC scan. Fix that. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/ops.c13
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c32
3 files changed, 34 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 23c6c8af4a9f..02c02e2b097f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -1149,6 +1149,7 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, bool force_upload,
1149int iwl_mvm_scan_size(struct iwl_mvm *mvm); 1149int iwl_mvm_scan_size(struct iwl_mvm *mvm);
1150int iwl_mvm_cancel_scan(struct iwl_mvm *mvm); 1150int iwl_mvm_cancel_scan(struct iwl_mvm *mvm);
1151int iwl_mvm_max_scan_ie_len(struct iwl_mvm *mvm, bool is_sched_scan); 1151int iwl_mvm_max_scan_ie_len(struct iwl_mvm *mvm, bool is_sched_scan);
1152void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm);
1152 1153
1153/* Scheduled scan */ 1154/* Scheduled scan */
1154int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm, 1155int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index 80121e41ca22..a28080ead54f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -894,18 +894,7 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
894 * the next start() call from mac80211. If restart isn't called 894 * the next start() call from mac80211. If restart isn't called
895 * (no fw restart) scan status will stay busy. 895 * (no fw restart) scan status will stay busy.
896 */ 896 */
897 switch (mvm->scan_status) { 897 iwl_mvm_report_scan_aborted(mvm);
898 case IWL_MVM_SCAN_NONE:
899 break;
900 case IWL_MVM_SCAN_OS:
901 ieee80211_scan_completed(mvm->hw, true);
902 break;
903 case IWL_MVM_SCAN_SCHED:
904 /* Sched scan will be restarted by mac80211 in restart_hw. */
905 if (!mvm->restart_fw)
906 ieee80211_sched_scan_stopped(mvm->hw);
907 break;
908 }
909 898
910 /* 899 /*
911 * If we're restarting already, don't cycle restarts. 900 * If we're restarting already, don't cycle restarts.
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index a75bb150ea27..63525876f68a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -1613,3 +1613,35 @@ int iwl_mvm_scan_size(struct iwl_mvm *mvm)
1613 mvm->fw->ucode_capa.n_scan_channels + 1613 mvm->fw->ucode_capa.n_scan_channels +
1614 sizeof(struct iwl_scan_probe_req); 1614 sizeof(struct iwl_scan_probe_req);
1615} 1615}
1616
1617/*
1618 * This function is used in nic restart flow, to inform mac80211 about scans
1619 * that was aborted by restart flow or by an assert.
1620 */
1621void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
1622{
1623 if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN) {
1624 if (iwl_mvm_find_scan_type(mvm, IWL_UMAC_SCAN_UID_REG_SCAN))
1625 ieee80211_scan_completed(mvm->hw, true);
1626 if (iwl_mvm_find_scan_type(mvm, IWL_UMAC_SCAN_UID_SCHED_SCAN) &&
1627 !mvm->restart_fw)
1628 ieee80211_sched_scan_stopped(mvm->hw);
1629 } else {
1630 switch (mvm->scan_status) {
1631 case IWL_MVM_SCAN_NONE:
1632 break;
1633 case IWL_MVM_SCAN_OS:
1634 ieee80211_scan_completed(mvm->hw, true);
1635 break;
1636 case IWL_MVM_SCAN_SCHED:
1637 /*
1638 * Sched scan will be restarted by mac80211 in
1639 * restart_hw, so do not report if FW is about to be
1640 * restarted.
1641 */
1642 if (!mvm->restart_fw)
1643 ieee80211_sched_scan_stopped(mvm->hw);
1644 break;
1645 }
1646 }
1647}