Lines Matching refs:global
533 struct wpa_global *global = eloop_ctx; in wpa_supplicant_terminate() local
535 for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) { in wpa_supplicant_terminate()
624 struct wpa_global *global = eloop_ctx; in wpa_supplicant_reconfig() local
627 for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) { in wpa_supplicant_reconfig()
1529 wpa_s->global_drv_priv = wpa_s->global->drv_priv[0]; in wpa_supplicant_set_driver()
1536 wpa_s->global_drv_priv = wpa_s->global->drv_priv[i]; in wpa_supplicant_set_driver()
1984 struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global, in wpa_supplicant_add_iface() argument
1989 if (global == NULL || iface == NULL) in wpa_supplicant_add_iface()
1996 wpa_s->global = global; in wpa_supplicant_add_iface()
2024 wpa_s->next = global->ifaces; in wpa_supplicant_add_iface()
2025 global->ifaces = wpa_s; in wpa_supplicant_add_iface()
2044 int wpa_supplicant_remove_iface(struct wpa_global *global, in wpa_supplicant_remove_iface() argument
2050 prev = global->ifaces; in wpa_supplicant_remove_iface()
2052 global->ifaces = wpa_s->next; in wpa_supplicant_remove_iface()
2076 struct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global, in wpa_supplicant_get_iface() argument
2081 for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) { in wpa_supplicant_get_iface()
2100 struct wpa_global *global; in wpa_supplicant_init() local
2117 global = os_zalloc(sizeof(*global)); in wpa_supplicant_init()
2118 if (global == NULL) in wpa_supplicant_init()
2120 global->params.daemonize = params->daemonize; in wpa_supplicant_init()
2121 global->params.wait_for_monitor = params->wait_for_monitor; in wpa_supplicant_init()
2122 global->params.dbus_ctrl_interface = params->dbus_ctrl_interface; in wpa_supplicant_init()
2124 global->params.pid_file = os_strdup(params->pid_file); in wpa_supplicant_init()
2126 global->params.ctrl_interface = in wpa_supplicant_init()
2128 wpa_debug_level = global->params.wpa_debug_level = in wpa_supplicant_init()
2130 wpa_debug_show_keys = global->params.wpa_debug_show_keys = in wpa_supplicant_init()
2132 wpa_debug_timestamp = global->params.wpa_debug_timestamp = in wpa_supplicant_init()
2135 if (eloop_init(global)) { in wpa_supplicant_init()
2137 wpa_supplicant_deinit(global); in wpa_supplicant_init()
2141 global->ctrl_iface = wpa_supplicant_global_ctrl_iface_init(global); in wpa_supplicant_init()
2142 if (global->ctrl_iface == NULL) { in wpa_supplicant_init()
2143 wpa_supplicant_deinit(global); in wpa_supplicant_init()
2147 if (global->params.dbus_ctrl_interface) { in wpa_supplicant_init()
2148 global->dbus_ctrl_iface = in wpa_supplicant_init()
2149 wpa_supplicant_dbus_ctrl_iface_init(global); in wpa_supplicant_init()
2150 if (global->dbus_ctrl_iface == NULL) { in wpa_supplicant_init()
2151 wpa_supplicant_deinit(global); in wpa_supplicant_init()
2157 global->drv_count++; in wpa_supplicant_init()
2158 if (global->drv_count == 0) { in wpa_supplicant_init()
2160 wpa_supplicant_deinit(global); in wpa_supplicant_init()
2163 global->drv_priv = os_zalloc(global->drv_count * sizeof(void *)); in wpa_supplicant_init()
2164 if (global->drv_priv == NULL) { in wpa_supplicant_init()
2165 wpa_supplicant_deinit(global); in wpa_supplicant_init()
2171 global->drv_priv[i] = wpa_supplicant_drivers[i]->global_init(); in wpa_supplicant_init()
2172 if (global->drv_priv[i] == NULL) { in wpa_supplicant_init()
2175 wpa_supplicant_deinit(global); in wpa_supplicant_init()
2180 return global; in wpa_supplicant_init()
2193 int wpa_supplicant_run(struct wpa_global *global) in wpa_supplicant_run() argument
2197 if (global->params.daemonize && in wpa_supplicant_run()
2198 wpa_supplicant_daemon(global->params.pid_file)) in wpa_supplicant_run()
2201 if (global->params.wait_for_monitor) { in wpa_supplicant_run()
2202 for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) in wpa_supplicant_run()
2224 void wpa_supplicant_deinit(struct wpa_global *global) in wpa_supplicant_deinit() argument
2228 if (global == NULL) in wpa_supplicant_deinit()
2231 wpa_supplicant_terminate(0, global, NULL); in wpa_supplicant_deinit()
2233 while (global->ifaces) in wpa_supplicant_deinit()
2234 wpa_supplicant_remove_iface(global, global->ifaces); in wpa_supplicant_deinit()
2236 if (global->ctrl_iface) in wpa_supplicant_deinit()
2237 wpa_supplicant_global_ctrl_iface_deinit(global->ctrl_iface); in wpa_supplicant_deinit()
2238 if (global->dbus_ctrl_iface) in wpa_supplicant_deinit()
2239 wpa_supplicant_dbus_ctrl_iface_deinit(global->dbus_ctrl_iface); in wpa_supplicant_deinit()
2243 for (i = 0; wpa_supplicant_drivers[i] && global->drv_priv; i++) { in wpa_supplicant_deinit()
2244 if (!global->drv_priv[i]) in wpa_supplicant_deinit()
2246 wpa_supplicant_drivers[i]->global_deinit(global->drv_priv[i]); in wpa_supplicant_deinit()
2248 os_free(global->drv_priv); in wpa_supplicant_deinit()
2252 if (global->params.pid_file) { in wpa_supplicant_deinit()
2253 os_daemonize_terminate(global->params.pid_file); in wpa_supplicant_deinit()
2254 os_free(global->params.pid_file); in wpa_supplicant_deinit()
2256 os_free(global->params.ctrl_interface); in wpa_supplicant_deinit()
2258 os_free(global); in wpa_supplicant_deinit()