aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_wext.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-09-29 13:45:49 (GMT)
committerJouni Malinen <j@w1.fi>2008-09-29 13:45:49 (GMT)
commitec5f180a24cd31ba9d3d7f2abc9dc557fd16602f (patch)
treee2d7399d688bdc38a77dcbdf58eb1fcb07f9f348 /src/drivers/driver_wext.c
parent1a647aaa691d91c4a5ffccce09291592c4340062 (diff)
downloadhostap-ec5f180a24cd31ba9d3d7f2abc9dc557fd16602f.zip
hostap-ec5f180a24cd31ba9d3d7f2abc9dc557fd16602f.tar.gz
hostap-ec5f180a24cd31ba9d3d7f2abc9dc557fd16602f.tar.bz2
Add an optional set_mode() driver_ops handler for setting mode before keys
A bug just got reported as a result of this for mac80211 drivers. https://bugzilla.redhat.com/show_bug.cgi?id=459399 The basic problem is that since taking the device down clears the keys from the driver on many mac80211-based cards, and since the mode gets set _after_ the keys have been set in the driver, the keys get cleared on a mode switch and the resulting association is wrong. The report is about ad-hoc mode specifically, but this could happen when switching from adhoc back to managed mode.
Diffstat (limited to 'src/drivers/driver_wext.c')
-rw-r--r--src/drivers/driver_wext.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 6b7f1a7..a618a74 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -2206,8 +2206,6 @@ int wpa_driver_wext_associate(void *priv,
wpa_driver_wext_set_bssid(drv, NULL) < 0)
ret = -1;
- if (wpa_driver_wext_set_mode(drv, params->mode) < 0)
- ret = -1;
/* TODO: should consider getting wpa version and cipher/key_mgmt suites
* from configuration, not from here, where only the selected suite is
* available */
@@ -2782,6 +2780,7 @@ const struct wpa_driver_ops wpa_driver_wext_ops = {
.get_scan_results2 = wpa_driver_wext_get_scan_results,
.deauthenticate = wpa_driver_wext_deauthenticate,
.disassociate = wpa_driver_wext_disassociate,
+ .set_mode = wpa_driver_wext_set_mode,
.associate = wpa_driver_wext_associate,
.set_auth_alg = wpa_driver_wext_set_auth_alg,
.init = wpa_driver_wext_init,