aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-05-07 14:36:40 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-07 14:36:40 (GMT)
commit66562e9c7530f85ee9970da10ef5ae96be4f1b10 (patch)
tree98dbad69fe16cf8ffcd12ee15df60fa41868ef6b /wpa_supplicant/events.c
parent55293aaf4e412689754940c30b4e59b1de3533cc (diff)
downloadhostap-66562e9c7530f85ee9970da10ef5ae96be4f1b10.zip
hostap-66562e9c7530f85ee9970da10ef5ae96be4f1b10.tar.gz
hostap-66562e9c7530f85ee9970da10ef5ae96be4f1b10.tar.bz2
Use cached driver capabilities instead of new fetch for each operation
There is no need to repeat the driver capability fetch for each operation since we already cache driver flags in wpa_s->drv_flags. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 887acb2..f0f5d1c 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1676,7 +1676,6 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
{
u8 bssid[ETH_ALEN];
int ft_completed;
- struct wpa_driver_capa capa;
#ifdef CONFIG_AP
if (wpa_s->ap_iface) {
@@ -1838,8 +1837,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
if ((wpa_s->key_mgmt == WPA_KEY_MGMT_NONE ||
wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA) &&
- wpa_s->current_ssid && wpa_drv_get_capa(wpa_s, &capa) == 0 &&
- capa.flags & WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE) {
+ wpa_s->current_ssid &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE)) {
/* Set static WEP keys again */
wpa_set_wep_keys(wpa_s, wpa_s->current_ssid);
}