aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-11-28 16:11:16 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-09 19:14:46 (GMT)
commita81ca7ee2a0a53d5bc9c19fa7e8e910e95a89964 (patch)
tree7a0900af3e6fa996d95f6cfc7c0f203c81774aa3 /wpa_supplicant/wpa_supplicant.c
parent49198bb3eb202a8488169354f25f699aac36aa46 (diff)
downloadhostap-06-a81ca7ee2a0a53d5bc9c19fa7e8e910e95a89964.zip
hostap-06-a81ca7ee2a0a53d5bc9c19fa7e8e910e95a89964.tar.gz
hostap-06-a81ca7ee2a0a53d5bc9c19fa7e8e910e95a89964.tar.bz2
Fix init2() driver_ops to get the correct global driver context
Need to provide the private driver context, not the wpa_supplicant global context, in init2() call. (this is a backported version of 8a5ab9f5e56cd2f5781c2d92f41495e60d544780 and d8222ae38c3be3fba794462d11fed8b57590c7f5)
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 26fd9c3..3a5c7cb 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1479,12 +1479,14 @@ static int wpa_supplicant_set_driver(struct wpa_supplicant *wpa_s,
if (name == NULL) {
/* default to first driver in the list */
wpa_s->driver = wpa_supplicant_drivers[0];
+ wpa_s->global_drv_priv = wpa_s->global->drv_priv[0];
return 0;
}
for (i = 0; wpa_supplicant_drivers[i]; i++) {
if (os_strcmp(name, wpa_supplicant_drivers[i]->name) == 0) {
wpa_s->driver = wpa_supplicant_drivers[i];
+ wpa_s->global_drv_priv = wpa_s->global->drv_priv[i];
return 0;
}
}
@@ -1944,6 +1946,8 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
if (wpa_s == NULL)
return NULL;
+ wpa_s->global = global;
+
if (wpa_supplicant_init_iface(wpa_s, iface) ||
wpa_supplicant_init_iface2(wpa_s)) {
wpa_printf(MSG_DEBUG, "Failed to add interface %s",
@@ -1953,8 +1957,6 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
return NULL;
}
- wpa_s->global = global;
-
/* Register the interface with the dbus control interface */
if (wpas_dbus_register_iface(wpa_s)) {
wpa_supplicant_deinit_iface(wpa_s);