P2P: Fix PD retry channel on join-a-group case
Join-a-group needs to force the current operating channel of the target group as the frequency to use for the PD exchange. When the channel was selected based on a BSS entry for the GO, this worked only for the first PD Request frame while the retries reverted to a potentially different channel based on a P2P peer entry. Fix this by maintaining the forced channel through the PD retry sequence. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
033e48ee2d
commit
8d82c2105b
3 changed files with 12 additions and 1 deletions
|
@ -2664,7 +2664,8 @@ static void p2p_retry_pd(struct p2p_data *p2p)
|
|||
MAC2STR(dev->info.p2p_device_addr),
|
||||
dev->req_config_methods);
|
||||
p2p_send_prov_disc_req(p2p, dev,
|
||||
dev->flags & P2P_DEV_PD_FOR_JOIN, 0);
|
||||
dev->flags & P2P_DEV_PD_FOR_JOIN,
|
||||
p2p->pd_force_freq);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -442,6 +442,14 @@ struct p2p_data {
|
|||
*/
|
||||
int pd_retries;
|
||||
|
||||
/**
|
||||
* pd_force_freq - Forced frequency for PD retries or 0 to auto-select
|
||||
*
|
||||
* This is is used during PD retries for join-a-group case to use the
|
||||
* correct operating frequency determined from a BSS entry for the GO.
|
||||
*/
|
||||
int pd_force_freq;
|
||||
|
||||
u8 go_timeout;
|
||||
u8 client_timeout;
|
||||
|
||||
|
|
|
@ -437,6 +437,7 @@ int p2p_prov_disc_req(struct p2p_data *p2p, const u8 *peer_addr,
|
|||
}
|
||||
|
||||
p2p->user_initiated_pd = user_initiated_pd;
|
||||
p2p->pd_force_freq = force_freq;
|
||||
|
||||
if (p2p->user_initiated_pd)
|
||||
p2p->pd_retries = MAX_PROV_DISC_REQ_RETRIES;
|
||||
|
@ -472,4 +473,5 @@ void p2p_reset_pending_pd(struct p2p_data *p2p)
|
|||
p2p->user_initiated_pd = 0;
|
||||
os_memset(p2p->pending_pd_devaddr, 0, ETH_ALEN);
|
||||
p2p->pd_retries = 0;
|
||||
p2p->pd_force_freq = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue