Lines Matching refs:iface
75 int hostapd_get_hw_features(struct hostapd_iface *iface) in hostapd_get_hw_features() argument
77 struct hostapd_data *hapd = iface->bss[0]; in hostapd_get_hw_features()
95 iface->hw_flags = flags; in hostapd_get_hw_features()
96 iface->dfs_domain = dfs_domain; in hostapd_get_hw_features()
98 hostapd_free_hw_features(iface->hw_features, iface->num_hw_features); in hostapd_get_hw_features()
99 iface->hw_features = modes; in hostapd_get_hw_features()
100 iface->num_hw_features = num_modes; in hostapd_get_hw_features()
105 (iface->drv_flags & WPA_DRIVER_FLAGS_RADAR); in hostapd_get_hw_features()
123 !(iface->drv_flags & in hostapd_get_hw_features()
148 int hostapd_prepare_rates(struct hostapd_iface *iface, in hostapd_prepare_rates() argument
157 if (iface->conf->basic_rates) in hostapd_prepare_rates()
158 basic_rates = iface->conf->basic_rates; in hostapd_prepare_rates()
180 os_free(iface->basic_rates); in hostapd_prepare_rates()
181 iface->basic_rates = os_malloc(i * sizeof(int)); in hostapd_prepare_rates()
182 if (iface->basic_rates) in hostapd_prepare_rates()
183 os_memcpy(iface->basic_rates, basic_rates, i * sizeof(int)); in hostapd_prepare_rates()
185 os_free(iface->current_rates); in hostapd_prepare_rates()
186 iface->num_rates = 0; in hostapd_prepare_rates()
188 iface->current_rates = in hostapd_prepare_rates()
190 if (!iface->current_rates) { in hostapd_prepare_rates()
199 if (iface->conf->supported_rates && in hostapd_prepare_rates()
200 !hostapd_rate_found(iface->conf->supported_rates, in hostapd_prepare_rates()
204 rate = &iface->current_rates[iface->num_rates]; in hostapd_prepare_rates()
211 iface->num_rates, rate->rate, rate->flags); in hostapd_prepare_rates()
212 iface->num_rates++; in hostapd_prepare_rates()
215 if ((iface->num_rates == 0 || num_basic_rates == 0) && in hostapd_prepare_rates()
216 (!iface->conf->ieee80211n || !iface->conf->require_ht)) { in hostapd_prepare_rates()
219 iface->num_rates, num_basic_rates); in hostapd_prepare_rates()
227 static int ieee80211n_allowed_ht40_channel_pair(struct hostapd_iface *iface) in ieee80211n_allowed_ht40_channel_pair() argument
232 pri_freq = iface->freq; in ieee80211n_allowed_ht40_channel_pair()
233 sec_freq = pri_freq + iface->conf->secondary_channel * 20; in ieee80211n_allowed_ht40_channel_pair()
235 if (!iface->current_mode) in ieee80211n_allowed_ht40_channel_pair()
238 p_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq, NULL, in ieee80211n_allowed_ht40_channel_pair()
239 iface->hw_features, in ieee80211n_allowed_ht40_channel_pair()
240 iface->num_hw_features); in ieee80211n_allowed_ht40_channel_pair()
242 s_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq, NULL, in ieee80211n_allowed_ht40_channel_pair()
243 iface->hw_features, in ieee80211n_allowed_ht40_channel_pair()
244 iface->num_hw_features); in ieee80211n_allowed_ht40_channel_pair()
246 return allowed_ht40_channel_pair(iface->current_mode->mode, in ieee80211n_allowed_ht40_channel_pair()
251 static void ieee80211n_switch_pri_sec(struct hostapd_iface *iface) in ieee80211n_switch_pri_sec() argument
253 if (iface->conf->secondary_channel > 0) { in ieee80211n_switch_pri_sec()
254 iface->conf->channel += 4; in ieee80211n_switch_pri_sec()
255 iface->freq += 20; in ieee80211n_switch_pri_sec()
256 iface->conf->secondary_channel = -1; in ieee80211n_switch_pri_sec()
258 iface->conf->channel -= 4; in ieee80211n_switch_pri_sec()
259 iface->freq -= 20; in ieee80211n_switch_pri_sec()
260 iface->conf->secondary_channel = 1; in ieee80211n_switch_pri_sec()
265 static int ieee80211n_check_40mhz_5g(struct hostapd_iface *iface, in ieee80211n_check_40mhz_5g() argument
272 pri_freq = iface->freq; in ieee80211n_check_40mhz_5g()
273 sec_freq = pri_freq + iface->conf->secondary_channel * 20; in ieee80211n_check_40mhz_5g()
275 if (!iface->current_mode) in ieee80211n_check_40mhz_5g()
277 pri_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq, in ieee80211n_check_40mhz_5g()
278 NULL, iface->hw_features, in ieee80211n_check_40mhz_5g()
279 iface->num_hw_features); in ieee80211n_check_40mhz_5g()
280 sec_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq, in ieee80211n_check_40mhz_5g()
281 NULL, iface->hw_features, in ieee80211n_check_40mhz_5g()
282 iface->num_hw_features); in ieee80211n_check_40mhz_5g()
287 if (iface->conf->no_pri_sec_switch) { in ieee80211n_check_40mhz_5g()
291 ieee80211n_switch_pri_sec(iface); in ieee80211n_check_40mhz_5g()
299 static int ieee80211n_check_40mhz_2g4(struct hostapd_iface *iface, in ieee80211n_check_40mhz_2g4() argument
304 pri_chan = iface->conf->channel; in ieee80211n_check_40mhz_2g4()
305 sec_chan = pri_chan + iface->conf->secondary_channel * 4; in ieee80211n_check_40mhz_2g4()
307 return check_40mhz_2g4(iface->current_mode, scan_res, pri_chan, in ieee80211n_check_40mhz_2g4()
312 static void ieee80211n_check_scan(struct hostapd_iface *iface) in ieee80211n_check_scan() argument
321 iface->scan_cb = NULL; in ieee80211n_check_scan()
323 scan_res = hostapd_driver_get_scan_results(iface->bss[0]); in ieee80211n_check_scan()
325 hostapd_setup_interface_complete(iface, 1); in ieee80211n_check_scan()
329 if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A) in ieee80211n_check_scan()
330 oper40 = ieee80211n_check_40mhz_5g(iface, scan_res); in ieee80211n_check_scan()
332 oper40 = ieee80211n_check_40mhz_2g4(iface, scan_res); in ieee80211n_check_scan()
335 iface->secondary_ch = iface->conf->secondary_channel; in ieee80211n_check_scan()
339 iface->conf->channel, in ieee80211n_check_scan()
340 iface->conf->channel + in ieee80211n_check_scan()
341 iface->conf->secondary_channel * 4); in ieee80211n_check_scan()
342 iface->conf->secondary_channel = 0; in ieee80211n_check_scan()
343 if (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX) { in ieee80211n_check_scan()
353 if (iface->conf->secondary_channel && in ieee80211n_check_scan()
354 iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G && in ieee80211n_check_scan()
355 iface->conf->ieee80211ax) { in ieee80211n_check_scan()
358 he_cap = &iface->current_mode->he_capab[IEEE80211_MODE_AP]; in ieee80211n_check_scan()
363 iface->conf->secondary_channel = 0; in ieee80211n_check_scan()
368 if (iface->conf->secondary_channel) in ieee80211n_check_scan()
369 res = ieee80211n_allowed_ht40_channel_pair(iface); in ieee80211n_check_scan()
371 iface->conf->secondary_channel = 0; in ieee80211n_check_scan()
372 hostapd_set_oper_centr_freq_seg0_idx(iface->conf, 0); in ieee80211n_check_scan()
373 hostapd_set_oper_centr_freq_seg1_idx(iface->conf, 0); in ieee80211n_check_scan()
374 hostapd_set_oper_chwidth(iface->conf, CHANWIDTH_USE_HT); in ieee80211n_check_scan()
379 hostapd_setup_interface_complete(iface, !res); in ieee80211n_check_scan()
383 static void ieee80211n_scan_channels_2g4(struct hostapd_iface *iface, in ieee80211n_scan_channels_2g4() argument
392 if (iface->current_mode == NULL) in ieee80211n_scan_channels_2g4()
395 pri_freq = iface->freq; in ieee80211n_scan_channels_2g4()
396 if (iface->conf->secondary_channel > 0) in ieee80211n_scan_channels_2g4()
410 mode = iface->current_mode; in ieee80211n_scan_channels_2g4()
428 static void ieee80211n_scan_channels_5g(struct hostapd_iface *iface, in ieee80211n_scan_channels_5g() argument
437 if (iface->current_mode == NULL) in ieee80211n_scan_channels_5g()
440 pri_freq = iface->freq; in ieee80211n_scan_channels_5g()
441 if (iface->conf->secondary_channel > 0) { in ieee80211n_scan_channels_5g()
451 mode = iface->current_mode; in ieee80211n_scan_channels_5g()
472 struct hostapd_iface *iface = eloop_data; in ap_ht40_scan_retry() local
477 if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G) in ap_ht40_scan_retry()
478 ieee80211n_scan_channels_2g4(iface, ¶ms); in ap_ht40_scan_retry()
480 ieee80211n_scan_channels_5g(iface, ¶ms); in ap_ht40_scan_retry()
482 ret = hostapd_driver_scan(iface->bss[0], ¶ms); in ap_ht40_scan_retry()
483 iface->num_ht40_scan_tries++; in ap_ht40_scan_retry()
487 iface->num_ht40_scan_tries < HT2040_COEX_SCAN_RETRY) { in ap_ht40_scan_retry()
490 ret, strerror(-ret), iface->num_ht40_scan_tries); in ap_ht40_scan_retry()
491 eloop_register_timeout(1, 0, ap_ht40_scan_retry, iface, NULL); in ap_ht40_scan_retry()
496 iface->scan_cb = ieee80211n_check_scan; in ap_ht40_scan_retry()
502 iface->conf->secondary_channel = 0; in ap_ht40_scan_retry()
503 iface->conf->ht_capab &= ~HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; in ap_ht40_scan_retry()
504 hostapd_setup_interface_complete(iface, 0); in ap_ht40_scan_retry()
508 void hostapd_stop_setup_timers(struct hostapd_iface *iface) in hostapd_stop_setup_timers() argument
510 eloop_cancel_timeout(ap_ht40_scan_retry, iface, NULL); in hostapd_stop_setup_timers()
514 static int ieee80211n_check_40mhz(struct hostapd_iface *iface) in ieee80211n_check_40mhz() argument
520 if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch) in ieee80211n_check_40mhz()
523 hostapd_set_state(iface, HAPD_IFACE_HT_SCAN); in ieee80211n_check_40mhz()
527 if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G) in ieee80211n_check_40mhz()
528 ieee80211n_scan_channels_2g4(iface, ¶ms); in ieee80211n_check_40mhz()
530 ieee80211n_scan_channels_5g(iface, ¶ms); in ieee80211n_check_40mhz()
532 ret = hostapd_driver_scan(iface->bss[0], ¶ms); in ieee80211n_check_40mhz()
539 iface->num_ht40_scan_tries = 1; in ieee80211n_check_40mhz()
540 eloop_cancel_timeout(ap_ht40_scan_retry, iface, NULL); in ieee80211n_check_40mhz()
541 eloop_register_timeout(1, 0, ap_ht40_scan_retry, iface, NULL); in ieee80211n_check_40mhz()
552 iface->scan_cb = ieee80211n_check_scan; in ieee80211n_check_40mhz()
557 static int ieee80211n_supported_ht_capab(struct hostapd_iface *iface) in ieee80211n_supported_ht_capab() argument
559 u16 hw = iface->current_mode->ht_capab; in ieee80211n_supported_ht_capab()
560 u16 conf = iface->conf->ht_capab; in ieee80211n_supported_ht_capab()
573 if (!iface->conf->acs && (conf & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) && in ieee80211n_supported_ht_capab()
647 static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface) in ieee80211ac_supported_vht_capab() argument
649 struct hostapd_hw_modes *mode = iface->current_mode; in ieee80211ac_supported_vht_capab()
651 u32 conf = iface->conf->vht_capab; in ieee80211ac_supported_vht_capab()
657 iface->conf->bss[0]->vendor_vht && in ieee80211ac_supported_vht_capab()
658 mode->vht_capab == 0 && iface->hw_features) { in ieee80211ac_supported_vht_capab()
661 for (i = 0; i < iface->num_hw_features; i++) { in ieee80211ac_supported_vht_capab()
662 if (iface->hw_features[i].mode == in ieee80211ac_supported_vht_capab()
664 mode = &iface->hw_features[i]; in ieee80211ac_supported_vht_capab()
680 static int ieee80211ax_supported_he_capab(struct hostapd_iface *iface) in ieee80211ax_supported_he_capab() argument
687 int hostapd_check_ht_capab(struct hostapd_iface *iface) in hostapd_check_ht_capab() argument
691 if (is_6ghz_freq(iface->freq)) in hostapd_check_ht_capab()
693 if (!iface->conf->ieee80211n) in hostapd_check_ht_capab()
696 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211B && in hostapd_check_ht_capab()
697 iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G && in hostapd_check_ht_capab()
698 (iface->conf->ht_capab & HT_CAP_INFO_DSSS_CCK40MHZ)) { in hostapd_check_ht_capab()
701 iface->conf->ht_capab &= ~HT_CAP_INFO_DSSS_CCK40MHZ; in hostapd_check_ht_capab()
704 if (!ieee80211n_supported_ht_capab(iface)) in hostapd_check_ht_capab()
707 if (iface->conf->ieee80211ax && in hostapd_check_ht_capab()
708 !ieee80211ax_supported_he_capab(iface)) in hostapd_check_ht_capab()
712 if (iface->conf->ieee80211ac && in hostapd_check_ht_capab()
713 !ieee80211ac_supported_vht_capab(iface)) in hostapd_check_ht_capab()
716 ret = ieee80211n_check_40mhz(iface); in hostapd_check_ht_capab()
719 if (!ieee80211n_allowed_ht40_channel_pair(iface)) in hostapd_check_ht_capab()
726 int hostapd_check_edmg_capab(struct hostapd_iface *iface) in hostapd_check_edmg_capab() argument
728 struct hostapd_hw_modes *mode = iface->hw_features; in hostapd_check_edmg_capab()
731 if (!iface->conf->enable_edmg) in hostapd_check_edmg_capab()
734 hostapd_encode_edmg_chan(iface->conf->enable_edmg, in hostapd_check_edmg_capab()
735 iface->conf->edmg_channel, in hostapd_check_edmg_capab()
736 iface->conf->channel, in hostapd_check_edmg_capab()
752 int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface) in hostapd_check_he_6ghz_capab() argument
758 if (!iface->current_mode || !is_6ghz_freq(iface->freq)) in hostapd_check_he_6ghz_capab()
761 he_cap = &iface->current_mode->he_capab[IEEE80211_MODE_AP]; in hostapd_check_he_6ghz_capab()
763 if (iface->conf->he_6ghz_max_mpdu > in hostapd_check_he_6ghz_capab()
771 if (iface->conf->he_6ghz_max_ampdu_len_exp > in hostapd_check_he_6ghz_capab()
779 if (iface->conf->he_6ghz_rx_ant_pat && in hostapd_check_he_6ghz_capab()
786 if (iface->conf->he_6ghz_tx_ant_pat && in hostapd_check_he_6ghz_capab()
797 static int hostapd_is_usable_chan(struct hostapd_iface *iface, in hostapd_is_usable_chan() argument
802 if (!iface->current_mode) in hostapd_is_usable_chan()
805 chan = hw_get_channel_freq(iface->current_mode->mode, frequency, NULL, in hostapd_is_usable_chan()
806 iface->hw_features, iface->num_hw_features); in hostapd_is_usable_chan()
824 static int hostapd_is_usable_edmg(struct hostapd_iface *iface) in hostapd_is_usable_edmg() argument
832 if (!iface->conf->enable_edmg) in hostapd_is_usable_edmg()
835 if (!iface->current_mode) in hostapd_is_usable_edmg()
837 pri_chan = hw_get_channel_freq(iface->current_mode->mode, in hostapd_is_usable_edmg()
838 iface->freq, NULL, in hostapd_is_usable_edmg()
839 iface->hw_features, in hostapd_is_usable_edmg()
840 iface->num_hw_features); in hostapd_is_usable_edmg()
841 hostapd_encode_edmg_chan(iface->conf->enable_edmg, in hostapd_is_usable_edmg()
842 iface->conf->edmg_channel, in hostapd_is_usable_edmg()
866 if (!hostapd_is_usable_chan(iface, freq, 1)) in hostapd_is_usable_edmg()
894 static int hostapd_is_usable_chans(struct hostapd_iface *iface) in hostapd_is_usable_chans() argument
899 if (!iface->current_mode) in hostapd_is_usable_chans()
901 pri_chan = hw_get_channel_freq(iface->current_mode->mode, in hostapd_is_usable_chans()
902 iface->freq, NULL, in hostapd_is_usable_chans()
903 iface->hw_features, in hostapd_is_usable_chans()
904 iface->num_hw_features); in hostapd_is_usable_chans()
909 if (!hostapd_is_usable_chan(iface, pri_chan->freq, 1)) { in hostapd_is_usable_chans()
913 if (!hostapd_is_usable_edmg(iface)) in hostapd_is_usable_chans()
916 if (!iface->conf->secondary_channel) in hostapd_is_usable_chans()
919 if (hostapd_is_usable_chan(iface, iface->freq + in hostapd_is_usable_chans()
920 iface->conf->secondary_channel * 20, 0)) in hostapd_is_usable_chans()
922 if (!iface->conf->ht40_plus_minus_allowed) in hostapd_is_usable_chans()
926 secondary_freq = iface->freq + 20; in hostapd_is_usable_chans()
927 if (hostapd_is_usable_chan(iface, secondary_freq, 0) && in hostapd_is_usable_chans()
929 iface->conf->secondary_channel = 1; in hostapd_is_usable_chans()
933 secondary_freq = iface->freq - 20; in hostapd_is_usable_chans()
934 if (hostapd_is_usable_chan(iface, secondary_freq, 0) && in hostapd_is_usable_chans()
936 iface->conf->secondary_channel = -1; in hostapd_is_usable_chans()
944 static void hostapd_determine_mode(struct hostapd_iface *iface) in hostapd_determine_mode() argument
949 if (iface->current_mode || in hostapd_determine_mode()
950 iface->conf->hw_mode != HOSTAPD_MODE_IEEE80211ANY) in hostapd_determine_mode()
953 if (iface->freq < 4000) in hostapd_determine_mode()
955 else if (iface->freq > 50000) in hostapd_determine_mode()
960 for (i = 0; i < iface->num_hw_features; i++) { in hostapd_determine_mode()
963 mode = &iface->hw_features[i]; in hostapd_determine_mode()
965 iface->current_mode = mode; in hostapd_determine_mode()
966 iface->conf->hw_mode = mode->mode; in hostapd_determine_mode()
971 if (!iface->current_mode) in hostapd_determine_mode()
977 hostapd_check_chans(struct hostapd_iface *iface) in hostapd_check_chans() argument
979 if (iface->freq) { in hostapd_check_chans()
980 hostapd_determine_mode(iface); in hostapd_check_chans()
981 if (hostapd_is_usable_chans(iface)) in hostapd_check_chans()
992 switch (acs_init(iface)) { in hostapd_check_chans()
1003 static void hostapd_notify_bad_chans(struct hostapd_iface *iface) in hostapd_notify_bad_chans() argument
1005 if (!iface->current_mode) { in hostapd_notify_bad_chans()
1006 hostapd_logger(iface->bss[0], NULL, HOSTAPD_MODULE_IEEE80211, in hostapd_notify_bad_chans()
1011 hostapd_logger(iface->bss[0], NULL, in hostapd_notify_bad_chans()
1015 iface->conf->channel, in hostapd_notify_bad_chans()
1016 iface->freq, iface->conf->secondary_channel, in hostapd_notify_bad_chans()
1017 iface->current_mode->mode, in hostapd_notify_bad_chans()
1018 hostapd_hw_mode_txt(iface->current_mode->mode)); in hostapd_notify_bad_chans()
1019 hostapd_logger(iface->bss[0], NULL, HOSTAPD_MODULE_IEEE80211, in hostapd_notify_bad_chans()
1025 int hostapd_acs_completed(struct hostapd_iface *iface, int err) in hostapd_acs_completed() argument
1032 switch (hostapd_check_chans(iface)) { in hostapd_acs_completed()
1034 wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, in hostapd_acs_completed()
1036 iface->freq, iface->conf->channel); in hostapd_acs_completed()
1040 wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, ACS_EVENT_FAILED); in hostapd_acs_completed()
1041 hostapd_notify_bad_chans(iface); in hostapd_acs_completed()
1046 wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, ACS_EVENT_FAILED); in hostapd_acs_completed()
1047 hostapd_notify_bad_chans(iface); in hostapd_acs_completed()
1051 ret = hostapd_check_ht_capab(iface); in hostapd_acs_completed()
1061 return hostapd_setup_interface_complete(iface, ret); in hostapd_acs_completed()
1073 int hostapd_select_hw_mode(struct hostapd_iface *iface) in hostapd_select_hw_mode() argument
1077 if (iface->num_hw_features < 1) in hostapd_select_hw_mode()
1080 if ((iface->conf->hw_mode == HOSTAPD_MODE_IEEE80211G || in hostapd_select_hw_mode()
1081 iface->conf->ieee80211n || iface->conf->ieee80211ac || in hostapd_select_hw_mode()
1082 iface->conf->ieee80211ax) && in hostapd_select_hw_mode()
1083 iface->conf->channel == 14) { in hostapd_select_hw_mode()
1085 iface->conf->hw_mode = HOSTAPD_MODE_IEEE80211B; in hostapd_select_hw_mode()
1086 iface->conf->ieee80211n = 0; in hostapd_select_hw_mode()
1087 iface->conf->ieee80211ac = 0; in hostapd_select_hw_mode()
1088 iface->conf->ieee80211ax = 0; in hostapd_select_hw_mode()
1091 iface->current_mode = NULL; in hostapd_select_hw_mode()
1092 for (i = 0; i < iface->num_hw_features; i++) { in hostapd_select_hw_mode()
1093 struct hostapd_hw_modes *mode = &iface->hw_features[i]; in hostapd_select_hw_mode()
1096 if (mode->mode == iface->conf->hw_mode) { in hostapd_select_hw_mode()
1097 if (iface->freq > 0 && in hostapd_select_hw_mode()
1098 !hw_mode_get_channel(mode, iface->freq, &chan)) in hostapd_select_hw_mode()
1101 iface->current_mode = mode; in hostapd_select_hw_mode()
1106 if (iface->current_mode == NULL) { in hostapd_select_hw_mode()
1107 if ((iface->drv_flags & WPA_DRIVER_FLAGS_ACS_OFFLOAD) && in hostapd_select_hw_mode()
1108 (iface->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY)) { in hostapd_select_hw_mode()
1111 } else if (!(iface->drv_flags & WPA_DRIVER_FLAGS_ACS_OFFLOAD) && in hostapd_select_hw_mode()
1112 iface->conf->hw_mode == HOSTAPD_MODE_IEEE80211ANY) { in hostapd_select_hw_mode()
1118 hostapd_logger(iface->bss[0], NULL, in hostapd_select_hw_mode()
1122 (int) iface->conf->hw_mode); in hostapd_select_hw_mode()
1127 switch (hostapd_check_chans(iface)) { in hostapd_select_hw_mode()
1134 hostapd_notify_bad_chans(iface); in hostapd_select_hw_mode()
1159 return hw_get_freq(hapd->iface->current_mode, chan); in hostapd_hw_get_freq()
1168 if (hapd->iface->current_mode) { in hostapd_hw_get_channel()
1169 channel = hw_get_chan(hapd->iface->current_mode->mode, freq, in hostapd_hw_get_channel()
1170 hapd->iface->hw_features, in hostapd_hw_get_channel()
1171 hapd->iface->num_hw_features); in hostapd_hw_get_channel()
1178 if (!hapd->iface->hw_features) in hostapd_hw_get_channel()
1180 for (i = 0; i < hapd->iface->num_hw_features; i++) { in hostapd_hw_get_channel()
1181 mode = &hapd->iface->hw_features[i]; in hostapd_hw_get_channel()
1183 hapd->iface->hw_features, in hostapd_hw_get_channel()
1184 hapd->iface->num_hw_features); in hostapd_hw_get_channel()
1192 int hostapd_hw_skip_mode(struct hostapd_iface *iface, in hostapd_hw_skip_mode() argument
1197 if (iface->current_mode) in hostapd_hw_skip_mode()
1198 return mode != iface->current_mode; in hostapd_hw_skip_mode()
1201 for (i = 0; i < iface->num_hw_features; i++) { in hostapd_hw_skip_mode()
1202 if (iface->hw_features[i].mode == HOSTAPD_MODE_IEEE80211G) in hostapd_hw_skip_mode()