iwlwifi: mvm: generalize the other-scan stopping code
authorLuciano Coelho <luciano.coelho@intel.com>
Thu, 19 Mar 2015 20:58:33 +0000 (22:58 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 29 Apr 2015 10:12:48 +0000 (13:12 +0300)
commit507e4cda52581cb9e9fb130000f066f68686188f
treefce809a94896bfd619a94147164eb8de6ba2d1c9
parent4171bb3346dd8e9f3e996fd43271616181208285
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>
drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/scan.c