diff options
| author | Constantin Musca <constantin.musca@intel.com> | 2014-09-12 10:22:19 +0300 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-11-04 22:33:58 -0800 |
| commit | c8e5c227008101d58dfee354f3c9555b5482495b (patch) | |
| tree | 7626cf31e3833ed1d7ddc3af2ec015eeaf50a1aa | |
| parent | c0c6db17999ba1ec4a6b4fc691981bbc2d6ba4f9 (diff) | |
| download | android_external_wpa_supplicant_8-c8e5c227008101d58dfee354f3c9555b5482495b.tar.gz android_external_wpa_supplicant_8-c8e5c227008101d58dfee354f3c9555b5482495b.tar.bz2 android_external_wpa_supplicant_8-c8e5c227008101d58dfee354f3c9555b5482495b.zip | |
P2P: Stop driver listen in p2p_state_timeout()
When a P2P timeout occurs and p2p_state_timeout is executed, the
stop_listen function can be called besides setting in_listen to zero in
cases where the driver is still in ROC. That should not really happen in
normal cases, but it is possible for some drivers to extend the ROC
duration. If that happens, the next start_listen request may get
rejected with "P2P: Reject start_listen since p2p_listen_work already
exists".
Change-Id: Idb4cb33e98a3bbf3cc4929272ee0bc9ca6140ba6
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Git-commit a902d5a64b825a778992e26c0add98479e9c3b39
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
| -rw-r--r-- | src/p2p/p2p.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index e8161f7f..e3c5fda1 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -3509,6 +3509,10 @@ static void p2p_state_timeout(void *eloop_ctx, void *timeout_ctx) p2p_dbg(p2p, "Timeout (state=%s)", p2p_state_txt(p2p->state)); p2p->in_listen = 0; + if (p2p->drv_in_listen) { + p2p_dbg(p2p, "Driver is still in listen state - stop it"); + p2p->cfg->stop_listen(p2p->cfg->cb_ctx); + } switch (p2p->state) { case P2P_IDLE: |
