]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Add debug logs to get the RSSI from the scan results
authorSudha Daram <dsudha@qti.qualcomm.com>
Wed, 18 Dec 2013 06:32:44 +0000 (12:02 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 26 Dec 2013 20:26:05 +0000 (22:26 +0200)
This commit adds few more debug prints to log the RSSI information from
the scanned BSSIDs and the current connected BSSID when comparing
neighbor results during WNM Transition Management Request processing.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/wnm_sta.c

index 4f8d895ae8a1c6e70e55717660876e5180cf4182..153afc3634c8ea24de3daa992a11aeadfdb219a8 100644 (file)
@@ -473,6 +473,10 @@ static int compare_scan_neighbor_results(struct wpa_supplicant *wpa_s,
        if (scan_res == NULL || num_neigh_rep == 0)
                return 0;
 
+       wpa_printf(MSG_DEBUG, "WNM: Current BSS " MACSTR " RSSI %d",
+                  MAC2STR(wpa_s->bssid),
+                  wpa_s->current_bss ? wpa_s->current_bss->level : 0);
+
        for (i = 0; i < num_neigh_rep; i++) {
                for (j = 0; j < scan_res->num; j++) {
                        /* Check for a better RSSI AP */
@@ -483,8 +487,16 @@ static int compare_scan_neighbor_results(struct wpa_supplicant *wpa_s,
                                /* Got a BSSID with better RSSI value */
                                os_memcpy(bssid_to_connect, neigh_rep[i].bssid,
                                          ETH_ALEN);
+                               wpa_printf(MSG_DEBUG, "Found a BSS " MACSTR
+                                          " with better scan RSSI %d",
+                                          MAC2STR(scan_res->res[j]->bssid),
+                                          scan_res->res[j]->level);
                                return 1;
                        }
+                       wpa_printf(MSG_DEBUG, "scan_res[%d] " MACSTR
+                                  " RSSI %d", j,
+                                  MAC2STR(scan_res->res[j]->bssid),
+                                  scan_res->res[j]->level);
                }
        }