aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-02-20 07:58:30 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-03-09 13:16:46 -0400
commit660925371b9c0545ab41a65d38b47e98e16c1757 (patch)
tree50afad0b9ff2adf3dd677014901b8d973adb0c8a /drivers/net/wireless/iwlwifi
parent14cfca7152ae5d10b15baf01c7fd60f0f0871062 (diff)
iwlwifi: mvm: fix scan offload for BGN SKU
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 713efd71efe2..b4c9fb649976 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -709,7 +709,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
709 struct cfg80211_sched_scan_request *req, 709 struct cfg80211_sched_scan_request *req,
710 struct ieee80211_sched_scan_ies *ies) 710 struct ieee80211_sched_scan_ies *ies)
711{ 711{
712 int supported_bands = 0;
713 int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; 712 int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels;
714 int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; 713 int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels;
715 int head = 0; 714 int head = 0;
@@ -726,13 +725,8 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
726 725
727 lockdep_assert_held(&mvm->mutex); 726 lockdep_assert_held(&mvm->mutex);
728 727
729 if (band_2ghz)
730 supported_bands++;
731 if (band_5ghz)
732 supported_bands++;
733
734 cmd_len = sizeof(struct iwl_scan_offload_cfg) + 728 cmd_len = sizeof(struct iwl_scan_offload_cfg) +
735 supported_bands * SCAN_OFFLOAD_PROBE_REQ_SIZE; 729 2 * SCAN_OFFLOAD_PROBE_REQ_SIZE;
736 730
737 scan_cfg = kzalloc(cmd_len, GFP_KERNEL); 731 scan_cfg = kzalloc(cmd_len, GFP_KERNEL);
738 if (!scan_cfg) 732 if (!scan_cfg)