From 1cbe86e2d6d2b5a7d072093ce1a94082b4b3f472 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 11 May 2012 15:30:05 +0300 Subject: [PATCH] Add debug prints of scan result IEs Excessive debug level can now be used to dump the IEs received in scan results from both Beacon and Probe Response frames. This makes it easier to debug issues where the driver (or well, more likely cfg80211) does not update the IEs based on Beacon frames if even a single Probe Response frame has been received. Signed-hostap: Jouni Malinen --- wpa_supplicant/scan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 923717f29..e66eed189 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1249,6 +1249,7 @@ static void dump_scan_res(struct wpa_scan_results *scan_res) for (i = 0; i < scan_res->num; i++) { struct wpa_scan_res *r = scan_res->res[i]; + u8 *pos; if ((r->flags & (WPA_SCAN_LEVEL_DBM | WPA_SCAN_NOISE_INVALID)) == WPA_SCAN_LEVEL_DBM) { int snr = r->level - r->noise; @@ -1263,6 +1264,13 @@ static void dump_scan_res(struct wpa_scan_results *scan_res) MAC2STR(r->bssid), r->freq, r->qual, r->noise, r->level, r->flags); } + pos = (u8 *) (r + 1); + if (r->ie_len) + wpa_hexdump(MSG_EXCESSIVE, "IEs", pos, r->ie_len); + pos += r->ie_len; + if (r->beacon_ie_len) + wpa_hexdump(MSG_EXCESSIVE, "Beacon IEs", + pos, r->beacon_ie_len); } #endif /* CONFIG_NO_STDOUT_DEBUG */ }