Lines Matching full:interfaces
77 int hostapd_for_each_interface(struct hapd_interfaces *interfaces, in hostapd_for_each_interface() argument
84 for (i = 0; i < interfaces->count; i++) { in hostapd_for_each_interface()
85 if (!interfaces->iface[i]) in hostapd_for_each_interface()
87 ret = cb(interfaces->iface[i], ctx); in hostapd_for_each_interface()
253 struct hapd_interfaces *interfaces = iface->interfaces; in hostapd_reload_config() local
266 if (iface->interfaces == NULL || in hostapd_reload_config()
267 iface->interfaces->config_read_cb == NULL) in hostapd_reload_config()
269 newconf = iface->interfaces->config_read_cb(iface->config_fname); in hostapd_reload_config()
287 hostapd_remove_iface(interfaces, hapd->conf->iface); in hostapd_reload_config()
288 iface = hostapd_init(interfaces, fname); in hostapd_reload_config()
296 iface->interfaces = interfaces; in hostapd_reload_config()
297 interfaces->iface[interfaces->count] = iface; in hostapd_reload_config()
298 interfaces->count++; in hostapd_reload_config()
485 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_free_hapd_data()
660 if (hapd->iface->interfaces && in hostapd_cleanup()
661 hapd->iface->interfaces->ctrl_iface_deinit) { in hostapd_cleanup()
663 hapd->iface->interfaces->ctrl_iface_deinit(hapd); in hostapd_cleanup()
1813 if (!hapd->iface->interfaces || in start_ctrl_iface_bss()
1814 !hapd->iface->interfaces->ctrl_iface_init) in start_ctrl_iface_bss()
1817 if (hapd->iface->interfaces->ctrl_iface_init(hapd)) { in start_ctrl_iface_bss()
1832 if (!iface->interfaces || !iface->interfaces->ctrl_iface_init) in start_ctrl_iface()
1837 if (iface->interfaces->ctrl_iface_init(hapd)) { in start_ctrl_iface()
1850 * deinitializing the driver and the control interfaces. A subsequent
1990 hostapd_for_each_interface(iface->interfaces, in hostapd_channel_list_updated()
2040 * Initialize control interfaces early to allow external monitoring of in setup_interface()
2227 if (iface->interfaces && iface->interfaces->terminate_on_error) in setup_interface2()
2417 if (!hapd->iface->interfaces || in hostapd_owe_trans_get_info()
2418 !hapd->iface->interfaces->for_each_interface) in hostapd_owe_trans_get_info()
2421 return hapd->iface->interfaces->for_each_interface( in hostapd_owe_trans_get_info()
2422 hapd->iface->interfaces, hostapd_owe_iface_iter, hapd); in hostapd_owe_trans_get_info()
2463 if (!iface->interfaces || in hostapd_owe_update_trans()
2464 !iface->interfaces->for_each_interface) in hostapd_owe_update_trans()
2467 iface->interfaces->for_each_interface( in hostapd_owe_update_trans()
2468 iface->interfaces, hostapd_owe_iface_iter2, NULL); in hostapd_owe_update_trans()
2705 if (iface->interfaces && iface->interfaces->terminate_on_error > 0) in hostapd_setup_interface_complete_sync()
2706 iface->interfaces->terminate_on_error--; in hostapd_setup_interface_complete_sync()
2711 if (iface->interfaces && iface->interfaces->count > 1) in hostapd_setup_interface_complete_sync()
2734 if (iface->interfaces && iface->interfaces->terminate_on_error) { in hostapd_setup_interface_complete_sync()
2760 struct hapd_interfaces *interfaces = iface->interfaces; in hostapd_setup_interface_complete() local
2780 if (interfaces && interfaces->terminate_on_error) in hostapd_setup_interface_complete()
2790 for (i = 0; i < interfaces->count; i++) { in hostapd_setup_interface_complete()
2791 if (interfaces->iface[i]->need_to_start_in_sync && in hostapd_setup_interface_complete()
2792 !interfaces->iface[i]->ready_to_start_in_sync) in hostapd_setup_interface_complete()
2798 * waiting interfaces. If not, add this interface to the waiting list. in hostapd_setup_interface_complete()
2813 /* need to wait as there are other interfaces still coming up */ in hostapd_setup_interface_complete()
2816 "%s: Interface waiting to sync with other interfaces", in hostapd_setup_interface_complete()
2822 "%s: Last interface to sync - starting all interfaces", in hostapd_setup_interface_complete()
2826 for (i = 0; i < interfaces->count; i++) { in hostapd_setup_interface_complete()
2827 if (interfaces->iface[i]->need_to_start_in_sync && in hostapd_setup_interface_complete()
2828 interfaces->iface[i]->ready_to_start_in_sync) { in hostapd_setup_interface_complete()
2830 interfaces->iface[i], 0); in hostapd_setup_interface_complete()
2831 /* Only once the interfaces are sync started */ in hostapd_setup_interface_complete()
2832 interfaces->iface[i]->need_to_start_in_sync = 0; in hostapd_setup_interface_complete()
3049 struct hapd_interfaces *interfaces) in hostapd_bss_setup_multi_link() argument
3062 for (i = 0; i < interfaces->mld_count; i++) { in hostapd_bss_setup_multi_link()
3063 mld = interfaces->mld[i]; in hostapd_bss_setup_multi_link()
3090 all_mld = os_realloc_array(interfaces->mld, interfaces->mld_count + 1, in hostapd_bss_setup_multi_link()
3095 interfaces->mld = all_mld; in hostapd_bss_setup_multi_link()
3096 interfaces->mld[interfaces->mld_count] = mld; in hostapd_bss_setup_multi_link()
3097 interfaces->mld_count++; in hostapd_bss_setup_multi_link()
3111 static void hostapd_cleanup_unused_mlds(struct hapd_interfaces *interfaces) in hostapd_cleanup_unused_mlds() argument
3118 if (!interfaces->mld) in hostapd_cleanup_unused_mlds()
3121 num_mlds = interfaces->mld_count; in hostapd_cleanup_unused_mlds()
3123 for (i = 0; i < interfaces->mld_count; i++) { in hostapd_cleanup_unused_mlds()
3124 mld = interfaces->mld[i]; in hostapd_cleanup_unused_mlds()
3134 /* If MLD is still being referenced but the number of interfaces in hostapd_cleanup_unused_mlds()
3139 if (!remove && !interfaces->count) in hostapd_cleanup_unused_mlds()
3148 interfaces->mld[i] = NULL; in hostapd_cleanup_unused_mlds()
3153 interfaces->mld_count = 0; in hostapd_cleanup_unused_mlds()
3154 os_free(interfaces->mld); in hostapd_cleanup_unused_mlds()
3155 interfaces->mld = NULL; in hostapd_cleanup_unused_mlds()
3166 for (i = 0, j = 0; i < interfaces->mld_count; i++) { in hostapd_cleanup_unused_mlds()
3167 mld = interfaces->mld[i]; in hostapd_cleanup_unused_mlds()
3182 os_free(interfaces->mld); in hostapd_cleanup_unused_mlds()
3183 interfaces->mld = all_mld; in hostapd_cleanup_unused_mlds()
3184 interfaces->mld_count = num_mlds; in hostapd_cleanup_unused_mlds()
3198 struct hostapd_iface * hostapd_init(struct hapd_interfaces *interfaces, in hostapd_init() argument
3214 conf = interfaces->config_read_cb(hapd_iface->config_fname); in hostapd_init()
3232 hostapd_bss_setup_multi_link(hapd, interfaces); in hostapd_init()
3254 static int ifname_in_use(struct hapd_interfaces *interfaces, const char *ifname) in ifname_in_use() argument
3258 for (i = 0; i < interfaces->count; i++) { in ifname_in_use()
3259 struct hostapd_iface *iface = interfaces->iface[i]; in ifname_in_use()
3283 hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy, in hostapd_interface_init_bss() argument
3294 for (i = 0; i < interfaces->count; i++) { in hostapd_interface_init_bss()
3295 if (os_strcmp(interfaces->iface[i]->phy, phy) == 0) { in hostapd_interface_init_bss()
3296 iface = interfaces->iface[i]; in hostapd_interface_init_bss()
3311 conf = interfaces->config_read_cb(config_fname); in hostapd_interface_init_bss()
3321 if (ifname[0] != '\0' && ifname_in_use(interfaces, ifname)) { in hostapd_interface_init_bss()
3355 hostapd_bss_setup_multi_link(hapd, interfaces); in hostapd_interface_init_bss()
3364 new_iface = iface = hostapd_init(interfaces, config_fname); in hostapd_interface_init_bss()
3368 iface->interfaces = interfaces; in hostapd_interface_init_bss()
3473 if (!hapd_iface->interfaces || hapd_iface->interfaces->count <= 1) in hostapd_refresh_all_iface_beacons()
3476 for (j = 0; j < hapd_iface->interfaces->count; j++) { in hostapd_refresh_all_iface_beacons()
3477 if (hapd_iface->interfaces->iface[j] == hapd_iface) in hostapd_refresh_all_iface_beacons()
3480 ieee802_11_update_beacons(hapd_iface->interfaces->iface[j]); in hostapd_refresh_all_iface_beacons()
3511 if (hapd_iface->interfaces == NULL || in hostapd_enable_iface()
3512 hapd_iface->interfaces->driver_init == NULL || in hostapd_enable_iface()
3513 hapd_iface->interfaces->driver_init(hapd_iface)) in hostapd_enable_iface()
3619 hostapd_iface_alloc(struct hapd_interfaces *interfaces) in hostapd_iface_alloc() argument
3623 iface = os_realloc_array(interfaces->iface, interfaces->count + 1, in hostapd_iface_alloc()
3627 interfaces->iface = iface; in hostapd_iface_alloc()
3628 hapd_iface = interfaces->iface[interfaces->count] = in hostapd_iface_alloc()
3635 interfaces->count++; in hostapd_iface_alloc()
3636 hapd_iface->interfaces = interfaces; in hostapd_iface_alloc()
3643 hostapd_config_alloc(struct hapd_interfaces *interfaces, const char *ifname, in hostapd_config_alloc() argument
3722 hostapd_bss_setup_multi_link(hapd, hapd_iface->interfaces); in hostapd_data_alloc()
3732 int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf) in hostapd_add_iface() argument
3752 hapd_iface = hostapd_interface_init_bss(interfaces, phy_name, in hostapd_add_iface()
3756 for (j = 0; j < interfaces->count; j++) { in hostapd_add_iface()
3757 if (interfaces->iface[j] == hapd_iface) in hostapd_add_iface()
3760 if (j == interfaces->count) { in hostapd_add_iface()
3762 tmp = os_realloc_array(interfaces->iface, in hostapd_add_iface()
3763 interfaces->count + 1, in hostapd_add_iface()
3769 interfaces->iface = tmp; in hostapd_add_iface()
3770 interfaces->iface[interfaces->count++] = hapd_iface; in hostapd_add_iface()
3775 if (interfaces->driver_init(hapd_iface)) in hostapd_add_iface()
3824 for (i = 0; i < interfaces->count; i++) { in hostapd_add_iface()
3828 mld_ap = interfaces->iface[i]->conf->bss[0]->mld_ap; in hostapd_add_iface()
3831 if (!os_strcmp(interfaces->iface[i]->conf->bss[0]->iface, in hostapd_add_iface()
3839 hapd_iface = hostapd_iface_alloc(interfaces); in hostapd_add_iface()
3847 if (conf_file && interfaces->config_read_cb) { in hostapd_add_iface()
3848 conf = interfaces->config_read_cb(conf_file); in hostapd_add_iface()
3857 conf = hostapd_config_alloc(interfaces, buf, ptr, driver); in hostapd_add_iface()
3890 if (hapd_iface->interfaces && in hostapd_add_iface()
3891 hapd_iface->interfaces->ctrl_iface_deinit) in hostapd_add_iface()
3892 hapd_iface->interfaces-> in hostapd_add_iface()
3909 interfaces->count--; in hostapd_add_iface()
3910 interfaces->iface[interfaces->count] = NULL; in hostapd_add_iface()
3911 hostapd_cleanup_unused_mlds(interfaces); in hostapd_add_iface()
3956 int hostapd_remove_iface(struct hapd_interfaces *interfaces, char *buf) in hostapd_remove_iface() argument
3961 for (i = 0; i < interfaces->count; i++) { in hostapd_remove_iface()
3962 hapd_iface = interfaces->iface[i]; in hostapd_remove_iface()
3973 while (k < (interfaces->count - 1)) { in hostapd_remove_iface()
3974 interfaces->iface[k] = in hostapd_remove_iface()
3975 interfaces->iface[k + 1]; in hostapd_remove_iface()
3978 interfaces->count--; in hostapd_remove_iface()
3979 hostapd_cleanup_unused_mlds(interfaces); in hostapd_remove_iface()
4737 struct hostapd_data * hostapd_get_iface(struct hapd_interfaces *interfaces, in hostapd_get_iface() argument
4742 for (i = 0; i < interfaces->count; i++) { in hostapd_get_iface()
4743 struct hostapd_iface *iface = interfaces->iface[i]; in hostapd_get_iface()
4807 for (i = 0; i < hapd->iface->interfaces->count; i++) { in hostapd_mld_get_link_bss()
4808 iface = hapd->iface->interfaces->iface[i]; in hostapd_mld_get_link_bss()