Lines Matching refs:interfaces
58 int hostapd_for_each_interface(struct hapd_interfaces *interfaces, in hostapd_for_each_interface() argument
65 for (i = 0; i < interfaces->count; i++) { in hostapd_for_each_interface()
66 ret = cb(interfaces->iface[i], ctx); in hostapd_for_each_interface()
174 if (iface->interfaces == NULL || in hostapd_reload_config()
175 iface->interfaces->config_read_cb == NULL) in hostapd_reload_config()
177 newconf = iface->interfaces->config_read_cb(iface->config_fname); in hostapd_reload_config()
364 if (hapd->iface->interfaces && in hostapd_cleanup()
365 hapd->iface->interfaces->ctrl_iface_deinit) { in hostapd_cleanup()
367 hapd->iface->interfaces->ctrl_iface_deinit(hapd); in hostapd_cleanup()
1237 if (!hapd->iface->interfaces || in start_ctrl_iface_bss()
1238 !hapd->iface->interfaces->ctrl_iface_init) in start_ctrl_iface_bss()
1241 if (hapd->iface->interfaces->ctrl_iface_init(hapd)) { in start_ctrl_iface_bss()
1256 if (!iface->interfaces || !iface->interfaces->ctrl_iface_init) in start_ctrl_iface()
1261 if (iface->interfaces->ctrl_iface_init(hapd)) { in start_ctrl_iface()
1410 if (iface->interfaces && iface->interfaces->terminate_on_error) in setup_interface2()
1843 if (iface->interfaces && iface->interfaces->terminate_on_error > 0) in hostapd_setup_interface_complete_sync()
1844 iface->interfaces->terminate_on_error--; in hostapd_setup_interface_complete_sync()
1861 if (iface->interfaces && iface->interfaces->terminate_on_error) in hostapd_setup_interface_complete_sync()
1877 struct hapd_interfaces *interfaces = iface->interfaces; in hostapd_setup_interface_complete() local
1890 if (interfaces && interfaces->terminate_on_error) in hostapd_setup_interface_complete()
1900 for (i = 0; i < interfaces->count; i++) { in hostapd_setup_interface_complete()
1901 if (interfaces->iface[i]->need_to_start_in_sync && in hostapd_setup_interface_complete()
1902 !interfaces->iface[i]->ready_to_start_in_sync) in hostapd_setup_interface_complete()
1936 for (i = 0; i < interfaces->count; i++) { in hostapd_setup_interface_complete()
1937 if (interfaces->iface[i]->need_to_start_in_sync && in hostapd_setup_interface_complete()
1938 interfaces->iface[i]->ready_to_start_in_sync) { in hostapd_setup_interface_complete()
1940 interfaces->iface[i], 0); in hostapd_setup_interface_complete()
1942 interfaces->iface[i]->need_to_start_in_sync = 0; in hostapd_setup_interface_complete()
2102 struct hostapd_iface * hostapd_init(struct hapd_interfaces *interfaces, in hostapd_init() argument
2118 conf = interfaces->config_read_cb(hapd_iface->config_fname); in hostapd_init()
2156 static int ifname_in_use(struct hapd_interfaces *interfaces, const char *ifname) in ifname_in_use() argument
2160 for (i = 0; i < interfaces->count; i++) { in ifname_in_use()
2161 struct hostapd_iface *iface = interfaces->iface[i]; in ifname_in_use()
2185 hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy, in hostapd_interface_init_bss() argument
2196 for (i = 0; i < interfaces->count; i++) { in hostapd_interface_init_bss()
2197 if (os_strcmp(interfaces->iface[i]->phy, phy) == 0) { in hostapd_interface_init_bss()
2198 iface = interfaces->iface[i]; in hostapd_interface_init_bss()
2213 conf = interfaces->config_read_cb(config_fname); in hostapd_interface_init_bss()
2223 if (ifname[0] != '\0' && ifname_in_use(interfaces, ifname)) { in hostapd_interface_init_bss()
2264 new_iface = iface = hostapd_init(interfaces, config_fname); in hostapd_interface_init_bss()
2268 iface->interfaces = interfaces; in hostapd_interface_init_bss()
2355 if (hapd_iface->interfaces == NULL || in hostapd_enable_iface()
2356 hapd_iface->interfaces->driver_init == NULL || in hostapd_enable_iface()
2357 hapd_iface->interfaces->driver_init(hapd_iface)) in hostapd_enable_iface()
2436 hostapd_iface_alloc(struct hapd_interfaces *interfaces) in hostapd_iface_alloc() argument
2440 iface = os_realloc_array(interfaces->iface, interfaces->count + 1, in hostapd_iface_alloc()
2444 interfaces->iface = iface; in hostapd_iface_alloc()
2445 hapd_iface = interfaces->iface[interfaces->count] = in hostapd_iface_alloc()
2452 interfaces->count++; in hostapd_iface_alloc()
2453 hapd_iface->interfaces = interfaces; in hostapd_iface_alloc()
2460 hostapd_config_alloc(struct hapd_interfaces *interfaces, const char *ifname, in hostapd_config_alloc() argument
2548 int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf) in hostapd_add_iface() argument
2568 hapd_iface = hostapd_interface_init_bss(interfaces, phy_name, in hostapd_add_iface()
2572 for (j = 0; j < interfaces->count; j++) { in hostapd_add_iface()
2573 if (interfaces->iface[j] == hapd_iface) in hostapd_add_iface()
2576 if (j == interfaces->count) { in hostapd_add_iface()
2578 tmp = os_realloc_array(interfaces->iface, in hostapd_add_iface()
2579 interfaces->count + 1, in hostapd_add_iface()
2585 interfaces->iface = tmp; in hostapd_add_iface()
2586 interfaces->iface[interfaces->count++] = hapd_iface; in hostapd_add_iface()
2591 if (interfaces->driver_init(hapd_iface)) in hostapd_add_iface()
2635 for (i = 0; i < interfaces->count; i++) { in hostapd_add_iface()
2636 if (!os_strcmp(interfaces->iface[i]->conf->bss[0]->iface, in hostapd_add_iface()
2644 hapd_iface = hostapd_iface_alloc(interfaces); in hostapd_add_iface()
2652 if (conf_file && interfaces->config_read_cb) { in hostapd_add_iface()
2653 conf = interfaces->config_read_cb(conf_file); in hostapd_add_iface()
2662 conf = hostapd_config_alloc(interfaces, buf, ptr, driver); in hostapd_add_iface()
2695 if (hapd_iface->interfaces && in hostapd_add_iface()
2696 hapd_iface->interfaces->ctrl_iface_deinit) in hostapd_add_iface()
2697 hapd_iface->interfaces-> in hostapd_add_iface()
2710 interfaces->count--; in hostapd_add_iface()
2711 interfaces->iface[interfaces->count] = NULL; in hostapd_add_iface()
2753 int hostapd_remove_iface(struct hapd_interfaces *interfaces, char *buf) in hostapd_remove_iface() argument
2758 for (i = 0; i < interfaces->count; i++) { in hostapd_remove_iface()
2759 hapd_iface = interfaces->iface[i]; in hostapd_remove_iface()
2770 while (k < (interfaces->count - 1)) { in hostapd_remove_iface()
2771 interfaces->iface[k] = in hostapd_remove_iface()
2772 interfaces->iface[k + 1]; in hostapd_remove_iface()
2775 interfaces->count--; in hostapd_remove_iface()
3266 struct hostapd_data * hostapd_get_iface(struct hapd_interfaces *interfaces, in hostapd_get_iface() argument
3271 for (i = 0; i < interfaces->count; i++) { in hostapd_get_iface()
3272 struct hostapd_iface *iface = interfaces->iface[i]; in hostapd_get_iface()