Lines Matching refs:chan
47 static int dfs_channel_available(struct hostapd_channel_data *chan,
55 if (skip_radar && (chan->flag & HOSTAPD_CHAN_RADAR) &&
56 ((chan->flag & HOSTAPD_CHAN_DFS_MASK) !=
60 if (chan->flag & HOSTAPD_CHAN_DISABLED)
62 if ((chan->flag & HOSTAPD_CHAN_RADAR) &&
63 ((chan->flag & HOSTAPD_CHAN_DFS_MASK) ==
70 static int dfs_is_chan_allowed(struct hostapd_channel_data *chan, int n_chans)
110 if (chan->chan == allowed[i])
122 struct hostapd_channel_data *first_chan, *chan;
131 chan = &mode->channels[first_chan_idx + i];
133 if (first_chan->freq + i * 20 != chan->freq)
136 if (!dfs_channel_available(chan, skip_radar))
145 struct hostapd_channel_data *chan)
153 if (*entry == chan->chan)
172 struct hostapd_channel_data *chan;
178 wpa_printf(MSG_DEBUG, "DFS new chan checking %d channels", n_chans);
180 chan = &mode->channels[i];
185 !dfs_is_chan_allowed(chan, n_chans))
192 if (!is_in_chanlist(iface, chan))
196 wpa_printf(MSG_DEBUG, "Selected ch. #%d", chan->chan);
197 *ret_chan = chan;
200 wpa_printf(MSG_DEBUG, "Adding channel: %d", chan->chan);
208 struct hostapd_channel_data *chan,
216 if (!chan)
224 *vht_oper_centr_freq_seg0_idx = chan->chan + 2;
226 *vht_oper_centr_freq_seg0_idx = chan->chan - 2;
228 *vht_oper_centr_freq_seg0_idx = chan->chan;
231 *vht_oper_centr_freq_seg0_idx = chan->chan + 6;
234 *vht_oper_centr_freq_seg0_idx = chan->chan + 14;
252 struct hostapd_channel_data *chan;
284 chan = &mode->channels[i];
285 if (chan->chan == channel_no) {
301 mode->channels[i].chan);
389 struct hostapd_channel_data *chan = NULL;
413 dfs_find_channel(iface, &chan, chan_idx, skip_radar);
421 dfs_adjust_vht_center_freq(iface, chan,
426 return chan;
433 struct hostapd_channel_data *chan = NULL;
442 chan = &iface->current_mode->channels[i];
443 if (chan->freq == freq) {
444 if (chan->flag & HOSTAPD_CHAN_RADAR) {
445 chan->flag &= ~HOSTAPD_CHAN_DFS_MASK;
446 chan->flag |= state;
516 struct hostapd_channel_data *chan;
559 chan = &mode->channels[start_chan_idx + i];
560 if (!(chan->flag & HOSTAPD_CHAN_RADAR))
564 chan->chan, radar_chan + j * 4);
565 if (chan->chan == radar_chan + j * 4)
658 iface->conf->channel = channel->chan;
669 "freq=%d chan=%d sec_chan=%d, width=%d, seg0=%d, seg1=%d, cac_time=%ds",
740 channel->chan);
742 "freq=%d chan=%d sec_chan=%d", channel->freq,
743 channel->chan, secondary_channel);
746 iface->conf->channel = channel->chan;
816 iface->conf->channel = channel->chan;
829 channel->chan);
831 "freq=%d chan=%d sec_chan=%d", channel->freq,
832 channel->chan, secondary_channel);
841 channel->chan,
866 iface->conf->channel = channel->chan;