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 <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2012-05-11 15:30:05 +03:00 committed by Jouni Malinen
parent f15854d1e1
commit 1cbe86e2d6

View file

@ -1249,6 +1249,7 @@ static void dump_scan_res(struct wpa_scan_results *scan_res)
for (i = 0; i < scan_res->num; i++) { for (i = 0; i < scan_res->num; i++) {
struct wpa_scan_res *r = scan_res->res[i]; struct wpa_scan_res *r = scan_res->res[i];
u8 *pos;
if ((r->flags & (WPA_SCAN_LEVEL_DBM | WPA_SCAN_NOISE_INVALID)) if ((r->flags & (WPA_SCAN_LEVEL_DBM | WPA_SCAN_NOISE_INVALID))
== WPA_SCAN_LEVEL_DBM) { == WPA_SCAN_LEVEL_DBM) {
int snr = r->level - r->noise; 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, MAC2STR(r->bssid), r->freq, r->qual,
r->noise, r->level, r->flags); 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 */ #endif /* CONFIG_NO_STDOUT_DEBUG */
} }