diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2016-03-07 12:23:04 -0500 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-03-07 12:23:16 -0500 |
commit | 18ddf12c2de57556909778af1ab31177bf53d5cb (patch) | |
tree | f5c23f0e36d1ae634cc0c1d7271415c2a74f8a6f /drivers | |
parent | 891985fa8e08d0c625ee71096fc3d10350eb051b (diff) | |
download | lwn-18ddf12c2de57556909778af1ab31177bf53d5cb.tar.gz lwn-18ddf12c2de57556909778af1ab31177bf53d5cb.zip |
iwlwifi: mvm: don't allow sched scans without matches to be started
[ Upstream commit 5e56276e7555b34550d51459a801ff75eca8b907 ]
The firmware can perform a scheduled scan with not matchsets passed,
but it can't send notification that results were found. Since the
userspace then cannot know when we got new results and the firmware
wouldn't trigger a wake in case we are sleeping, it's better not to
allow scans without matchsets.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=110831
Cc: <stable@vger.kernel.org> [3.17+]
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[SL: Backport to 4.1]
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 9779c1e5688c..90e8b662e44d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -2797,6 +2797,10 @@ static int iwl_mvm_mac_sched_scan_start(struct ieee80211_hw *hw, struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); int ret; + /* we don't support "match all" in the firmware */ + if (!req->n_match_sets) + return -EOPNOTSUPP; + if (!(mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)) { ret = iwl_mvm_cancel_scan_wait_notif(mvm, IWL_MVM_SCAN_OS); if (ret) |