Home | History | Annotate | Download | only in ap

Lines Matching refs:chan

246 static void acs_clean_chan_surveys(struct hostapd_channel_data *chan)
250 if (dl_list_empty(&chan->survey_list))
253 dl_list_for_each_safe(survey, tmp, &chan->survey_list,
264 struct hostapd_channel_data *chan;
267 chan = &iface->current_mode->channels[i];
269 if (chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED)
270 acs_clean_chan_surveys(chan);
272 dl_list_init(&chan->survey_list);
273 chan->flag |= HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED;
274 chan->min_nf = 0;
324 struct hostapd_channel_data *chan)
330 if (dl_list_empty(&chan->survey_list))
333 if (chan->flag & HOSTAPD_CHAN_DISABLED)
336 chan->interference_factor = 0;
338 dl_list_for_each(survey, &chan->survey_list, struct freq_survey, list)
342 chan->interference_factor += int_factor;
344 ++i, chan->min_nf, int_factor,
350 chan->interference_factor = chan->interference_factor /
351 dl_list_len(&chan->survey_list);
355 static int acs_usable_chan(struct hostapd_channel_data *chan)
357 if (dl_list_empty(&chan->survey_list))
359 if (chan->flag & HOSTAPD_CHAN_DISABLED)
365 static int acs_usable_ht40_chan(struct hostapd_channel_data *chan)
372 if (chan->chan == allowed[i])
404 struct hostapd_channel_data *chan;
408 chan = &iface->current_mode->channels[i];
409 if (chan->flag & HOSTAPD_CHAN_DISABLED)
412 dl_list_for_each(survey, &chan->survey_list,
417 chan->chan);
431 struct hostapd_channel_data *chan;
434 chan = &iface->current_mode->channels[i];
436 if (!acs_usable_chan(chan))
440 chan->chan, chan->freq);
442 acs_survey_chan_interference_factor(iface, chan);
445 chan->interference_factor);
453 struct hostapd_channel_data *chan;
457 chan = &iface->current_mode->channels[i];
459 if (!acs_usable_chan(chan))
462 if (chan->freq == freq)
463 return chan;
471 * At this point it's assumed chan->interface_factor has been computed.
473 * option (survey, BSS, spectral, ...). chan->interference factor must be
479 struct hostapd_channel_data *chan, *adj_chan, *ideal_chan = NULL;
509 chan = &iface->current_mode->channels[i];
511 if (!acs_usable_chan(chan))
519 !acs_usable_ht40_chan(chan)) {
521 chan->chan);
525 factor = chan->interference_factor;
528 adj_chan = acs_find_chan(iface, chan->freq + (j * 20));
537 chan->chan);
549 adj_chan = acs_find_chan(iface, chan->freq +
554 adj_chan = acs_find_chan(iface, chan->freq +
559 adj_chan = acs_find_chan(iface, chan->freq +
564 adj_chan = acs_find_chan(iface, chan->freq +
572 chan->chan, factor);
576 ideal_chan = chan;
582 ideal_chan->chan, ideal_chan->freq, ideal_factor);
661 iface->conf->channel = ideal_chan->chan;
721 struct hostapd_channel_data *chan;
732 chan = &iface->current_mode->channels[i];
733 if (chan->flag & HOSTAPD_CHAN_DISABLED)
736 *freq++ = chan->freq;