Lines Matching refs:interfaces

53 int hostapd_for_each_interface(struct hapd_interfaces *interfaces,  in hostapd_for_each_interface()  argument
60 for (i = 0; i < interfaces->count; i++) { in hostapd_for_each_interface()
61 ret = cb(interfaces->iface[i], ctx); in hostapd_for_each_interface()
166 if (iface->interfaces == NULL || in hostapd_reload_config()
167 iface->interfaces->config_read_cb == NULL) in hostapd_reload_config()
169 newconf = iface->interfaces->config_read_cb(iface->config_fname); in hostapd_reload_config()
350 if (hapd->iface->interfaces && in hostapd_cleanup()
351 hapd->iface->interfaces->ctrl_iface_deinit) in hostapd_cleanup()
352 hapd->iface->interfaces->ctrl_iface_deinit(hapd); in hostapd_cleanup()
1188 if (!hapd->iface->interfaces || in start_ctrl_iface_bss()
1189 !hapd->iface->interfaces->ctrl_iface_init) in start_ctrl_iface_bss()
1192 if (hapd->iface->interfaces->ctrl_iface_init(hapd)) { in start_ctrl_iface_bss()
1207 if (!iface->interfaces || !iface->interfaces->ctrl_iface_init) in start_ctrl_iface()
1212 if (iface->interfaces->ctrl_iface_init(hapd)) { in start_ctrl_iface()
1361 if (iface->interfaces && iface->interfaces->terminate_on_error) in setup_interface2()
1539 if (iface->interfaces && iface->interfaces->terminate_on_error > 0) in hostapd_setup_interface_complete()
1540 iface->interfaces->terminate_on_error--; in hostapd_setup_interface_complete()
1548 if (iface->interfaces && iface->interfaces->terminate_on_error) in hostapd_setup_interface_complete()
1674 struct hostapd_iface * hostapd_init(struct hapd_interfaces *interfaces, in hostapd_init() argument
1690 conf = interfaces->config_read_cb(hapd_iface->config_fname); in hostapd_init()
1728 static int ifname_in_use(struct hapd_interfaces *interfaces, const char *ifname) in ifname_in_use() argument
1732 for (i = 0; i < interfaces->count; i++) { in ifname_in_use()
1733 struct hostapd_iface *iface = interfaces->iface[i]; in ifname_in_use()
1757 hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy, in hostapd_interface_init_bss() argument
1768 for (i = 0; i < interfaces->count; i++) { in hostapd_interface_init_bss()
1769 if (os_strcmp(interfaces->iface[i]->phy, phy) == 0) { in hostapd_interface_init_bss()
1770 iface = interfaces->iface[i]; in hostapd_interface_init_bss()
1785 conf = interfaces->config_read_cb(config_fname); in hostapd_interface_init_bss()
1795 if (ifname[0] != '\0' && ifname_in_use(interfaces, ifname)) { in hostapd_interface_init_bss()
1836 new_iface = iface = hostapd_init(interfaces, config_fname); in hostapd_interface_init_bss()
1840 iface->interfaces = interfaces; in hostapd_interface_init_bss()
1927 if (hapd_iface->interfaces == NULL || in hostapd_enable_iface()
1928 hapd_iface->interfaces->driver_init == NULL || in hostapd_enable_iface()
1929 hapd_iface->interfaces->driver_init(hapd_iface)) in hostapd_enable_iface()
2008 hostapd_iface_alloc(struct hapd_interfaces *interfaces) in hostapd_iface_alloc() argument
2012 iface = os_realloc_array(interfaces->iface, interfaces->count + 1, in hostapd_iface_alloc()
2016 interfaces->iface = iface; in hostapd_iface_alloc()
2017 hapd_iface = interfaces->iface[interfaces->count] = in hostapd_iface_alloc()
2024 interfaces->count++; in hostapd_iface_alloc()
2025 hapd_iface->interfaces = interfaces; in hostapd_iface_alloc()
2032 hostapd_config_alloc(struct hapd_interfaces *interfaces, const char *ifname, in hostapd_config_alloc() argument
2104 int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf) in hostapd_add_iface() argument
2124 hapd_iface = hostapd_interface_init_bss(interfaces, phy_name, in hostapd_add_iface()
2128 for (j = 0; j < interfaces->count; j++) { in hostapd_add_iface()
2129 if (interfaces->iface[j] == hapd_iface) in hostapd_add_iface()
2132 if (j == interfaces->count) { in hostapd_add_iface()
2134 tmp = os_realloc_array(interfaces->iface, in hostapd_add_iface()
2135 interfaces->count + 1, in hostapd_add_iface()
2141 interfaces->iface = tmp; in hostapd_add_iface()
2142 interfaces->iface[interfaces->count++] = hapd_iface; in hostapd_add_iface()
2147 if (interfaces->driver_init(hapd_iface)) in hostapd_add_iface()
2191 for (i = 0; i < interfaces->count; i++) { in hostapd_add_iface()
2192 if (!os_strcmp(interfaces->iface[i]->conf->bss[0]->iface, in hostapd_add_iface()
2200 hapd_iface = hostapd_iface_alloc(interfaces); in hostapd_add_iface()
2208 if (conf_file && interfaces->config_read_cb) { in hostapd_add_iface()
2209 conf = interfaces->config_read_cb(conf_file); in hostapd_add_iface()
2214 conf = hostapd_config_alloc(interfaces, buf, ptr); in hostapd_add_iface()
2245 if (hapd_iface->interfaces && in hostapd_add_iface()
2246 hapd_iface->interfaces->ctrl_iface_deinit) in hostapd_add_iface()
2247 hapd_iface->interfaces-> in hostapd_add_iface()
2260 interfaces->count--; in hostapd_add_iface()
2261 interfaces->iface[interfaces->count] = NULL; in hostapd_add_iface()
2303 int hostapd_remove_iface(struct hapd_interfaces *interfaces, char *buf) in hostapd_remove_iface() argument
2308 for (i = 0; i < interfaces->count; i++) { in hostapd_remove_iface()
2309 hapd_iface = interfaces->iface[i]; in hostapd_remove_iface()
2320 while (k < (interfaces->count - 1)) { in hostapd_remove_iface()
2321 interfaces->iface[k] = in hostapd_remove_iface()
2322 interfaces->iface[k + 1]; in hostapd_remove_iface()
2325 interfaces->count--; in hostapd_remove_iface()