aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-05-11 12:59:43 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-05-13 07:04:55 -0400
commit64793110ad4d82e18d88a33307749c6562a6dd04 (patch)
tree21b502166d7f9890f9067fa4e0c951a7a06bbe1f
parent1c4abec0baf25ffb92a28cc99d4231feeaa4d3f3 (diff)
iwlwifi: mvm: fix off-by-one in scan channels configuration
tail should be equal to the last valid index, so decrease it by one. This error causes in "a gap" in some cases (as well as some possible out-of-bound write), finally resulting in ucode assertion. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index cba88a379fc8..c28de54c75d4 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -732,7 +732,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
732 int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; 732 int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels;
733 int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; 733 int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels;
734 int head = 0; 734 int head = 0;
735 int tail = band_2ghz + band_5ghz; 735 int tail = band_2ghz + band_5ghz - 1;
736 u32 ssid_bitmap; 736 u32 ssid_bitmap;
737 int cmd_len; 737 int cmd_len;
738 int ret; 738 int ret;