]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
iwlwifi: mvm: fix scan offload for BGN SKU
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 20 Feb 2014 12:58:30 +0000 (14:58 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 9 Mar 2014 17:16:46 +0000 (19:16 +0200)
BGN SKU won't scan on 5.2GHz obviously, but the firmware
still expects the driver to reserve space for the the probe
request for the 5.2GHz band.
Fix this by allocating space and leave it empty.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=69541

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

index 713efd71efe26b6eb4f545c4a7f306813f77c1dc..b4c9fb64997619c6c315eb4d824ca56ebfd04bc7 100644 (file)
@@ -709,7 +709,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
                              struct cfg80211_sched_scan_request *req,
                              struct ieee80211_sched_scan_ies *ies)
 {
-       int supported_bands = 0;
        int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels;
        int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels;
        int head = 0;
@@ -726,13 +725,8 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
 
        lockdep_assert_held(&mvm->mutex);
 
-       if (band_2ghz)
-               supported_bands++;
-       if (band_5ghz)
-               supported_bands++;
-
        cmd_len = sizeof(struct iwl_scan_offload_cfg) +
-                               supported_bands * SCAN_OFFLOAD_PROBE_REQ_SIZE;
+                 2 * SCAN_OFFLOAD_PROBE_REQ_SIZE;
 
        scan_cfg = kzalloc(cmd_len, GFP_KERNEL);
        if (!scan_cfg)