P2P: Fix p2p_ignore_shared_freq=1 when inviting a peer
p2p_ignore_shared_freq=1 was supposed to allow a MCC-capable device to ignore a preference for using the same channel on multiple interfaces. However, it was not used when inviting a peer to re-invoke a persistent group. This case needs special handling since the peer's channel list is not available to perform channel reselection and the operating channel indicated in the Invitation Request frames ends up getting used as the operating channel if the transmitted of that frames becomes the GO. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
21e491f2f6
commit
d0f61a4bea
1 changed files with 10 additions and 0 deletions
|
@ -5285,6 +5285,7 @@ int wpas_p2p_invite(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
|
|||
u8 *bssid = NULL;
|
||||
int force_freq = 0;
|
||||
int res;
|
||||
int no_pref_freq_given = pref_freq == 0;
|
||||
|
||||
wpa_s->global->p2p_invite_group = NULL;
|
||||
if (peer_addr)
|
||||
|
@ -5331,6 +5332,15 @@ int wpas_p2p_invite(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
|
|||
if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
|
||||
return -1;
|
||||
|
||||
if (wpa_s->parent->conf->p2p_ignore_shared_freq &&
|
||||
no_pref_freq_given && pref_freq > 0 &&
|
||||
wpa_s->num_multichan_concurrent > 1 &&
|
||||
wpas_p2p_num_unused_channels(wpa_s) > 0) {
|
||||
wpa_printf(MSG_DEBUG, "P2P: Ignore own channel preference %d MHz for invitation due to p2p_ignore_shared_freq=1 configuration",
|
||||
pref_freq);
|
||||
pref_freq = 0;
|
||||
}
|
||||
|
||||
return p2p_invite(wpa_s->global->p2p, peer_addr, role, bssid,
|
||||
ssid->ssid, ssid->ssid_len, force_freq, go_dev_addr,
|
||||
1, pref_freq);
|
||||
|
|
Loading…
Reference in a new issue