aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorSaurav Babu <saurav.babu@samsung.com>2016-05-11 05:37:23 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-13 15:53:04 (GMT)
commite8a1b6b8e9022f33b1b1f431758fd05b9be4fb8e (patch)
treeda1cafad2e2a7454b3f9516aaaa5035407efc723 /wpa_supplicant
parent7a1887faece4377f13e39bec0346ae2ffd573b79 (diff)
downloadhostap-e8a1b6b8e9022f33b1b1f431758fd05b9be4fb8e.zip
hostap-e8a1b6b8e9022f33b1b1f431758fd05b9be4fb8e.tar.gz
hostap-e8a1b6b8e9022f33b1b1f431758fd05b9be4fb8e.tar.bz2
D-Bus: Check driver capability for IBSS in Modes property of Capabilities
Instead of hardcoding "ad-hoc" in the array of supported capabilities, add this only if the driver indicates support for IBSS. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index da90ea1..27029c5 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -2639,8 +2639,9 @@ dbus_bool_t wpas_dbus_getter_capabilities(
&iter_array) ||
!wpa_dbus_dict_string_array_add_element(
&iter_array, "infrastructure") ||
- !wpa_dbus_dict_string_array_add_element(
- &iter_array, "ad-hoc") ||
+ (res >= 0 && (capa.flags & WPA_DRIVER_FLAGS_IBSS) &&
+ !wpa_dbus_dict_string_array_add_element(
+ &iter_array, "ad-hoc")) ||
(res >= 0 && (capa.flags & WPA_DRIVER_FLAGS_AP) &&
!wpa_dbus_dict_string_array_add_element(
&iter_array, "ap")) ||