Lines Matching refs:ch_idx
335 static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, enum nl80211_band band,
346 if ((ch_idx - NUM_2GHZ_CHANNELS) % 2 == 0)
384 static enum nl80211_band iwl_nl80211_band_from_channel_idx(int ch_idx)
386 if (ch_idx >= NUM_2GHZ_CHANNELS + NUM_5GHZ_CHANNELS) {
390 if (ch_idx >= NUM_2GHZ_CHANNELS)
403 int ch_idx;
421 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) {
423 iwl_nl80211_band_from_channel_idx(ch_idx);
427 __le32_to_cpup((const __le32 *)nvm_ch_flags + ch_idx);
430 __le16_to_cpup((const __le16 *)nvm_ch_flags + ch_idx);
455 nvm_chan[ch_idx], ch_flags);
462 channel->hw_value = nvm_chan[ch_idx];
478 channel->flags = iwl_get_channel_flags(nvm_chan[ch_idx],
479 ch_idx, band,
1615 int ch_idx, u16 nvm_flags,
1622 if (ch_idx < NUM_2GHZ_CHANNELS &&
1624 if (nvm_chan[ch_idx] <= LAST_2GHZ_HT_PLUS)
1626 if (nvm_chan[ch_idx] >= FIRST_2GHZ_HT_MINUS)
1629 if ((ch_idx - NUM_2GHZ_CHANNELS) % 2 == 0)
1676 if (ch_idx >= NUM_2GHZ_CHANNELS) {
1729 int ch_idx;
1778 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) {
1779 ch_flags = (u16)__le32_to_cpup(channels + ch_idx);
1780 band = iwl_nl80211_band_from_channel_idx(ch_idx);
1781 center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx],
1787 nvm_chan[ch_idx], ch_flags);
1791 reg_rule_flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx,
1796 if (ch_idx == 0 || prev_reg_rule_flags != reg_rule_flags ||
1825 nvm_chan[ch_idx], ch_flags);