WPS: Add WPS Cancel method over D-Bus interface
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
This commit is contained in:
parent
eda9d84dfd
commit
87d3c62835
4 changed files with 33 additions and 0 deletions
|
@ -877,6 +877,10 @@ Interface for performing WPS (Wi-Fi Simple Config) operations.
|
||||||
<dd>Invalid entries were found in the passed argument.</dd>
|
<dd>Invalid entries were found in the passed argument.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<h3>Cancel ( nothing ) --> nothing</h3>
|
||||||
|
<p>Cancel ongoing WPS operation.</p>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
\subsection dbus_wps_properties Properties
|
\subsection dbus_wps_properties Properties
|
||||||
|
|
|
@ -2583,6 +2583,12 @@ static const struct wpa_dbus_method_desc wpas_dbus_interface_methods[] = {
|
||||||
END_ARGS
|
END_ARGS
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ "Cancel", WPAS_DBUS_NEW_IFACE_WPS,
|
||||||
|
(WPADBusMethodHandler) wpas_dbus_handler_wps_cancel,
|
||||||
|
{
|
||||||
|
END_ARGS
|
||||||
|
}
|
||||||
|
},
|
||||||
#endif /* CONFIG_WPS */
|
#endif /* CONFIG_WPS */
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
{ "Find", WPAS_DBUS_NEW_IFACE_P2PDEVICE,
|
{ "Find", WPAS_DBUS_NEW_IFACE_P2PDEVICE,
|
||||||
|
|
|
@ -291,6 +291,9 @@ dbus_bool_t wpas_dbus_setter_network_properties(DBusMessageIter *iter,
|
||||||
DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message,
|
DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message,
|
||||||
struct wpa_supplicant *wpa_s);
|
struct wpa_supplicant *wpa_s);
|
||||||
|
|
||||||
|
DBusMessage * wpas_dbus_handler_wps_cancel(DBusMessage *message,
|
||||||
|
struct wpa_supplicant *wpa_s);
|
||||||
|
|
||||||
dbus_bool_t wpas_dbus_getter_process_credentials(DBusMessageIter *iter,
|
dbus_bool_t wpas_dbus_getter_process_credentials(DBusMessageIter *iter,
|
||||||
DBusError *error, void *user_data);
|
DBusError *error, void *user_data);
|
||||||
|
|
||||||
|
|
|
@ -319,6 +319,26 @@ DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wpas_dbus_handler_wps_cancel - Cancel ongoing WPS configuration
|
||||||
|
* @message: Pointer to incoming dbus message
|
||||||
|
* @wpa_s: %wpa_supplicant data structure
|
||||||
|
* Returns: NULL on success or DBus error on failure
|
||||||
|
*
|
||||||
|
* Handler for "Cancel" method call. Returns NULL if WPS cancel successfull
|
||||||
|
* or DBus error on WPS cancel failure
|
||||||
|
*/
|
||||||
|
DBusMessage * wpas_dbus_handler_wps_cancel(DBusMessage *message,
|
||||||
|
struct wpa_supplicant *wpa_s)
|
||||||
|
{
|
||||||
|
if (wpas_wps_cancel(wpa_s))
|
||||||
|
return wpas_dbus_error_unknown_error(message,
|
||||||
|
"WPS cancel failed");
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpas_dbus_getter_process_credentials - Check if credentials are processed
|
* wpas_dbus_getter_process_credentials - Check if credentials are processed
|
||||||
* @message: Pointer to incoming dbus message
|
* @message: Pointer to incoming dbus message
|
||||||
|
|
Loading…
Reference in a new issue