From: John W. Linville Date: Mon, 24 Feb 2014 20:05:42 +0000 (-0500) Subject: Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi... X-Git-Tag: next-20140306~62^2~111 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=0971f7d991f051b4f146e61363ee855adc9b31c2;p=karo-tx-linux.git Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next --- 0971f7d991f051b4f146e61363ee855adc9b31c2 diff --cc drivers/net/wireless/iwlwifi/iwl-nvm-parse.c index 53b9cad50477,eeb3a838c1bd..2f962ec0b750 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c @@@ -179,14 -202,19 +202,24 @@@ static int iwl_init_channel_map(struct struct ieee80211_channel *channel; u16 ch_flags; bool is_5ghz; + int num_of_ch; + const u8 *nvm_chan; + + if (cfg->device_family != IWL_DEVICE_FAMILY_8000) { + num_of_ch = IWL_NUM_CHANNELS; + nvm_chan = &iwl_nvm_channels[0]; + } else { + num_of_ch = IWL_NUM_CHANNELS_FAMILY_8000; + nvm_chan = &iwl_nvm_channels_family_8000[0]; + } - for (ch_idx = 0; ch_idx < IWL_NUM_CHANNELS; ch_idx++) { + for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { ch_flags = __le16_to_cpup(nvm_ch_flags + ch_idx); + + if (ch_idx >= NUM_2GHZ_CHANNELS && + !data->sku_cap_band_52GHz_enable) + ch_flags &= ~NVM_CHANNEL_VALID; + if (!(ch_flags & NVM_CHANNEL_VALID)) { IWL_DEBUG_EEPROM(dev, "Ch. %d Flags %x [%sGHz] - No traffic\n",