summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-10-29 15:02:30 +0200
committerJouni Malinen <j@w1.fi>2012-10-29 15:02:30 +0200
commitd76cd41a3a17a8f1d57c99591542668ab29a5851 (patch)
treea5eaef9907df4c413485bef2483170eb24a94756
parent5fbddfdcf1a7322d2929f8034576a24efb9b7334 (diff)
downloadhostap-d76cd41a3a17a8f1d57c99591542668ab29a5851.tar.gz
P2P: Allow separate P2P group interface use to be disabled
The new p2p_no_group_iface=1 configuration parameter can now be used to disable the default behavior of adding a separate interface for the P2P group when driver support for concurrent interfaces is available. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--wpa_supplicant/config.c1
-rw-r--r--wpa_supplicant/config.h11
-rw-r--r--wpa_supplicant/config_file.c3
-rw-r--r--wpa_supplicant/p2p_supplicant.c2
4 files changed, 17 insertions, 0 deletions
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))