diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index eeff2d4db..736bf0dde 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -3008,6 +3008,7 @@ static const struct global_parse_data global_fields[] = { { FUNC(p2p_pref_chan), CFG_CHANGED_P2P_PREF_CHAN }, { INT(p2p_go_ht40), 0 }, { INT(p2p_disabled), 0 }, + { INT(p2p_no_group_iface), 0 }, #endif /* CONFIG_P2P */ { FUNC(country), CFG_CHANGED_COUNTRY }, { INT(bss_max_count), 0 }, diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index fe2974417..fd2a62857 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -762,6 +762,17 @@ struct wpa_config { * p2p_disabled - Whether P2P operations are disabled for this interface */ int p2p_disabled; + + /** + * p2p_no_group_iface - Whether group interfaces can be used + * + * By default, wpa_supplicant will create a separate interface for P2P + * group operations if the driver supports this. This functionality can + * be disabled by setting this parameter to 1. In that case, the same + * interface that was used for the P2P management operations is used + * also for the group operation. + */ + int p2p_no_group_iface; }; diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index cceb75b54..c473891cd 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -872,6 +872,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config) fprintf(f, "p2p_go_ht40=%u\n", config->p2p_go_ht40); if (config->p2p_disabled) fprintf(f, "p2p_disabled=%u\n", config->p2p_disabled); + if (config->p2p_no_group_iface) + fprintf(f, "p2p_no_group_iface=%u\n", + config->p2p_no_group_iface); #endif /* CONFIG_P2P */ if (config->country[0] && config->country[1]) { fprintf(f, "country=%c%c\n", diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index c4e9176eb..15b9b8571 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -2859,6 +2859,8 @@ void wpas_p2p_deinit_global(struct wpa_global *global) static int wpas_p2p_create_iface(struct wpa_supplicant *wpa_s) { + if (wpa_s->conf->p2p_no_group_iface) + return 0; /* separate interface disabled per configuration */ if (wpa_s->drv_flags & (WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE | WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P))