diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-08-04 09:02:27 -0700 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-09-09 07:17:23 -0700 |
commit | f7a6905735fb99fec48fdab4c3a1daf9b014c374 (patch) | |
tree | a1a9d2421b4a1bbbd4d1b7344ccd8ce4f268e972 /src | |
parent | ab218b7c728d8190b77e903c1f9c0908e8fed2ce (diff) | |
download | external_wpa_supplicant_8_ti-f7a6905735fb99fec48fdab4c3a1daf9b014c374.zip external_wpa_supplicant_8_ti-f7a6905735fb99fec48fdab4c3a1daf9b014c374.tar.gz external_wpa_supplicant_8_ti-f7a6905735fb99fec48fdab4c3a1daf9b014c374.tar.bz2 |
P2P: Add a workaround for Extended Listen Timing getting stuck
This should not really happen, but it looks like the Listen command
may fail is something else (e.g., a scan) was running at an
inconvenient time. As a workaround, allow new Extended Listen
operation to be started if this state is detected.
Diffstat (limited to 'src')
-rw-r--r-- | src/p2p/p2p.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 63a8c6c..ab2f4e5 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -2805,6 +2805,20 @@ static void p2p_ext_listen_timeout(void *eloop_ctx, void *timeout_ctx) p2p_ext_listen_timeout, p2p, NULL); } + if (p2p->state == P2P_LISTEN_ONLY && p2p->ext_listen_only) { + /* + * This should not really happen, but it looks like the Listen + * command may fail is something else (e.g., a scan) was + * running at an inconvenient time. As a workaround, allow new + * Extended Listen operation to be started. + */ + wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Previous " + "Extended Listen operation had not been completed - " + "try again"); + p2p->ext_listen_only = 0; + p2p_set_state(p2p, P2P_IDLE); + } + if (p2p->state != P2P_IDLE) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Skip Extended " "Listen timeout in active state (%s)", |