aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-12-05 15:42:55 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-02-02 04:08:42 -0500
commitc512865446e6dd5b6e91e81187e75b734ad7cfc7 (patch)
tree4c91cce0ade3979a356c293fcd9513c2f754b82f
parent8e2a866ef214af4e104ec8d593e3269d8fe66d19 (diff)
iwlwifi: mvm: don't allow A band if SKU forbids it
The driver wasn't reading the NVM properly. While this didn't lead to any issue until now, it seems that there is an old version of the NVM in the wild. In this version, the A band channels appear to be valid but the SKU capabilities (another field of the NVM) says that A band isn't supported at all. With this specific version of the NVM, the driver would think that A band is supported while the HW / firmware don't. This leads to asserts. Cc: <stable@vger.kernel.org> [3.10+] Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-nvm-parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
index f06f4cbe1317..725e954d8475 100644
--- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
@@ -182,6 +182,11 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
182 182
183 for (ch_idx = 0; ch_idx < IWL_NUM_CHANNELS; ch_idx++) { 183 for (ch_idx = 0; ch_idx < IWL_NUM_CHANNELS; ch_idx++) {
184 ch_flags = __le16_to_cpup(nvm_ch_flags + ch_idx); 184 ch_flags = __le16_to_cpup(nvm_ch_flags + ch_idx);
185
186 if (ch_idx >= NUM_2GHZ_CHANNELS &&
187 !data->sku_cap_band_52GHz_enable)
188 ch_flags &= ~NVM_CHANNEL_VALID;
189
185 if (!(ch_flags & NVM_CHANNEL_VALID)) { 190 if (!(ch_flags & NVM_CHANNEL_VALID)) {
186 IWL_DEBUG_EEPROM(dev, 191 IWL_DEBUG_EEPROM(dev,
187 "Ch. %d Flags %x [%sGHz] - No traffic\n", 192 "Ch. %d Flags %x [%sGHz] - No traffic\n",