[PATCH] D-Bus: Check Driver capability for IBSS in Modes property of Capabilities

Saurav Babu saurav.babu at samsung.com
Tue May 10 22:37:23 PDT 2016


Signed-off-by: Saurav Babu <saurav.babu at samsung.com>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 5 +++--
 1 file 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..c6c3a0d 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")) ||
-- 
1.9.1




More information about the Hostap mailing list