aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashmi Ramanna <c_ramanr@qti.qualcomm.com>2014-11-17 16:07:24 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-21 13:25:06 -0800
commitdddb6a5696a6ec6846d5927eb52878a5c3649441 (patch)
tree0a346f4a0433205d8ad1098360957470fe4c9d83
parentebed7570eb40aa0279df25af25b1b75c711b7ef5 (diff)
downloadandroid_external_wpa_supplicant_8-dddb6a5696a6ec6846d5927eb52878a5c3649441.tar.gz
android_external_wpa_supplicant_8-dddb6a5696a6ec6846d5927eb52878a5c3649441.tar.bz2
android_external_wpa_supplicant_8-dddb6a5696a6ec6846d5927eb52878a5c3649441.zip
P2P: Do not change P2P state on GO Neg failure if it is P2P_SEARCH
Changing the P2P state to P2P_IDLE on GO Negotiation Failure would stop the previously issued P2P_FIND operation without notifying the upper layers. Leave the search operation running if in P2P_SEARCH state to avoid unexpected behavior in case the upper layers issued a new P2P_FIND while waiting for GO Negotiation to complete. CRs-fixed: 759557 Git-commit: 9d11832090d6c8cc2f5d1586354d8c6b2e082703 Git-repo : git://w1.fi/srv/git/hostap.git Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Change-Id: I39421ce48c957d71f2f8e8bdf18e5fd544b3800c
-rw-r--r--src/p2p/p2p.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 7e12866a..9f3cff4c 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -215,9 +215,16 @@ void p2p_go_neg_failed(struct p2p_data *p2p, struct p2p_device *peer,
int status)
{
struct p2p_go_neg_results res;
- p2p_clear_timeout(p2p);
eloop_cancel_timeout(p2p_go_neg_wait_timeout, p2p, NULL);
- p2p_set_state(p2p, P2P_IDLE);
+ if (p2p->state != P2P_SEARCH) {
+ /*
+ * Clear timeouts related to GO Negotiation if no new p2p_find
+ * has been started.
+ */
+ p2p_clear_timeout(p2p);
+ p2p_set_state(p2p, P2P_IDLE);
+ }
+
if (p2p->go_neg_peer) {
p2p->go_neg_peer->flags &= ~P2P_DEV_PEER_WAITING_RESPONSE;
p2p->go_neg_peer->wps_method = WPS_NOT_READY;