[PATCH] dbus: Add a device configuration entry to set the P2P WPS methods
Tomasz Bursztyka
tomasz.bursztyka
Tue Sep 16 05:27:55 PDT 2014
It is thus possible to select which WPS methods is prefered for a P2P
device.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>
---
wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 5e90b37..4a84c22 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -991,7 +991,20 @@ dbus_bool_t wpas_dbus_setter_p2p_device_config(DBusMessageIter *iter,
else if (os_strcmp(entry.key, "p2p_search_delay") == 0 &&
entry.type == DBUS_TYPE_UINT32)
wpa_s->conf->p2p_search_delay = entry.uint32_value;
- else
+ else if (os_strcmp(entry.key, "ConfigMethods") == 0 &&
+ entry.type == DBUS_TYPE_STRING) {
+ char *methods;
+
+ methods = os_strdup(entry.str_value);
+ if (!methods)
+ goto err_no_mem_clear;
+
+ os_free(wpa_s->conf->config_methods);
+ wpa_s->conf->config_methods = methods;
+
+ wpa_s->conf->changed_parameters |=
+ CFG_CHANGED_CONFIG_METHODS;
+ } else
goto error;
wpa_dbus_dict_entry_clear(&entry);
--
1.8.5.5
More information about the Hostap
mailing list