Browse Source

P2P: Fix fallback to GO Negotiation to avoid PD-before-join timeout

The wpas_p2p_pd_before_join_timeout could be left behind if the PD
Request in p2p_connect-auto case does not succeed. This timeout can
result in unexpected operations since it could trigger join operation
while going through GO Negotiation. Fix this by canceling the timeout
when falling back to GO Negotiation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Aarthi Thiruvengadam 12 years ago
parent
commit
c66cf68d5c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      wpa_supplicant/p2p_supplicant.c

+ 1 - 0
wpa_supplicant/p2p_supplicant.c

@@ -4879,6 +4879,7 @@ static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
 					int group_added)
 {
 	struct wpa_supplicant *group = wpa_s;
+	eloop_cancel_timeout(wpas_p2p_pd_before_join_timeout, wpa_s, NULL);
 	if (wpa_s->global->p2p_group_formation)
 		group = wpa_s->global->p2p_group_formation;
 	wpa_s = wpa_s->parent;