P2P: Improve robustness against lost ctrl::ack frames
P2P includes two use cases where one of the devices is going to start a group and likely change channels immediately after processing a frame. This operation may be fast enough to make the device leave the current channel before the peer has completed layer 2 retransmission of the frame in case the ctrl::ack frame was lost. This can result in the peer not getting TX status success notification. For GO Negotiation Confirm frame, p2p_go_neg_conf_cb() has a workaround that ignores the TX status failure and will continue with the group formation with the assumption that the peer actually received the frame even though we did not receive ctrl::ack. For Invitation Response frame to re-invoke a persistent group, no such workaround is used in p2p_invitation_resp_cb(). Consequently, TX status failure due to lost ctrl::ack frame results in one of the peers not starting the group. Increase the likelihood of layer 2 retransmission getting acknowledged and ctrl::ack being received by waiting a short duration after having processed the GO Negotiation Confirm and Invitation Response frames for the re-invocation case. For the former, use 20 ms wait since this case has been worked around in deployed devices. For the latter, use 50 ms wait to get even higher likelihood of getting ctrl::ack through since deployed devices (and the current wpa_supplicant implementation) do not have a workaround to ignore TX status failure. 20 ms is long enough to include at least couple of retries and that should increase likelihood of getting ctrl::ack through quite a bit. The longer 50 ms wait is likely to include full set of layer 2 retries. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
ed61d2a5f9
commit
13ece96f70
2 changed files with 24 additions and 0 deletions
|
@ -1191,5 +1191,17 @@ void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The peer could have missed our ctrl::ack frame for GO Negotiation
|
||||||
|
* Confirm and continue retransmitting the frame. To reduce the
|
||||||
|
* likelihood of the peer not getting successful TX status for the
|
||||||
|
* GO Negotiation Confirm frame, wait a short time here before starting
|
||||||
|
* the group so that we will remain on the current channel to
|
||||||
|
* acknowledge any possible retransmission from the peer.
|
||||||
|
*/
|
||||||
|
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: 20 ms wait on current "
|
||||||
|
"channel before starting group");
|
||||||
|
os_sleep(0, 20000);
|
||||||
|
|
||||||
p2p_go_complete(p2p, dev);
|
p2p_go_complete(p2p, dev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2318,6 +2318,18 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The peer could have missed our ctrl::ack frame for Invitation
|
||||||
|
* Response and continue retransmitting the frame. To reduce the
|
||||||
|
* likelihood of the peer not getting successful TX status for the
|
||||||
|
* Invitation Response frame, wait a short time here before starting
|
||||||
|
* the persistent group so that we will remain on the current channel to
|
||||||
|
* acknowledge any possible retransmission from the peer.
|
||||||
|
*/
|
||||||
|
wpa_dbg(wpa_s, MSG_DEBUG, "P2P: 50 ms wait on current channel before "
|
||||||
|
"starting persistent group");
|
||||||
|
os_sleep(0, 50000);
|
||||||
|
|
||||||
wpas_p2p_group_add_persistent(wpa_s, ssid,
|
wpas_p2p_group_add_persistent(wpa_s, ssid,
|
||||||
ssid->mode == WPAS_MODE_P2P_GO,
|
ssid->mode == WPAS_MODE_P2P_GO,
|
||||||
wpa_s->p2p_persistent_go_freq,
|
wpa_s->p2p_persistent_go_freq,
|
||||||
|
|
Loading…
Reference in a new issue