]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: P2P timeout changes for PD
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 10:42:41 +0000 (12:42 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:16 +0000 (16:36 +0200)
These came in as a part of this AOSP commit:

commit 1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3
Author: Irfan Sheriff <isheriff@google.com>
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

src/p2p/p2p.c

index 3d08d060d7324bd7476f5b068619c159adb7d3ee..738436c4ef97c11167d3d31b232b0fe3ad9de8a4 100644 (file)
@@ -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
 }