[PATCH] P2P: make p2p_no_group_iface configurable with dbus

Guoqiang Liu leonewcool
Sun Mar 16 21:54:00 PDT 2014


From: Guoqiang Liu <guoqiang.liu at archermind.com>

	Some old device need to set p2p_no_group_iface 1 to set up
a p2p connection, So open a dbus interface to configure it.

Signed-off-by: Guoqiang Liu <guoqiang.liu at archermind.com>
---
 wpa_supplicant/dbus/dbus_new_handlers_p2p.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 2b83637..6403e14 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -825,6 +825,11 @@ dbus_bool_t wpas_dbus_getter_p2p_device_config(DBusMessageIter *iter,
 					 wpa_s->conf->disassoc_low_ack))
 		goto err_no_mem;
 
+	/* No Group Iface */
+	if (!wpa_dbus_dict_append_bool(&dict_iter, "NoGroupIface",
+				       wpa_s->conf->p2p_no_group_iface))
+		goto err_no_mem;
+
 	if (!wpa_dbus_dict_close_write(&variant_iter, &dict_iter) ||
 	    !dbus_message_iter_close_container(iter, &variant_iter))
 		goto err_no_mem;
@@ -974,6 +979,9 @@ dbus_bool_t wpas_dbus_setter_p2p_device_config(DBusMessageIter *iter,
 		else if (os_strcmp(entry.key, "disassoc_low_ack") == 0 &&
 			 entry.type == DBUS_TYPE_UINT32)
 			wpa_s->conf->disassoc_low_ack = entry.uint32_value;
+		else if ((os_strcmp(entry.key, "NoGroupIface") == 0) &&
+			 (entry.type == DBUS_TYPE_BOOLEAN))
+			wpa_s->conf->p2p_no_group_iface = entry.bool_value;
 		else
 			goto error;
 
-- 
1.7.9.5




More information about the Hostap mailing list