mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
P2P: Allow shared interface channel preference to be ignored
p2p_ignore_shared_freq=1 in the configuration file (or "SET p2p_ignore_shared_freq 1" on control interface) can now be used to configure wpa_supplicant to ignore the preference on shared operating channel when the driver support multi-channel concurrency. The default behavior is to try to start any new P2P group on an operating channel that is already in use on another virtual interface to avoid extra cost from hopping between multiple channels. If this new parameter is set to 1, such preference is not used and instead, the channel for the new P2P group is selected based on other preferences while ignoring operating channels of any concurrent connection. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
6cb27aa85f
commit
b277a2bebc
@ -3019,6 +3019,7 @@ static const struct global_parse_data global_fields[] = {
|
||||
{ INT(p2p_go_ht40), 0 },
|
||||
{ INT(p2p_disabled), 0 },
|
||||
{ INT(p2p_no_group_iface), 0 },
|
||||
{ INT_RANGE(p2p_ignore_shared_freq, 0, 1), 0 },
|
||||
#endif /* CONFIG_P2P */
|
||||
{ FUNC(country), CFG_CHANGED_COUNTRY },
|
||||
{ INT(bss_max_count), 0 },
|
||||
|
@ -571,6 +571,7 @@ struct wpa_config {
|
||||
int p2p_intra_bss;
|
||||
unsigned int num_p2p_pref_chan;
|
||||
struct p2p_channel *p2p_pref_chan;
|
||||
int p2p_ignore_shared_freq;
|
||||
|
||||
struct wpabuf *wps_vendor_ext_m1;
|
||||
|
||||
|
@ -98,6 +98,10 @@ static void wpas_p2p_set_own_freq_preference(struct wpa_supplicant *wpa_s,
|
||||
{
|
||||
if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
|
||||
return;
|
||||
if (freq > 0 &&
|
||||
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT) &&
|
||||
wpa_s->parent->conf->p2p_ignore_shared_freq)
|
||||
freq = 0;
|
||||
p2p_set_own_freq_preference(wpa_s->global->p2p, freq);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user