iwlwifi: mvm: inform mac80211 about umac scans that was aborted by restart
authorDavid Spinadel <david.spinadel@intel.com>
Tue, 10 Mar 2015 08:06:02 +0000 (10:06 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 26 Mar 2015 07:11:37 +0000 (09:11 +0200)
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>
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/ops.c
drivers/net/wireless/iwlwifi/mvm/scan.c

index 23c6c8af4a9f86684bec3fbb1e8f3733ff011bfb..02c02e2b097fd626f2907668d9ba089023fa28cd 100644 (file)
@@ -1149,6 +1149,7 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, bool force_upload,
 int iwl_mvm_scan_size(struct iwl_mvm *mvm);
 int iwl_mvm_cancel_scan(struct iwl_mvm *mvm);
 int iwl_mvm_max_scan_ie_len(struct iwl_mvm *mvm, bool is_sched_scan);
+void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm);
 
 /* Scheduled scan */
 int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
index 80121e41ca22f3aca2a09c59ba30016e9872caae..a28080ead54fb14bb9ee935f050db960b14151e9 100644 (file)
@@ -894,18 +894,7 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
         * the next start() call from mac80211. If restart isn't called
         * (no fw restart) scan status will stay busy.
         */
-       switch (mvm->scan_status) {
-       case IWL_MVM_SCAN_NONE:
-               break;
-       case IWL_MVM_SCAN_OS:
-               ieee80211_scan_completed(mvm->hw, true);
-               break;
-       case IWL_MVM_SCAN_SCHED:
-               /* Sched scan will be restarted by mac80211 in restart_hw. */
-               if (!mvm->restart_fw)
-                       ieee80211_sched_scan_stopped(mvm->hw);
-               break;
-       }
+       iwl_mvm_report_scan_aborted(mvm);
 
        /*
         * If we're restarting already, don't cycle restarts.
index a75bb150ea275ef18fd6449e8c1d5543fc466bf6..63525876f68a8936212cb68f446b083f06abd52d 100644 (file)
@@ -1613,3 +1613,35 @@ int iwl_mvm_scan_size(struct iwl_mvm *mvm)
                mvm->fw->ucode_capa.n_scan_channels +
                sizeof(struct iwl_scan_probe_req);
 }
+
+/*
+ * This function is used in nic restart flow, to inform mac80211 about scans
+ * that was aborted by restart flow or by an assert.
+ */
+void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
+{
+       if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN) {
+               if (iwl_mvm_find_scan_type(mvm, IWL_UMAC_SCAN_UID_REG_SCAN))
+                       ieee80211_scan_completed(mvm->hw, true);
+               if (iwl_mvm_find_scan_type(mvm, IWL_UMAC_SCAN_UID_SCHED_SCAN) &&
+                   !mvm->restart_fw)
+                       ieee80211_sched_scan_stopped(mvm->hw);
+       } else {
+               switch (mvm->scan_status) {
+               case IWL_MVM_SCAN_NONE:
+                       break;
+               case IWL_MVM_SCAN_OS:
+                       ieee80211_scan_completed(mvm->hw, true);
+                       break;
+               case IWL_MVM_SCAN_SCHED:
+                       /*
+                        * Sched scan will be restarted by mac80211 in
+                        * restart_hw, so do not report if FW is about to be
+                        * restarted.
+                        */
+                       if (!mvm->restart_fw)
+                               ieee80211_sched_scan_stopped(mvm->hw);
+                       break;
+               }
+       }
+}
This page took 0.03443 seconds and 5 git commands to generate.