Use hostapd_interface_init2() for all interfaces instead of the
previously used different paths for per-interface-config and
per-BSS-config cases. This moves the calls to hostapd_driver_init() and
hostapd_setup_interface() to happen after all configuration files have
been read.
Signed-hostap: Jouni Malinen <j@w1.fi>
return NULL;
}
- if (hostapd_driver_init(iface) ||
- hostapd_setup_interface(iface)) {
- hostapd_interface_deinit_free(iface);
- return NULL;
- }
-
- iface->init_done = 1;
-
return iface;
}
static int hostapd_interface_init2(struct hostapd_iface *iface)
{
- if (iface->init_done)
- return 0;
-
if (hostapd_driver_init(iface) ||
hostapd_setup_interface(iface))
return -1;
- iface->init_done = 1;
return 0;
}
interfaces->count--;
goto fail;
}
- hapd_iface->init_done = 1;
} else {
/* Assign new BSS with bss[0]'s driver info */
hapd = hapd_iface->bss[hapd_iface->num_bss - 1];
char *config_fname;
struct hostapd_config *conf;
char phy[16]; /* Name of the PHY (radio) */
- int init_done;
size_t num_bss;
struct hostapd_data **bss;