aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-08-11 21:14:57 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-12 10:18:54 +0300
commita89c9c9c76167b69fdee3b050db75063e18b2119 (patch)
tree7369b6b69fd1f4b0d1ea55f406dbeac8ace4db09 /src/p2p
parent1cb767508ec7f760e81d5f1c832fc8263c570c99 (diff)
downloadexternal_wpa_supplicant_8_ti-a89c9c9c76167b69fdee3b050db75063e18b2119.zip
external_wpa_supplicant_8_ti-a89c9c9c76167b69fdee3b050db75063e18b2119.tar.gz
external_wpa_supplicant_8_ti-a89c9c9c76167b69fdee3b050db75063e18b2119.tar.bz2
P2P: Increase GO Negotiation timeouts
p2p_set_timeout() calls in GO Neg Req/Resp TX callbacks used timeout of 100 ms which is the value given in the P2P specification for GO Negotiation, but this was actually shorter than the wait-for-offchannel-TX value (200 ms) used for the driver call. In addition, it looks like some devices (e.g., Galaxy Nexus with JB image) can take longer time to reply to GO Negotiation Response (somewhere between 200 and 250 ms has been observed). Increase the wait-for-GO-Neg-Resp timeout from 100 ms to 200 ms if GO Negotiation Request frame was acknowledged (this matches with the offchannel wait timeout that used previously). The no-ack case is left at 100 ms since we use GO Negotiation Request frame also to discover whether the peer is on its Listen channel. Increase the wait-for-GO-Neg-Conf timeout from 100 ms to 250 ms (and increase the offchannel wait timeout to matching 250 ms) as a workaround for devices that take over 200 ms to reply to GO Negotiation Response. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/p2p.c4
-rw-r--r--src/p2p/p2p_go_neg.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 9a74450..664addf 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2864,7 +2864,7 @@ static void p2p_go_neg_req_cb(struct p2p_data *p2p, int success)
* channel.
*/
p2p_set_state(p2p, P2P_CONNECT);
- p2p_set_timeout(p2p, 0, 100000);
+ p2p_set_timeout(p2p, 0, success ? 200000 : 100000);
}
@@ -2880,7 +2880,7 @@ static void p2p_go_neg_resp_cb(struct p2p_data *p2p, int success)
return;
}
p2p_set_state(p2p, P2P_CONNECT);
- p2p_set_timeout(p2p, 0, 100000);
+ p2p_set_timeout(p2p, 0, 250000);
}
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index 51db6df..68bc1b2 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -700,7 +700,7 @@ fail:
P2P_PENDING_GO_NEG_RESPONSE_FAILURE;
if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr,
p2p->cfg->dev_addr,
- wpabuf_head(resp), wpabuf_len(resp), 200) < 0) {
+ wpabuf_head(resp), wpabuf_len(resp), 250) < 0) {
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: Failed to send Action frame");
}