From: Jouni Malinen Date: Fri, 1 Nov 2013 10:42:41 +0000 (+0200) Subject: AOSP: P2P timeout changes for PD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fed439996747ca2cfd6a41c8ebd786adf88ec8a;p=thirdparty%2Fhostap.git AOSP: P2P timeout changes for PD These came in as a part of this AOSP commit: commit 1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3 Author: Irfan Sheriff Date: Tue Oct 30 22:22:52 2012 -0700 Increase timeouts for p2p Dongles can be slow to respond and a quick turn around time on packets does Allow for upto 350ms on retry attempts for provision discovery, negotiation This will catch slow responses within the first attempt and prevent any kind with sequence number handling Bug: 7445415 Change-Id: I88a849d400b10f42ac298bad6d01f49803fcc8ba --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 3d08d060d..738436c4e 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -2808,7 +2808,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; } @@ -2825,7 +2829,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 }