diff mbox

P2P: make p2p_no_group_iface configurable with dbus

Message ID 1394096583-13708-1-git-send-email-guoqiang.liu@archermind.com
State Changes Requested
Headers show

Commit Message

Guoqiang Liu March 6, 2014, 9:03 a.m. UTC
From: "guoqiang.liu" <guoqiang.liu@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.
---
 wpa_supplicant/dbus/dbus_new_handlers_p2p.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jouni Malinen March 14, 2014, 2:27 p.m. UTC | #1
On Thu, Mar 06, 2014 at 05:03:03PM +0800, Guoqiang Liu wrote:
> From: "guoqiang.liu" <guoqiang.liu@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.
> ---

Could you please read the top level CONTRIBUTIONS file and re-send this
with a Signed-off-by: line in the commit message as described in that
file?

As with any D-Bus interface changes, I would also appreciate a patch
that updates the documentation in doc/dbus.doxygen to match.
Guoqiang Liu March 17, 2014, 4:52 a.m. UTC | #2
On 03/14/2014 10:27 PM, Jouni Malinen wrote:
> On Thu, Mar 06, 2014 at 05:03:03PM +0800, Guoqiang Liu wrote:
>> From: "guoqiang.liu"<guoqiang.liu@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.
>> ---
> Could you please read the top level CONTRIBUTIONS file and re-send this
> with a Signed-off-by: line in the commit message as described in that
> file?
Sure, Thanks for your suggestion. I will update it, and send it again.
> As with any D-Bus interface changes, I would also appreciate a patch
> that updates the documentation in doc/dbus.doxygen to match.
>
I just find that there isn't any description about all the p2p dbus 
interface in the
documentation doc/dbus.doxygen. maybe it's a difference work from this
patch. so this time, I prefer not to update the dbus.doxygen. maybe next 
time:-)
diff mbox

Patch

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;