summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/scan.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2015-03-20 16:11:28 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-29 13:12:48 +0300
commit19945dfb94fafe50d9e6d1b1d0884c9ec7e3c84c (patch)
treeee617f00884052b227b56b0363c30f3b7a69d312 /drivers/net/wireless/iwlwifi/mvm/scan.c
parent6749dd80bb335f1bf9b214a0dc44943f0b5044ca (diff)
downloadblackbird-obmc-linux-19945dfb94fafe50d9e6d1b1d0884c9ec7e3c84c.tar.gz
blackbird-obmc-linux-19945dfb94fafe50d9e6d1b1d0884c9ec7e3c84c.zip
iwlwifi: mvm: differentiate net-detect from sched scan
Net-detect scans were using the same type as sched scan, which was causing the driver to return -EBUSY and prevent the system from suspending if there was an ongoing scheduled scan. To avoid this, add a new type for net-detect and don't stop anything when it is requested, so that the existing scheduled scan will be resumed when the system wakes up. 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/scan.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 3fe398ec56fd..e39f2d12965f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -1533,6 +1533,13 @@ static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type)
if (mvm->scan_status & IWL_MVM_SCAN_SCHED_MASK)
return -EBUSY;
return iwl_mvm_cancel_scan(mvm);
+ case IWL_MVM_SCAN_NETDETECT:
+ /* No need to stop anything for net-detect since the
+ * firmware is restarted anyway. This way, any sched
+ * scans that were running will be restarted when we
+ * resume.
+ */
+ return 0;
default:
WARN_ON(1);
break;
@@ -1574,7 +1581,8 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
struct ieee80211_vif *vif,
struct cfg80211_sched_scan_request *req,
- struct ieee80211_scan_ies *ies)
+ struct ieee80211_scan_ies *ies,
+ int type)
{
int ret;
@@ -1585,7 +1593,7 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
return -EBUSY;
}
- ret = iwl_mvm_check_running_scans(mvm, IWL_MVM_SCAN_SCHED);
+ ret = iwl_mvm_check_running_scans(mvm, type);
if (ret)
return ret;
OpenPOWER on IntegriCloud