Home | History | Annotate | Download | only in ap

Lines Matching refs:chan

247 static void acs_clean_chan_surveys(struct hostapd_channel_data *chan)
251 if (dl_list_empty(&chan->survey_list))
254 dl_list_for_each_safe(survey, tmp, &chan->survey_list,
265 struct hostapd_channel_data *chan;
268 chan = &iface->current_mode->channels[i];
270 if (chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED)
271 acs_clean_chan_surveys(chan);
273 dl_list_init(&chan->survey_list);
274 chan->flag |= HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED;
275 chan->min_nf = 0;
326 struct hostapd_channel_data *chan)
332 if (dl_list_empty(&chan->survey_list))
335 if (chan->flag & HOSTAPD_CHAN_DISABLED)
338 chan->interference_factor = 0;
340 dl_list_for_each(survey, &chan->survey_list, struct freq_survey, list)
344 chan->interference_factor += int_factor;
346 ++i, chan->min_nf, int_factor,
352 chan->interference_factor = chan->interference_factor /
353 dl_list_len(&chan->survey_list);
357 static int acs_usable_ht40_chan(struct hostapd_channel_data *chan)
364 if (chan->chan == allowed[i])
371 static int acs_usable_vht80_chan(struct hostapd_channel_data *chan)
377 if (chan->chan == allowed[i])
406 static int acs_survey_list_is_sufficient(struct hostapd_channel_data *chan)
410 dl_list_for_each(survey, &chan->survey_list, struct freq_survey, list)
414 chan->chan);
427 struct hostapd_channel_data *chan;
431 chan = &iface->current_mode->channels[i];
432 if (chan->flag & HOSTAPD_CHAN_DISABLED)
435 if (!acs_survey_list_is_sufficient(chan))
446 static int acs_usable_chan(struct hostapd_channel_data *chan)
448 if (dl_list_empty(&chan->survey_list))
450 if (chan->flag & HOSTAPD_CHAN_DISABLED)
452 if (!acs_survey_list_is_sufficient(chan))
462 struct hostapd_channel_data *chan;
465 chan = &iface->current_mode->channels[i];
467 if (!acs_usable_chan(chan))
471 chan->chan, chan->freq);
473 acs_survey_chan_interference_factor(iface, chan);
476 chan->interference_factor);
484 struct hostapd_channel_data *chan;
488 chan = &iface->current_mode->channels[i];
490 if (chan->flag & HOSTAPD_CHAN_DISABLED)
493 if (chan->freq == freq)
494 return chan;
502 * At this point it's assumed chan->interface_factor has been computed.
504 * option (survey, BSS, spectral, ...). chan->interference factor must be
510 struct hostapd_channel_data *chan, *adj_chan, *ideal_chan = NULL,
541 chan = &iface->current_mode->channels[i];
543 if (chan->flag & HOSTAPD_CHAN_DISABLED)
552 !acs_usable_ht40_chan(chan)) {
554 chan->chan);
561 !acs_usable_vht80_chan(chan)) {
563 chan->chan);
568 if (acs_usable_chan(chan))
569 factor = chan->interference_factor;
572 adj_chan = acs_find_chan(iface, chan->freq + (j * 20));
582 chan->chan);
594 adj_chan = acs_find_chan(iface, chan->freq +
599 adj_chan = acs_find_chan(iface, chan->freq +
604 adj_chan = acs_find_chan(iface, chan->freq +
609 adj_chan = acs_find_chan(iface, chan->freq +
617 chan->chan, factor);
619 if (acs_usable_chan(chan) &&
622 ideal_chan = chan;
627 rand_chan = chan;
632 ideal_chan->chan, ideal_chan->freq, ideal_factor);
717 iface->conf->channel = ideal_chan->chan;
776 struct hostapd_channel_data *chan;
787 chan = &iface->current_mode->channels[i];
788 if (chan->flag & HOSTAPD_CHAN_DISABLED)
791 *freq++ = chan->freq;