[PATCH 3/3] channel and frequency added in interface capability properties on dbus
Avichal Agarwal
avichal.a at samsung.com
Mon Dec 19 05:57:17 PST 2016
Signed-off-by: Avichal Agarwal <avichal.a at samsung.com>
Signed-off-by: Mayank Haarit <mayank.h at samsung.com>
Signed-off-by: Kyeong-Chae Lim <kcya.lim at samsung.com>
---
wpa_supplicant/dbus/dbus_new_handlers.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index e11dd36..d0d3c88 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -2360,6 +2360,7 @@ DBusMessage * wpas_dbus_handler_set_pkcs11_engine_and_module_path(
}
+
/**
* wpas_dbus_getter_capabilities - Return interface capabilities
* @iter: Pointer to incoming dbus message iter
@@ -2642,6 +2643,21 @@ dbus_bool_t wpas_dbus_getter_capabilities(
goto nomem;
}
+ if (res >= 0) {
+ int buf[1024];
+ int len= wpas_get_channel_freq(wpa_s, buf,2);
+ if(!wpa_dbus_dict_append_int32_array(&iter_dict, "Frequency", buf,len))
+ goto nomem;
+
+ }
+ if (res >= 0) {
+ int buf[1024];
+ int len=wpas_get_channel_freq(wpa_s, buf,1);
+ if(!wpa_dbus_dict_append_int32_array(&iter_dict, "Channels", buf,len))
+ goto nomem;
+
+ }
+
if (!wpa_dbus_dict_close_write(&variant_iter, &iter_dict) ||
!dbus_message_iter_close_container(iter, &variant_iter))
goto nomem;
@@ -2654,6 +2670,8 @@ nomem:
}
+
+
/**
* wpas_dbus_getter_state - Get interface state
* @iter: Pointer to incoming dbus message iter
--
2.7.4
More information about the Hostap
mailing list