aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/dvm/mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-14 15:22:17 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-18 07:47:07 -0400
commit601968b3bb1176b4cee47faba2d7a104422de8e6 (patch)
tree5bc0e4aa70f48400c1533cebadceea28972989c6 /drivers/net/wireless/iwlwifi/dvm/mac80211.c
parentdada03ca73b699337781ae36e1ce4c8fec2da40a (diff)
iwlwifi: delay ROC if doing internal reset scan
When the device is doing an internal radio reset scan, ROC can be rejected to the supplicant with busy status which confuses it. One option would be to queue the ROC and handle it later, but since the radio reset scan is very quick we can just wait for it to finish instead. Also add a warning since we shouldn't run into the case of having a scan active when requesting a ROC in any other case since mac80211 will not scan while ROC or ROC while scanning. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index 9d2374862314..c57726348ffe 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -1036,8 +1036,18 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw,
1036 mutex_lock(&priv->mutex); 1036 mutex_lock(&priv->mutex);
1037 1037
1038 if (test_bit(STATUS_SCAN_HW, &priv->status)) { 1038 if (test_bit(STATUS_SCAN_HW, &priv->status)) {
1039 err = -EBUSY; 1039 /* mac80211 should not scan while ROC or ROC while scanning */
1040 goto out; 1040 if (WARN_ON_ONCE(priv->scan_type != IWL_SCAN_RADIO_RESET)) {
1041 err = -EBUSY;
1042 goto out;
1043 }
1044
1045 iwl_scan_cancel_timeout(priv, 100);
1046
1047 if (test_bit(STATUS_SCAN_HW, &priv->status)) {
1048 err = -EBUSY;
1049 goto out;
1050 }
1041 } 1051 }
1042 1052
1043 priv->hw_roc_channel = channel; 1053 priv->hw_roc_channel = channel;