P2P: Restart group formation timer upon receiving new Inv Req
A new Invitation Request might be received on a just started persistent group if the previous Invitation Response sent isn't received at the peer (GO of the persistent group). When the peer sends an Invitation Request again, treat it as start of group formation and restart the group formation timer at this point of time. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
4d3be9cdd1
commit
ccad05a95c
1 changed files with 17 additions and 0 deletions
|
@ -5488,6 +5488,23 @@ int wpas_p2p_group_add_persistent(struct wpa_supplicant *wpa_s,
|
|||
go == (ssid->mode == WPAS_MODE_P2P_GO)) {
|
||||
wpa_printf(MSG_DEBUG, "P2P: Requested persistent group is "
|
||||
"already running");
|
||||
if (go == 0 &&
|
||||
eloop_cancel_timeout(wpas_p2p_group_formation_timeout,
|
||||
wpa_s->parent, NULL)) {
|
||||
/*
|
||||
* This can happen if Invitation Response frame was lost
|
||||
* and the peer (GO of a persistent group) tries to
|
||||
* invite us again. Reschedule the timeout to avoid
|
||||
* terminating the wait for the connection too early
|
||||
* since we now know that the peer is still trying to
|
||||
* invite us instead of having already started the GO.
|
||||
*/
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"P2P: Reschedule group formation timeout since peer is still trying to invite us");
|
||||
eloop_register_timeout(P2P_MAX_INITIAL_CONN_WAIT, 0,
|
||||
wpas_p2p_group_formation_timeout,
|
||||
wpa_s->parent, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue