]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
autoscan: Add more debug prints for cases where autoscan is not used
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 3 Oct 2016 08:34:35 +0000 (11:34 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 3 Oct 2016 08:34:35 +0000 (11:34 +0300)
This makes it easier to figure out why autoscan is not used even when
being configured through the control interface.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/autoscan.c
wpa_supplicant/ctrl_iface.c

index 072a1d5414aea9ef3bc9b890ca82525ac15aa65a..5056a9300a875463001758fd3aceb9c38cbc40ac 100644 (file)
@@ -47,11 +47,16 @@ int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan)
        struct sched_scan_plan *scan_plans;
 
        /* Give preference to scheduled scan plans if supported/configured */
-       if (wpa_s->sched_scan_plans)
+       if (wpa_s->sched_scan_plans) {
+               wpa_printf(MSG_DEBUG,
+                          "autoscan: sched_scan_plans set - use it instead");
                return 0;
+       }
 
-       if (wpa_s->autoscan && wpa_s->autoscan_priv)
+       if (wpa_s->autoscan && wpa_s->autoscan_priv) {
+               wpa_printf(MSG_DEBUG, "autoscan: Already initialized");
                return 0;
+       }
 
        if (name == NULL)
                return 0;
index d814fdf7fd2d4e46cfae369967152e5c39f60e49..bfe8efe260a3a542f36630dffcd4f85232e3e94c 100644 (file)
@@ -6762,6 +6762,9 @@ static int wpa_supplicant_ctrl_iface_autoscan(struct wpa_supplicant *wpa_s,
                autoscan_init(wpa_s, 1);
        else if (state == WPA_SCANNING)
                wpa_supplicant_reinit_autoscan(wpa_s);
+       else
+               wpa_printf(MSG_DEBUG, "No autoscan update in state %s",
+                          wpa_supplicant_state_txt(state));
 
        return 0;
 }