]> git.ipfire.org Git - thirdparty/hostap.git/blame - wpa_supplicant/sme.c
P2P: Add P2P IE into Probe Request frames
[thirdparty/hostap.git] / wpa_supplicant / sme.c
CommitLineData
c2a04078
JM
1/*
2 * wpa_supplicant - SME
71024cb2 3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
c2a04078
JM
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#include "includes.h"
16
17#include "common.h"
90973fb2 18#include "common/ieee802_11_defs.h"
d9a27b04 19#include "common/ieee802_11_common.h"
c2a04078 20#include "eapol_supp/eapol_supp_sm.h"
90973fb2 21#include "common/wpa_common.h"
3acb5005
JM
22#include "rsn_supp/wpa.h"
23#include "rsn_supp/pmksa_cache.h"
c2a04078
JM
24#include "config.h"
25#include "wpa_supplicant_i.h"
2d5b792d 26#include "driver_i.h"
c2a04078
JM
27#include "wpas_glue.h"
28#include "wps_supplicant.h"
8bac466b 29#include "notify.h"
76d11d3f 30#include "blacklist.h"
6fa81a3b 31#include "bss.h"
9ba9fa07 32#include "scan.h"
c2a04078
JM
33#include "sme.h"
34
35void sme_authenticate(struct wpa_supplicant *wpa_s,
6fa81a3b 36 struct wpa_bss *bss, struct wpa_ssid *ssid)
c2a04078
JM
37{
38 struct wpa_driver_auth_params params;
8bac466b 39 struct wpa_ssid *old_ssid;
fdbe50ed 40#ifdef CONFIG_IEEE80211R
c2a04078 41 const u8 *ie;
fdbe50ed 42#endif /* CONFIG_IEEE80211R */
c2a04078
JM
43#ifdef CONFIG_IEEE80211R
44 const u8 *md = NULL;
45#endif /* CONFIG_IEEE80211R */
8bac466b 46 int i, bssid_changed;
c2a04078
JM
47
48 if (bss == NULL) {
49 wpa_printf(MSG_ERROR, "SME: No scan result available for the "
50 "network");
51 return;
52 }
53
8f770587
JM
54 wpa_s->current_bss = bss;
55
c2a04078
JM
56 os_memset(&params, 0, sizeof(params));
57 wpa_s->reassociate = 0;
58
59 params.freq = bss->freq;
60 params.bssid = bss->bssid;
6fa81a3b
JM
61 params.ssid = bss->ssid;
62 params.ssid_len = bss->ssid_len;
c2a04078 63
62fa124c
JM
64 if (wpa_s->sme.ssid_len != params.ssid_len ||
65 os_memcmp(wpa_s->sme.ssid, params.ssid, params.ssid_len) != 0)
66 wpa_s->sme.prev_bssid_set = 0;
67
c2a04078
JM
68 wpa_s->sme.freq = params.freq;
69 os_memcpy(wpa_s->sme.ssid, params.ssid, params.ssid_len);
70 wpa_s->sme.ssid_len = params.ssid_len;
71
abd9fafa 72 params.auth_alg = WPA_AUTH_ALG_OPEN;
c2a04078
JM
73#ifdef IEEE8021X_EAPOL
74 if (ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA) {
75 if (ssid->leap) {
76 if (ssid->non_leap == 0)
abd9fafa 77 params.auth_alg = WPA_AUTH_ALG_LEAP;
c2a04078 78 else
abd9fafa 79 params.auth_alg |= WPA_AUTH_ALG_LEAP;
c2a04078
JM
80 }
81 }
82#endif /* IEEE8021X_EAPOL */
83 wpa_printf(MSG_DEBUG, "Automatic auth_alg selection: 0x%x",
84 params.auth_alg);
85 if (ssid->auth_alg) {
abd9fafa 86 params.auth_alg = ssid->auth_alg;
c2a04078
JM
87 wpa_printf(MSG_DEBUG, "Overriding auth_alg selection: 0x%x",
88 params.auth_alg);
89 }
90
a0b2f99b
JM
91 for (i = 0; i < NUM_WEP_KEYS; i++) {
92 if (ssid->wep_key_len[i])
93 params.wep_key[i] = ssid->wep_key[i];
94 params.wep_key_len[i] = ssid->wep_key_len[i];
95 }
96 params.wep_tx_keyidx = ssid->wep_tx_keyidx;
97
8bac466b 98 bssid_changed = !is_zero_ether_addr(wpa_s->bssid);
c2a04078
JM
99 os_memset(wpa_s->bssid, 0, ETH_ALEN);
100 os_memcpy(wpa_s->pending_bssid, bss->bssid, ETH_ALEN);
8bac466b
JM
101 if (bssid_changed)
102 wpas_notify_bssid_changed(wpa_s);
c2a04078 103
f337f0e9
JM
104 if ((wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) ||
105 wpa_bss_get_ie(bss, WLAN_EID_RSN)) &&
c2a04078
JM
106 (ssid->key_mgmt & (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_PSK |
107 WPA_KEY_MGMT_FT_IEEE8021X |
108 WPA_KEY_MGMT_FT_PSK |
109 WPA_KEY_MGMT_IEEE8021X_SHA256 |
110 WPA_KEY_MGMT_PSK_SHA256))) {
111 int try_opportunistic;
112 try_opportunistic = ssid->proactive_key_caching &&
113 (ssid->proto & WPA_PROTO_RSN);
114 if (pmksa_cache_set_current(wpa_s->wpa, NULL, bss->bssid,
115 wpa_s->current_ssid,
116 try_opportunistic) == 0)
117 eapol_sm_notify_pmkid_attempt(wpa_s->eapol, 1);
118 wpa_s->sme.assoc_req_ie_len = sizeof(wpa_s->sme.assoc_req_ie);
119 if (wpa_supplicant_set_suites(wpa_s, bss, ssid,
120 wpa_s->sme.assoc_req_ie,
121 &wpa_s->sme.assoc_req_ie_len)) {
122 wpa_printf(MSG_WARNING, "SME: Failed to set WPA key "
123 "management and encryption suites");
124 return;
125 }
126 } else if (ssid->key_mgmt &
127 (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X |
128 WPA_KEY_MGMT_WPA_NONE | WPA_KEY_MGMT_FT_PSK |
129 WPA_KEY_MGMT_FT_IEEE8021X | WPA_KEY_MGMT_PSK_SHA256 |
130 WPA_KEY_MGMT_IEEE8021X_SHA256)) {
131 wpa_s->sme.assoc_req_ie_len = sizeof(wpa_s->sme.assoc_req_ie);
132 if (wpa_supplicant_set_suites(wpa_s, NULL, ssid,
133 wpa_s->sme.assoc_req_ie,
134 &wpa_s->sme.assoc_req_ie_len)) {
135 wpa_printf(MSG_WARNING, "SME: Failed to set WPA key "
136 "management and encryption suites (no scan "
137 "results)");
138 return;
139 }
140#ifdef CONFIG_WPS
141 } else if (ssid->key_mgmt & WPA_KEY_MGMT_WPS) {
142 struct wpabuf *wps_ie;
143 wps_ie = wps_build_assoc_req_ie(wpas_wps_get_req_type(ssid));
144 if (wps_ie && wpabuf_len(wps_ie) <=
145 sizeof(wpa_s->sme.assoc_req_ie)) {
146 wpa_s->sme.assoc_req_ie_len = wpabuf_len(wps_ie);
147 os_memcpy(wpa_s->sme.assoc_req_ie, wpabuf_head(wps_ie),
148 wpa_s->sme.assoc_req_ie_len);
149 } else
150 wpa_s->sme.assoc_req_ie_len = 0;
151 wpabuf_free(wps_ie);
152 wpa_supplicant_set_non_wpa_policy(wpa_s, ssid);
153#endif /* CONFIG_WPS */
154 } else {
155 wpa_supplicant_set_non_wpa_policy(wpa_s, ssid);
156 wpa_s->sme.assoc_req_ie_len = 0;
157 }
158
159#ifdef CONFIG_IEEE80211R
6fa81a3b 160 ie = wpa_bss_get_ie(bss, WLAN_EID_MOBILITY_DOMAIN);
c2a04078
JM
161 if (ie && ie[1] >= MOBILITY_DOMAIN_ID_LEN)
162 md = ie + 2;
e7846b68 163 wpa_sm_set_ft_params(wpa_s->wpa, ie, ie ? 2 + ie[1] : 0);
c2a04078
JM
164 if (md) {
165 /* Prepare for the next transition */
76b7981d 166 wpa_ft_prepare_auth_request(wpa_s->wpa, ie);
c2a04078
JM
167 }
168
169 if (md && ssid->key_mgmt & (WPA_KEY_MGMT_FT_PSK |
170 WPA_KEY_MGMT_FT_IEEE8021X)) {
171 if (wpa_s->sme.assoc_req_ie_len + 5 <
172 sizeof(wpa_s->sme.assoc_req_ie)) {
173 struct rsn_mdie *mdie;
174 u8 *pos = wpa_s->sme.assoc_req_ie +
175 wpa_s->sme.assoc_req_ie_len;
176 *pos++ = WLAN_EID_MOBILITY_DOMAIN;
177 *pos++ = sizeof(*mdie);
178 mdie = (struct rsn_mdie *) pos;
179 os_memcpy(mdie->mobility_domain, md,
180 MOBILITY_DOMAIN_ID_LEN);
f4ec630d 181 mdie->ft_capab = md[MOBILITY_DOMAIN_ID_LEN];
c2a04078
JM
182 wpa_s->sme.assoc_req_ie_len += 5;
183 }
184
185 if (wpa_s->sme.ft_used &&
0d7b4409
JM
186 os_memcmp(md, wpa_s->sme.mobility_domain, 2) == 0 &&
187 wpa_sm_has_ptk(wpa_s->wpa)) {
c2a04078
JM
188 wpa_printf(MSG_DEBUG, "SME: Trying to use FT "
189 "over-the-air");
abd9fafa 190 params.auth_alg = WPA_AUTH_ALG_FT;
c2a04078
JM
191 params.ie = wpa_s->sme.ft_ies;
192 params.ie_len = wpa_s->sme.ft_ies_len;
193 }
194 }
195#endif /* CONFIG_IEEE80211R */
196
197#ifdef CONFIG_IEEE80211W
70f8cc8e 198 wpa_s->sme.mfp = ssid->ieee80211w;
f337f0e9 199 if (ssid->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
6fa81a3b 200 const u8 *rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
c2a04078
JM
201 struct wpa_ie_data _ie;
202 if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &_ie) == 0 &&
203 _ie.capabilities &
204 (WPA_CAPABILITY_MFPC | WPA_CAPABILITY_MFPR)) {
205 wpa_printf(MSG_DEBUG, "WPA: Selected AP supports MFP: "
206 "require MFP");
207 wpa_s->sme.mfp = MGMT_FRAME_PROTECTION_REQUIRED;
208 }
209 }
210#endif /* CONFIG_IEEE80211W */
211
212 wpa_supplicant_cancel_scan(wpa_s);
213
214 wpa_msg(wpa_s, MSG_INFO, "Trying to authenticate with " MACSTR
215 " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
216 wpa_ssid_txt(params.ssid, params.ssid_len), params.freq);
217
218 wpa_clear_keys(wpa_s, bss->bssid);
219 wpa_supplicant_set_state(wpa_s, WPA_AUTHENTICATING);
8bac466b 220 old_ssid = wpa_s->current_ssid;
c2a04078
JM
221 wpa_s->current_ssid = ssid;
222 wpa_supplicant_rsn_supp_set_config(wpa_s, wpa_s->current_ssid);
223 wpa_supplicant_initiate_eapol(wpa_s);
8bac466b
JM
224 if (old_ssid != wpa_s->current_ssid)
225 wpas_notify_network_changed(wpa_s);
c2a04078 226
62c72d72 227 wpa_s->sme.auth_alg = params.auth_alg;
c2a04078
JM
228 if (wpa_drv_authenticate(wpa_s, &params) < 0) {
229 wpa_msg(wpa_s, MSG_INFO, "Authentication request to the "
230 "driver failed");
6e3f7173 231 wpa_supplicant_req_scan(wpa_s, 1, 0);
c2a04078
JM
232 return;
233 }
234
235 /* TODO: add timeout on authentication */
236
237 /*
238 * Association will be started based on the authentication event from
239 * the driver.
240 */
241}
242
243
244void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
245{
c2a04078
JM
246 struct wpa_ssid *ssid = wpa_s->current_ssid;
247
248 if (ssid == NULL) {
249 wpa_printf(MSG_DEBUG, "SME: Ignore authentication event when "
250 "network is not selected");
251 return;
252 }
253
254 if (wpa_s->wpa_state != WPA_AUTHENTICATING) {
255 wpa_printf(MSG_DEBUG, "SME: Ignore authentication event when "
256 "not in authenticating state");
257 return;
258 }
259
260 if (os_memcmp(wpa_s->pending_bssid, data->auth.peer, ETH_ALEN) != 0) {
261 wpa_printf(MSG_DEBUG, "SME: Ignore authentication with "
262 "unexpected peer " MACSTR,
263 MAC2STR(data->auth.peer));
264 return;
265 }
266
267 wpa_printf(MSG_DEBUG, "SME: Authentication response: peer=" MACSTR
268 " auth_type=%d status_code=%d",
269 MAC2STR(data->auth.peer), data->auth.auth_type,
270 data->auth.status_code);
271 wpa_hexdump(MSG_MSGDUMP, "SME: Authentication response IEs",
272 data->auth.ies, data->auth.ies_len);
273
274 if (data->auth.status_code != WLAN_STATUS_SUCCESS) {
275 wpa_printf(MSG_DEBUG, "SME: Authentication failed (status "
276 "code %d)", data->auth.status_code);
cb1583f6
SO
277
278 if (data->auth.status_code !=
279 WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG ||
280 wpa_s->sme.auth_alg == data->auth.auth_type ||
281 wpa_s->current_ssid->auth_alg == WPA_AUTH_ALG_LEAP)
282 return;
283
284 switch (data->auth.auth_type) {
285 case WLAN_AUTH_OPEN:
286 wpa_s->current_ssid->auth_alg = WPA_AUTH_ALG_SHARED;
287
288 wpa_printf(MSG_DEBUG, "SME: Trying SHARED auth");
289 wpa_supplicant_associate(wpa_s, wpa_s->current_bss,
290 wpa_s->current_ssid);
291 return;
292
293 case WLAN_AUTH_SHARED_KEY:
294 wpa_s->current_ssid->auth_alg = WPA_AUTH_ALG_LEAP;
295
296 wpa_printf(MSG_DEBUG, "SME: Trying LEAP auth");
297 wpa_supplicant_associate(wpa_s, wpa_s->current_bss,
298 wpa_s->current_ssid);
299 return;
300
301 default:
302 return;
303 }
c2a04078
JM
304 }
305
306#ifdef CONFIG_IEEE80211R
307 if (data->auth.auth_type == WLAN_AUTH_FT) {
308 union wpa_event_data edata;
309 os_memset(&edata, 0, sizeof(edata));
310 edata.ft_ies.ies = data->auth.ies;
311 edata.ft_ies.ies_len = data->auth.ies_len;
312 os_memcpy(edata.ft_ies.target_ap, data->auth.peer, ETH_ALEN);
313 wpa_supplicant_event(wpa_s, EVENT_FT_RESPONSE, &edata);
314 }
315#endif /* CONFIG_IEEE80211R */
316
71024cb2
JM
317 sme_associate(wpa_s, ssid->mode, data->auth.peer,
318 data->auth.auth_type);
319}
320
321
322void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
323 const u8 *bssid, u16 auth_type)
324{
325 struct wpa_driver_associate_params params;
d9a27b04 326 struct ieee802_11_elems elems;
71024cb2 327
c2a04078 328 os_memset(&params, 0, sizeof(params));
71024cb2 329 params.bssid = bssid;
c2a04078
JM
330 params.ssid = wpa_s->sme.ssid;
331 params.ssid_len = wpa_s->sme.ssid_len;
332 params.freq = wpa_s->sme.freq;
333 params.wpa_ie = wpa_s->sme.assoc_req_ie_len ?
334 wpa_s->sme.assoc_req_ie : NULL;
335 params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len;
336#ifdef CONFIG_IEEE80211R
71024cb2 337 if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) {
c2a04078
JM
338 params.wpa_ie = wpa_s->sme.ft_ies;
339 params.wpa_ie_len = wpa_s->sme.ft_ies_len;
340 }
341#endif /* CONFIG_IEEE80211R */
71024cb2 342 params.mode = mode;
c2a04078 343 params.mgmt_frame_protection = wpa_s->sme.mfp;
62fa124c
JM
344 if (wpa_s->sme.prev_bssid_set)
345 params.prev_bssid = wpa_s->sme.prev_bssid;
c2a04078
JM
346
347 wpa_msg(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
348 " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
349 params.ssid ? wpa_ssid_txt(params.ssid, params.ssid_len) : "",
350 params.freq);
351
352 wpa_supplicant_set_state(wpa_s, WPA_ASSOCIATING);
353
9efc3f2a
JM
354 if (params.wpa_ie == NULL ||
355 ieee802_11_parse_elems(params.wpa_ie, params.wpa_ie_len, &elems, 0)
d9a27b04
JM
356 < 0) {
357 wpa_printf(MSG_DEBUG, "SME: Could not parse own IEs?!");
358 os_memset(&elems, 0, sizeof(elems));
359 }
360 if (elems.rsn_ie)
361 wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, elems.rsn_ie - 2,
362 elems.rsn_ie_len + 2);
363 else if (elems.wpa_ie)
364 wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, elems.wpa_ie - 2,
365 elems.wpa_ie_len + 2);
366 else
367 wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, NULL, 0);
6e3f4b89
JM
368 if (elems.p2p &&
369 (wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE))
370 params.p2p = 1;
d9a27b04 371
c2a04078
JM
372 if (wpa_drv_associate(wpa_s, &params) < 0) {
373 wpa_msg(wpa_s, MSG_INFO, "Association request to the driver "
374 "failed");
b85e7724 375 wpa_supplicant_req_scan(wpa_s, 5, 0);
c2a04078
JM
376 return;
377 }
378
379 /* TODO: add timeout on association */
380}
381
382
383int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
384 const u8 *ies, size_t ies_len)
385{
386 if (md == NULL || ies == NULL) {
387 wpa_printf(MSG_DEBUG, "SME: Remove mobility domain");
388 os_free(wpa_s->sme.ft_ies);
389 wpa_s->sme.ft_ies = NULL;
390 wpa_s->sme.ft_ies_len = 0;
391 wpa_s->sme.ft_used = 0;
392 return 0;
393 }
394
395 os_memcpy(wpa_s->sme.mobility_domain, md, MOBILITY_DOMAIN_ID_LEN);
396 wpa_hexdump(MSG_DEBUG, "SME: FT IEs", ies, ies_len);
397 os_free(wpa_s->sme.ft_ies);
398 wpa_s->sme.ft_ies = os_malloc(ies_len);
399 if (wpa_s->sme.ft_ies == NULL)
400 return -1;
401 os_memcpy(wpa_s->sme.ft_ies, ies, ies_len);
402 wpa_s->sme.ft_ies_len = ies_len;
403 return 0;
404}
efa46078
JM
405
406
407void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
408 union wpa_event_data *data)
409{
8bac466b 410 int bssid_changed;
76d11d3f 411 int timeout = 5000;
8bac466b 412
76d11d3f
JM
413 wpa_printf(MSG_DEBUG, "SME: Association with " MACSTR " failed: "
414 "status code %d", MAC2STR(wpa_s->pending_bssid),
efa46078
JM
415 data->assoc_reject.status_code);
416
8bac466b 417 bssid_changed = !is_zero_ether_addr(wpa_s->bssid);
76d11d3f
JM
418
419 /*
420 * For now, unconditionally terminate the previous authentication. In
421 * theory, this should not be needed, but mac80211 gets quite confused
422 * if the authentication is left pending.. Some roaming cases might
423 * benefit from using the previous authentication, so this could be
424 * optimized in the future.
425 */
426 if (wpa_drv_deauthenticate(wpa_s, wpa_s->pending_bssid,
427 WLAN_REASON_DEAUTH_LEAVING) < 0) {
428 wpa_msg(wpa_s, MSG_INFO,
429 "Deauth request to the driver failed");
430 }
62fa124c 431 wpa_s->sme.prev_bssid_set = 0;
76d11d3f
JM
432
433 if (wpa_blacklist_add(wpa_s, wpa_s->pending_bssid) == 0) {
434 struct wpa_blacklist *b;
435 b = wpa_blacklist_get(wpa_s, wpa_s->pending_bssid);
436 if (b && b->count < 3) {
437 /*
438 * Speed up next attempt if there could be other APs
439 * that could accept association.
440 */
441 timeout = 100;
442 }
443 }
444 wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
efa46078
JM
445 os_memset(wpa_s->bssid, 0, ETH_ALEN);
446 os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
8bac466b
JM
447 if (bssid_changed)
448 wpas_notify_bssid_changed(wpa_s);
efa46078
JM
449
450 /*
451 * TODO: if more than one possible AP is available in scan results,
452 * could try the other ones before requesting a new scan.
453 */
76d11d3f
JM
454 wpa_supplicant_req_scan(wpa_s, timeout / 1000,
455 1000 * (timeout % 1000));
efa46078 456}
da1fb17c
JM
457
458
459void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
460 union wpa_event_data *data)
461{
462 wpa_printf(MSG_DEBUG, "SME: Authentication timed out");
463 wpa_supplicant_req_scan(wpa_s, 5, 0);
464}
465
466
467void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
468 union wpa_event_data *data)
469{
470 wpa_printf(MSG_DEBUG, "SME: Association timed out");
471 wpa_supplicant_mark_disassoc(wpa_s);
472 wpa_supplicant_req_scan(wpa_s, 5, 0);
473}
a84ed99e
JM
474
475
476void sme_event_disassoc(struct wpa_supplicant *wpa_s,
477 union wpa_event_data *data)
478{
479 wpa_printf(MSG_DEBUG, "SME: Disassociation event received");
7e26053a 480 if (wpa_s->sme.prev_bssid_set &&
a84ed99e
JM
481 !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)) {
482 /*
483 * cfg80211/mac80211 can get into somewhat confused state if
484 * the AP only disassociates us and leaves us in authenticated
485 * state. For now, force the state to be cleared to avoid
486 * confusing errors if we try to associate with the AP again.
487 */
488 wpa_printf(MSG_DEBUG, "SME: Deauthenticate to clear driver "
489 "state");
7e26053a 490 wpa_drv_deauthenticate(wpa_s, wpa_s->sme.prev_bssid,
a84ed99e
JM
491 WLAN_REASON_DEAUTH_LEAVING);
492 }
493}