P2P: Use the same Dialog Token value for every PD retry

Commit 175171ac6c ensured that the PD
requests are retried in join-a-running group case and the Enrollee is
started on either receiving the PD response or after the retries. Each
PD request is retried with an unique dialog token and a PD response from
the GO with a mismatched dialog token is ignored. Thus, the P2P client
would continue retrying the PD requests till the response with a
matching dialog token is obtained. This would result in the GO getting
multiple PD requests and a corresponding user notification (POP UP) in
implementations where each PD request results in a POP UP, resulting in
a bad user experience. To avoid such behavior, the same dialog token
value is used for every retry in the same PD exchange.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Sunil Dutt 2013-01-08 13:12:34 +02:00 committed by Jouni Malinen
parent 708bc8e0e4
commit c0810ddb3c

View file

@ -380,9 +380,6 @@ int p2p_send_prov_disc_req(struct p2p_data *p2p, struct p2p_device *dev,
/* TODO: use device discoverability request through GO */
}
dev->dialog_token++;
if (dev->dialog_token == 0)
dev->dialog_token = 1;
req = p2p_build_prov_disc_req(p2p, dev->dialog_token,
dev->req_config_methods,
join ? dev : NULL);
@ -453,6 +450,14 @@ int p2p_prov_disc_req(struct p2p_data *p2p, const u8 *peer_addr,
if (p2p->user_initiated_pd)
p2p->pd_retries = MAX_PROV_DISC_REQ_RETRIES;
/*
* Assign dialog token here to use the same value in each retry within
* the same PD exchange.
*/
dev->dialog_token++;
if (dev->dialog_token == 0)
dev->dialog_token = 1;
return p2p_send_prov_disc_req(p2p, dev, join, force_freq);
}