aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-30 22:22:52 -0700
committerIrfan Sheriff <isheriff@google.com>2012-10-30 22:22:52 -0700
commit1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3 (patch)
tree68e65c907c1db496ed9f5f40bfe9d111e8bc643a /src
parentb485b188f853a4ec5342c2ea49705b545b2caf3d (diff)
downloadexternal_wpa_supplicant_8-1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3.zip
external_wpa_supplicant_8-1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3.tar.gz
external_wpa_supplicant_8-1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3.tar.bz2
Increase timeouts for p2p
Dongles can be slow to respond and a quick turn around time on packets does not help. Allow for upto 350ms on retry attempts for provision discovery, negotiation and invitation This will catch slow responses within the first attempt and prevent any kind of issues with sequence number handling Bug: 7445415 Change-Id: I88a849d400b10f42ac298bad6d01f49803fcc8ba
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p.c16
-rw-r--r--src/p2p/p2p_invitation.c4
2 files changed, 20 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index f038812..a3eaa8c 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2811,7 +2811,11 @@ static void p2p_prov_disc_cb(struct p2p_data *p2p, int success)
p2p_continue_find(p2p);
else if (p2p->user_initiated_pd) {
p2p->pending_action_state = P2P_PENDING_PD;
+#ifdef ANDROID_P2P
+ p2p_set_timeout(p2p, 0, 350000);
+#else
p2p_set_timeout(p2p, 0, 300000);
+#endif
}
return;
}
@@ -2828,7 +2832,11 @@ static void p2p_prov_disc_cb(struct p2p_data *p2p, int success)
/* Wait for response from the peer */
if (p2p->state == P2P_SEARCH)
p2p_set_state(p2p, P2P_PD_DURING_FIND);
+#ifdef ANDROID_P2P
+ p2p_set_timeout(p2p, 0, 350000);
+#else
p2p_set_timeout(p2p, 0, 200000);
+#endif
}
@@ -2943,7 +2951,11 @@ static void p2p_go_neg_req_cb(struct p2p_data *p2p, int success)
* channel.
*/
p2p_set_state(p2p, P2P_CONNECT);
+#ifdef ANDROID_P2P
+ p2p_set_timeout(p2p, 0, 350000);
+#else
p2p_set_timeout(p2p, 0, success ? 200000 : 100000);
+#endif
}
@@ -2959,7 +2971,11 @@ static void p2p_go_neg_resp_cb(struct p2p_data *p2p, int success)
return;
}
p2p_set_state(p2p, P2P_CONNECT);
+#ifdef ANDROID_P2P
+ p2p_set_timeout(p2p, 0, 350000);
+#else
p2p_set_timeout(p2p, 0, 250000);
+#endif
}
diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c
index 769e57b..7bf6600 100644
--- a/src/p2p/p2p_invitation.c
+++ b/src/p2p/p2p_invitation.c
@@ -506,7 +506,11 @@ void p2p_invitation_req_cb(struct p2p_data *p2p, int success)
* channel.
*/
p2p_set_state(p2p, P2P_INVITE);
+#ifdef ANDROID_P2P
+ p2p_set_timeout(p2p, 0, 350000);
+#else
p2p_set_timeout(p2p, 0, 100000);
+#endif
}