]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clean up Listen channel optimization debug prints
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 3 Feb 2015 14:13:35 +0000 (16:13 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 3 Feb 2015 14:13:35 +0000 (16:13 +0200)
Do not claim to change the Listen channel in a debug message when
previously configured channel prevents this. In addition, fix a typo in
another related debug print.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/p2p/p2p.c
wpa_supplicant/p2p_supplicant.c

index 4797a0182874f483a375aaea0f7ec7c08e4f87da..2fcef6bc7811d2f31c8131d3faa7ce684d886604 100644 (file)
@@ -4557,15 +4557,18 @@ int p2p_set_listen_channel(struct p2p_data *p2p, u8 reg_class, u8 channel,
        if (p2p_channel_to_freq(reg_class, channel) < 0)
                return -1;
 
-       p2p_dbg(p2p, "Set Listen channel: reg_class %u channel %u",
-               reg_class, channel);
-
        /*
         * Listen channel was set in configuration or set by control interface;
         * cannot override it.
         */
-       if (p2p->cfg->channel_forced && forced == 0)
+       if (p2p->cfg->channel_forced && forced == 0) {
+               p2p_dbg(p2p,
+                       "Listen channel was previously configured - do not override based on optimization");
                return -1;
+       }
+
+       p2p_dbg(p2p, "Set Listen channel: reg_class %u channel %u",
+               reg_class, channel);
 
        if (p2p->state == P2P_IDLE) {
                p2p->cfg->reg_class = reg_class;
index d715af1aa39fd6b6ee6e797ace6a66e51ea93a00..9e1d66568f2de006b91385cc4fb092a0462157c3 100644 (file)
@@ -9167,7 +9167,7 @@ static void wpas_p2p_optimize_listen_channel(struct wpa_supplicant *wpa_s,
 
        if (cand) {
                wpa_dbg(wpa_s, MSG_DEBUG,
-                       "P2P: Update Listen channel to %u baased on operating channel",
+                       "P2P: Update Listen channel to %u based on operating channel",
                        cand);
                p2p_set_listen_channel(wpa_s->global->p2p, 81, cand, 0);
        }