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>
This commit is contained in:
parent
e485286c67
commit
504a5839ea
2 changed files with 3 additions and 3 deletions
|
@ -2726,7 +2726,7 @@ static void p2p_go_neg_req_cb(struct p2p_data *p2p, int success)
|
||||||
* channel.
|
* channel.
|
||||||
*/
|
*/
|
||||||
p2p_set_state(p2p, P2P_CONNECT);
|
p2p_set_state(p2p, P2P_CONNECT);
|
||||||
p2p_set_timeout(p2p, 0, 100000);
|
p2p_set_timeout(p2p, 0, success ? 200000 : 100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2742,7 +2742,7 @@ static void p2p_go_neg_resp_cb(struct p2p_data *p2p, int success)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
p2p_set_state(p2p, P2P_CONNECT);
|
p2p_set_state(p2p, P2P_CONNECT);
|
||||||
p2p_set_timeout(p2p, 0, 100000);
|
p2p_set_timeout(p2p, 0, 250000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -692,7 +692,7 @@ fail:
|
||||||
P2P_PENDING_GO_NEG_RESPONSE_FAILURE;
|
P2P_PENDING_GO_NEG_RESPONSE_FAILURE;
|
||||||
if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr,
|
if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr,
|
||||||
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,
|
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
|
||||||
"P2P: Failed to send Action frame");
|
"P2P: Failed to send Action frame");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue