From 211d7ab3d8d0ddce8d512dd32250baa1bfea0c6b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 20 Feb 2014 16:59:29 +0200 Subject: [PATCH] P2P: Add even more debug prints for Probe Request in non-Listen state It looks like discovery_dev_id test case can still fail and based on the previously added debug prints, this is happening since the P2P module believes it is not in Listen state even when a P2P_LISTEN was issued. p2p_listen_cb() did not get called on remain-on-channel event for some reason, so lets add more debug to find out why this can happen. Signed-off-by: Jouni Malinen --- src/p2p/p2p.c | 3 ++- wpa_supplicant/p2p_supplicant.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 7170e47ed..b88a10640 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1971,7 +1971,8 @@ p2p_reply_probe(struct p2p_data *p2p, const u8 *addr, const u8 *dst, if (!p2p->in_listen || !p2p->drv_in_listen) { /* not in Listen state - ignore Probe Request */ - p2p_dbg(p2p, "Not in Listen state - ignore Probe Request"); + p2p_dbg(p2p, "Not in Listen state (in_listen=%d drv_in_listen=%d) - ignore Probe Request", + p2p->in_listen, p2p->drv_in_listen); return P2P_PREQ_NOT_LISTEN; } diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index fa824914c..fa75fa5d0 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4771,6 +4771,10 @@ void wpas_p2p_remain_on_channel_cb(struct wpa_supplicant *wpa_s, p2p_listen_cb(wpa_s->global->p2p, wpa_s->pending_listen_freq, wpa_s->pending_listen_duration); wpa_s->pending_listen_freq = 0; + } else { + wpa_printf(MSG_DEBUG, "P2P: Ignore remain-on-channel callback (off_channel_freq=%u pending_listen_freq=%d freq=%u duration=%u)", + wpa_s->off_channel_freq, wpa_s->pending_listen_freq, + freq, duration); } }