>From 0656fd49d090657b3d1fdfd17a43d2a4fd8dac4c Mon Sep 17 00:00:00 2001 From: Avichal Agarwal <avichal.a@xxxxxxxxxxx> Date: Tue, 12 Jul 2016 17:18:07 +0530 Subject: [PATCH 1/2] handler for ibss-rsn join this patch will provide the the dbus handler for the command ibss-rsn. It will take the arguments of type array of bytes. Signed-off-by: Avichal Agarwal <avichal.a@xxxxxxxxxxx> --- wpa_supplicant/dbus/dbus_new.c | 9 +++++++++ wpa_supplicant/dbus/dbus_new_handlers.c | 21 +++++++++++++++++++++ wpa_supplicant/dbus/dbus_new_handlers.h | 4 ++++ 3 files changed, 34 insertions(+) diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 6d73bbc..8fa03bb 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -3104,6 +3104,15 @@ static const struct wpa_dbus_method_desc wpas_dbus_interface_methods[] = { } }, #endif /* CONFIG_NO_CONFIG_WRITE */ +#ifdef CONFIG_IBSS_RSN + { "IbssRsn" ,WPAS_DBUS_NEW_IFACE_INTERFACE, + (WPADBusMethodHandler)wpas_dbus_handler_ibss_rsn, + { + {"adress","ay",ARG_IN}, + END_ARGS + } + }, +#endif /*CONFIG_IBSS_RSN*/ { NULL, NULL, NULL, { END_ARGS } } }; diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index de6d216..d8afef8 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -22,6 +22,7 @@ #include "../bss.h" #include "../scan.h" #include "../autoscan.h" +#include "../ibss_rsn.h" #include "dbus_new_helpers.h" #include "dbus_new.h" #include "dbus_new_handlers.h" @@ -4532,3 +4533,23 @@ DBusMessage * wpas_dbus_handler_vendor_elem_remove(DBusMessage *message, return dbus_message_new_error(message, DBUS_ERROR_INVALID_ARGS, "Not found"); } + +#ifdef CONFIG_IBSS_RSN +DBusMessage *wpas_dbus_handler_ibss_rsn(DBusMessage *message, + struct wpa_supplicant *wpa_s) +{ + u8 *adress; + int len; + DBusMessageIter iter, array; + + dbus_message_iter_init(message, &iter); + dbus_message_iter_recurse(&iter, &array); + dbus_message_iter_get_fixed_array(&array, &adress, &len); + if (!adress || len == 0) { + return dbus_message_new_error(message, DBUS_ERROR_INVALID_ARGS, + "Invalid value"); + } + ibss_rsn_start(wpa_s->ibss_rsn,adress); + return NULL; +} +#endif /*CONFIG_IBSS_RSN*/ diff --git a/wpa_supplicant/dbus/dbus_new_handlers.h b/wpa_supplicant/dbus/dbus_new_handlers.h index cd299c0..5179a08 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.h +++ b/wpa_supplicant/dbus/dbus_new_handlers.h @@ -128,6 +128,10 @@ DBusMessage * wpas_dbus_handler_eap_logoff(DBusMessage *message, DBusMessage * wpas_dbus_handler_eap_logon(DBusMessage *message, struct wpa_supplicant *wpa_s); +#ifdef CONFIG_IBSS_RSN +DBusMessage * wpas_dbus_handler_ibss_rsn(DBusMessage *message, + struct wpa_supplicant *wpa_s); +#endif/*CONFIG_IBSS_RSN*/ DECLARE_ACCESSOR(wpas_dbus_getter_capabilities); DECLARE_ACCESSOR(wpas_dbus_getter_state); -- 1.7.9.5 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap