From 59ddf221c8eee00d080c532374be4f463d6ade80 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 27 Oct 2010 20:27:39 +0300 Subject: [PATCH] Add BSSID to association rejected events --- src/drivers/driver.h | 9 +++++++-- src/drivers/driver_nl80211.c | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 4bdc13d9e..6d9f55cb6 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2071,7 +2071,7 @@ enum wpa_event_type { * EVENT_ASSOC_REJECT - Association rejected * * This event should be called when (re)association attempt has been - * rejected by the AP. Information about authentication result is + * rejected by the AP. Information about the association response is * included in union wpa_event_data::assoc_reject. */ EVENT_ASSOC_REJECT, @@ -2443,6 +2443,11 @@ union wpa_event_data { * struct assoc_reject - Data for EVENT_ASSOC_REJECT events */ struct assoc_reject { + /** + * bssid - BSSID of the AP that rejected association + */ + const u8 *bssid; + /** * resp_ies - (Re)Association Response IEs * @@ -2454,7 +2459,7 @@ union wpa_event_data { * This should start with the first IE (fixed fields before IEs * are not included). */ - u8 *resp_ies; + const u8 *resp_ies; /** * resp_ies_len - Length of resp_ies in bytes diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 352ecd590..c17240960 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -592,6 +592,7 @@ static void mlme_event_assoc(struct wpa_driver_nl80211_data *drv, status = le_to_host16(mgmt->u.assoc_resp.status_code); if (status != WLAN_STATUS_SUCCESS) { os_memset(&event, 0, sizeof(event)); + event.assoc_reject.bssid = mgmt->bssid; if (len > 24 + sizeof(mgmt->u.assoc_resp)) { event.assoc_reject.resp_ies = (u8 *) mgmt->u.assoc_resp.variable;