Add an optional set_mode() driver_ops handler for setting mode before keys
authorDan Williams <dcbw@redhat.com>
Mon, 29 Sep 2008 13:45:49 +0000 (16:45 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 29 Sep 2008 13:45:49 +0000 (16:45 +0300)
commitec5f180a24cd31ba9d3d7f2abc9dc557fd16602f
treee2d7399d688bdc38a77dcbdf58eb1fcb07f9f348
parent1a647aaa691d91c4a5ffccce09291592c4340062
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.
src/drivers/driver.h
src/drivers/driver_ndis.c
src/drivers/driver_nl80211.c
src/drivers/driver_test.c
src/drivers/driver_wext.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h