P2P: Reduce off channel wait time for some P2P Action frames
Setting a long off channel wait time for P2P Action frames when we know we are already on the right channel may cause a delay in sending the Action frame (because the driver may not be able to satisfy the request for long wait time until previous off channel requests are over). This may be crucial for P2P response frames that must be sent within 100 milliseconds of receiving the request. Fix this by adjusting P2P Action frame wait times as follows: 1. For GO Negotiation Response frame, shorten the wait time to 100 ms. This is reasonable because the peer has just sent us the GO Negotiation Request frame, so it is known to be on the right channel and is probably ready to send us the GO Negotiation Confirmation frame without delay. 2. For GO Negotiation Confirmation, P2P Invitation Response, and Provision Discovery Response frames, there is no need for wait time at all as this is the last frame in the exchange. So set the wait time to 50 ms to ensure there is enough time to send the frame. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
1fc63fe299
commit
360a9d5a8f
3 changed files with 4 additions and 4 deletions
|
@ -1060,7 +1060,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), 500) < 0) {
|
||||
wpabuf_head(resp), wpabuf_len(resp), 100) < 0) {
|
||||
p2p_dbg(p2p, "Failed to send Action frame");
|
||||
}
|
||||
|
||||
|
@ -1394,7 +1394,7 @@ fail:
|
|||
|
||||
if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr, sa,
|
||||
wpabuf_head(dev->go_neg_conf),
|
||||
wpabuf_len(dev->go_neg_conf), 200) < 0) {
|
||||
wpabuf_len(dev->go_neg_conf), 50) < 0) {
|
||||
p2p_dbg(p2p, "Failed to send Action frame");
|
||||
p2p_go_neg_failed(p2p, -1);
|
||||
p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
|
||||
|
|
|
@ -418,7 +418,7 @@ fail:
|
|||
p2p->pending_action_state = P2P_PENDING_INVITATION_RESPONSE;
|
||||
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), 50) < 0) {
|
||||
p2p_dbg(p2p, "Failed to send Action frame");
|
||||
}
|
||||
|
||||
|
|
|
@ -997,7 +997,7 @@ out:
|
|||
if (p2p_send_action(p2p, freq, sa, p2p->cfg->dev_addr,
|
||||
p2p->cfg->dev_addr,
|
||||
wpabuf_head(resp), wpabuf_len(resp),
|
||||
200) < 0)
|
||||
50) < 0)
|
||||
p2p_dbg(p2p, "Failed to send Action frame");
|
||||
else
|
||||
p2p->send_action_in_progress = 1;
|
||||
|
|
Loading…
Reference in a new issue