Signed-off-by: Avichal Agarwal <avichal.a@xxxxxxxxxxx> Signed-off-by: Mayank Haarit <mayank.h@xxxxxxxxxxx> --- wpa_supplicant/ctrl_iface.c | 4 +- wpa_supplicant/dbus/dbus_new_handlers.c | 21 + wpa_supplicant/wpa_supplicant_i.h | 4 + 4 files changed, 10159 insertions(+), 2 deletions(-) create mode 100644 wpa_supplicant/dbus/1 diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index a754943..5aa51fe 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -3846,7 +3846,7 @@ static int ctrl_iface_get_capability_modes(int res, char *strict, } -static int ctrl_iface_get_capability_channels(struct wpa_supplicant *wpa_s, +int ctrl_iface_get_capability_channels(struct wpa_supplicant *wpa_s, char *buf, size_t buflen) { struct hostapd_channel_data *chnl; @@ -3896,7 +3896,7 @@ static int ctrl_iface_get_capability_channels(struct wpa_supplicant *wpa_s, } -static int ctrl_iface_get_capability_freq(struct wpa_supplicant *wpa_s, +int ctrl_iface_get_capability_freq(struct wpa_supplicant *wpa_s, char *buf, size_t buflen) { struct hostapd_channel_data *chnl; diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index e11dd36..58d4e92 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -2642,6 +2642,27 @@ dbus_bool_t wpas_dbus_getter_capabilities( goto nomem; } + if (res >= 0) { + char buf[4096]; + int len=4096; + if( ctrl_iface_get_capability_freq(wpa_s, buf, len)) + { + if(!wpa_dbus_dict_append_string(&iter_dict, "Frequency", buf)) + goto nomem; + } + } + + if (res >= 0) { + char buf[4096]; + int len=4096; + if(ctrl_iface_get_capability_channels(wpa_s, buf, len)) + { + if(!wpa_dbus_dict_append_string(&iter_dict, "Channels", buf)) + goto nomem; + } + + } + if (!wpa_dbus_dict_close_write(&variant_iter, &iter_dict) || !dbus_message_iter_close_container(iter, &variant_iter)) goto nomem; diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index ec6917a..4f337db 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1077,7 +1077,11 @@ struct wpa_supplicant { struct os_reltime lci_time; }; +int ctrl_iface_get_capability_freq(struct wpa_supplicant *wpa_s, + char *buf, size_t buflen); +int ctrl_iface_get_capability_channels(struct wpa_supplicant *wpa_s, + char *buf, size_t buflen); /* wpa_supplicant.c */ void wpa_supplicant_apply_ht_overrides( struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, -- 2.7.4 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap