summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mvm.h
diff options
context:
space:
mode:
authorLuciano Coelho2015-03-19 21:58:33 +0100
committerEmmanuel Grumbach2015-04-29 12:12:48 +0200
commit507e4cda52581cb9e9fb130000f066f68686188f (patch)
treefce809a94896bfd619a94147164eb8de6ba2d1c9 /drivers/net/wireless/iwlwifi/mvm/mvm.h
parentiwlwifi: mvm: check if scan can be started before cancelling other scans (diff)
downloadkernel-qcow2-linux-507e4cda52581cb9e9fb130000f066f68686188f.tar.gz
kernel-qcow2-linux-507e4cda52581cb9e9fb130000f066f68686188f.tar.xz
kernel-qcow2-linux-507e4cda52581cb9e9fb130000f066f68686188f.zip
iwlwifi: mvm: generalize the other-scan stopping code
Instead of hardcoding the differences between UMAC scans and LMAC scans (which in this case is the number of simultaneous scans that can run), introduce a max_scans variable and stop scans of the other type (i.e. stop sched scan if regular scan is being attempted and vice-versa) if the number of running scans reached the maximum. Add a function that checks if the maximum number of scans was reached and stops the appropriate scan to make room for the new scan. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index a8648fabd45f..cb99eb7ca3bf 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -661,8 +661,11 @@ struct iwl_mvm {
void *scan_cmd;
struct iwl_mcast_filter_cmd *mcast_filter_cmd;
+ /* max number of simultaneous scans the FW supports */
+ unsigned int max_scans;
+
/* UMAC scan tracking */
- u32 scan_uid[IWL_MVM_MAX_SIMULTANEOUS_SCANS];
+ u32 scan_uid[IWL_MVM_MAX_UMAC_SCANS];
u8 scan_seq_num, sched_scan_seq_num;
/* rx chain antennas set through debugfs for the scan command */