aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2017-01-12 16:13:26 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-14 15:28:00 (GMT)
commitadf8f45f8af27a9ac9429ecde81776b19b6f9224 (patch)
tree4b79fa73ff60eee2dfc15d81bd790a723fe3fbff /wpa_supplicant/dbus/dbus_new_handlers.c
parentb98706c14b8ff8439e596c60eb123b78eb4f5a8f (diff)
downloadhostap-adf8f45f8af27a9ac9429ecde81776b19b6f9224.zip
hostap-adf8f45f8af27a9ac9429ecde81776b19b6f9224.tar.gz
hostap-adf8f45f8af27a9ac9429ecde81776b19b6f9224.tar.bz2
D-Bus: Implement Pmf property
The Pmf property is documented in doc/dbus.doxygen, but does not exist, so implement it. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index e36226d..0943010 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -2787,6 +2787,61 @@ dbus_bool_t wpas_dbus_setter_ap_scan(
}
+#ifdef CONFIG_IEEE80211W
+
+/**
+ * wpas_dbus_getter_pmf - Control PMF default
+ * @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 function for "Pmf" property.
+ */
+dbus_bool_t wpas_dbus_getter_pmf(
+ const struct wpa_dbus_property_desc *property_desc,
+ DBusMessageIter *iter, DBusError *error, void *user_data)
+{
+ struct wpa_supplicant *wpa_s = user_data;
+ dbus_uint32_t pmf = wpa_s->conf->pmf;
+
+ return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_UINT32,
+ &pmf, error);
+}
+
+
+/**
+ * wpas_dbus_setter_pmf - Control PMF default
+ * @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
+ *
+ * Setter function for "Pmf" property.
+ */
+dbus_bool_t wpas_dbus_setter_pmf(
+ const struct wpa_dbus_property_desc *property_desc,
+ DBusMessageIter *iter, DBusError *error, void *user_data)
+{
+ struct wpa_supplicant *wpa_s = user_data;
+ dbus_uint32_t pmf;
+
+ if (!wpas_dbus_simple_property_setter(iter, error, DBUS_TYPE_UINT32,
+ &pmf))
+ return FALSE;
+
+ if (pmf > 2) {
+ dbus_set_error_const(error, DBUS_ERROR_FAILED,
+ "Pmf must be 0, 1, or 2");
+ return FALSE;
+ }
+ wpa_s->conf->pmf = pmf;
+ return TRUE;
+}
+
+#endif /* CONFIG_IEEE80211W */
+
+
/**
* wpas_dbus_getter_fast_reauth - Control fast
* reauthentication (TLS session resumption)