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: v5.15~18171^2~18^2^2~264 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0971f7d991f051b4f146e61363ee855adc9b31c2;p=platform%2Fkernel%2Flinux-starfive.git Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next --- 0971f7d991f051b4f146e61363ee855adc9b31c2 diff --cc drivers/net/wireless/iwlwifi/iwl-nvm-parse.c index 53b9cad,eeb3a83..2f962ec --- 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",