Lines Matching defs:ch_idx
332 static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, enum nl80211_band band,
343 if ((ch_idx - NUM_2GHZ_CHANNELS) % 2 == 0)
383 static enum nl80211_band iwl_nl80211_band_from_channel_idx(int ch_idx)
385 if (ch_idx >= NUM_2GHZ_CHANNELS + NUM_5GHZ_CHANNELS) {
389 if (ch_idx >= NUM_2GHZ_CHANNELS)
402 int ch_idx;
420 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) {
422 iwl_nl80211_band_from_channel_idx(ch_idx);
426 __le32_to_cpup((const __le32 *)nvm_ch_flags + ch_idx);
429 __le16_to_cpup((const __le16 *)nvm_ch_flags + ch_idx);
454 nvm_chan[ch_idx], ch_flags);
461 channel->hw_value = nvm_chan[ch_idx];
477 channel->flags = iwl_get_channel_flags(nvm_chan[ch_idx],
478 ch_idx, band,
1616 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)
1628 } else if (ch_idx < NUM_2GHZ_CHANNELS + NUM_5GHZ_CHANNELS &&
1630 if ((ch_idx - NUM_2GHZ_CHANNELS) % 2 == 0)
1680 if (ch_idx >= NUM_2GHZ_CHANNELS) {
1733 int ch_idx;
1781 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) {
1783 iwl_nl80211_band_from_channel_idx(ch_idx);
1785 ch_flags = (u16)__le32_to_cpup(channels + ch_idx);
1786 center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx],
1792 nvm_chan[ch_idx], ch_flags);
1796 reg_rule_flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx,
1801 if (ch_idx == 0 || prev_reg_rule_flags != reg_rule_flags ||
1830 nvm_chan[ch_idx], ch_flags);