Add BSSID to association rejected events

This commit is contained in:
Jouni Malinen 2010-10-27 20:27:39 +03:00 committed by Jouni Malinen
parent 10c4edde6e
commit 59ddf221c8
2 changed files with 8 additions and 2 deletions

View File

@ -2071,7 +2071,7 @@ enum wpa_event_type {
* EVENT_ASSOC_REJECT - Association rejected * EVENT_ASSOC_REJECT - Association rejected
* *
* This event should be called when (re)association attempt has been * 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. * included in union wpa_event_data::assoc_reject.
*/ */
EVENT_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 - Data for EVENT_ASSOC_REJECT events
*/ */
struct assoc_reject { struct assoc_reject {
/**
* bssid - BSSID of the AP that rejected association
*/
const u8 *bssid;
/** /**
* resp_ies - (Re)Association Response IEs * 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 * This should start with the first IE (fixed fields before IEs
* are not included). * are not included).
*/ */
u8 *resp_ies; const u8 *resp_ies;
/** /**
* resp_ies_len - Length of resp_ies in bytes * resp_ies_len - Length of resp_ies in bytes

View File

@ -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); status = le_to_host16(mgmt->u.assoc_resp.status_code);
if (status != WLAN_STATUS_SUCCESS) { if (status != WLAN_STATUS_SUCCESS) {
os_memset(&event, 0, sizeof(event)); os_memset(&event, 0, sizeof(event));
event.assoc_reject.bssid = mgmt->bssid;
if (len > 24 + sizeof(mgmt->u.assoc_resp)) { if (len > 24 + sizeof(mgmt->u.assoc_resp)) {
event.assoc_reject.resp_ies = event.assoc_reject.resp_ies =
(u8 *) mgmt->u.assoc_resp.variable; (u8 *) mgmt->u.assoc_resp.variable;