aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorNaveen Singh <nasingh@google.com>2016-03-03 18:48:09 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-06 18:44:51 (GMT)
commitc7fb678f3109e62af1ef39be9b12bf8370c35bde (patch)
tree2f7b519a93399db621c5c8dfaf7a2ab415fa8e17 /wpa_supplicant/dbus/dbus_new_handlers.c
parent2940bf669ab53576bf1028012fcc538989f0df9b (diff)
downloadhostap-c7fb678f3109e62af1ef39be9b12bf8370c35bde.zip
hostap-c7fb678f3109e62af1ef39be9b12bf8370c35bde.tar.gz
hostap-c7fb678f3109e62af1ef39be9b12bf8370c35bde.tar.bz2
D-Bus: Add association response status code property for failure cases
(Re)Association Response frame with status code other than 0 is now notified over DBUS as a part of PropertiesChanged signal. This can be used by application in case AP is denying association with status code 17 (band steering) so that it does not interfere in the BSSID selection logic of wpa_supplicant. Signed-off-by: Naveen Singh <nasingh@google.com>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 09461c5..da90ea1 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -2858,6 +2858,27 @@ dbus_bool_t wpas_dbus_getter_disconnect_reason(
/**
+ * wpas_dbus_getter_assoc_status_code - Get most recent failed assoc status code
+ * @iter: Pointer to incoming dbus message iter
+ * @error: Location to store error on failure
+ * @user_data: Function specific data
+ * Returns: TRUE on success, FALSE on failure
+ *
+ * Getter for "AssocStatusCode" property.
+ */
+dbus_bool_t wpas_dbus_getter_assoc_status_code(
+ const struct wpa_dbus_property_desc *property_desc,
+ DBusMessageIter *iter, DBusError *error, void *user_data)
+{
+ struct wpa_supplicant *wpa_s = user_data;
+ dbus_int32_t status_code = wpa_s->assoc_status_code;
+
+ return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_INT32,
+ &status_code, error);
+}
+
+
+/**
* wpas_dbus_getter_bss_expire_age - Get BSS entry expiration age
* @iter: Pointer to incoming dbus message iter
* @error: Location to store error on failure