iwlwifi: fix radio reset scan dwell vs. quiet time
authorJohannes Berg <johannes.berg@intel.com>
Wed, 20 Jun 2012 19:25:15 +0000 (21:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 21 Jun 2012 08:01:22 +0000 (10:01 +0200)
My previous commit to shorten the radio reset time
caused issues as the firmware checks the active
dwell time against the quiet time, asserting that
the dwell is >= quiet time. This isn't really
needed in case of passive scanning like here, but
of course we need to pass that check.

To fix this, override the quiet time to be the
same as the radio reset dwell time.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/scan.c

index f5b1452a60b37b7b3feb9a42b22e5b26328c76d7..6633074258c757d32af598b6a19d5225d6651e05 100644 (file)
@@ -720,6 +720,12 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
        switch (priv->scan_type) {
        case IWL_SCAN_RADIO_RESET:
                IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
+               /*
+                * Override quiet time as firmware checks that active
+                * dwell is >= quiet; since we use passive scan it'll
+                * not actually be used.
+                */
+               scan->quiet_time = cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME);
                break;
        case IWL_SCAN_NORMAL:
                if (priv->scan_request->n_ssids) {