binder: Add network request/response interface
1. Add a callback function in |INetworkCallback| to make
any control requests on the corresponding network to registered
callback clients.
2. Add a function in |INetwork| to send responses to the above
request from the clients.
These are used when there is a need to perform external
SIM authentication for example.
While there, fix a nit:
Network.SetSSID() is setting a regular byte array field and
not a key field.
BUG: 30815238
TEST: This will have to wait for wificond integration for testing.
Change-Id: I8bfb9c381159373697ae8d1a0d7b999fca19b3a9
Signed-off-by: Roshan Pius <rpius@google.com>
diff --git a/wpa_supplicant/binder/binder.h b/wpa_supplicant/binder/binder.h
index 7afc6ef..045a4fa 100644
--- a/wpa_supplicant/binder/binder.h
+++ b/wpa_supplicant/binder/binder.h
@@ -33,6 +33,9 @@
int wpas_binder_unregister_network(
struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
int wpas_binder_notify_state_changed(struct wpa_supplicant *wpa_s);
+int wpas_binder_notify_network_request(
+ struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
+ enum wpa_ctrl_req_type rtype, const char *default_txt);
#else /* CONFIG_CTRL_IFACE_BINDER */
static inline int wpas_binder_register_interface(struct wpa_supplicant *wpa_s)
{
@@ -56,6 +59,12 @@
{
return 0;
}
+static inline int wpas_binder_notify_network_request(
+ struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
+ enum wpa_ctrl_req_type rtype, const char *default_txt)
+{
+ return 0;
+}
#endif /* CONFIG_CTRL_IFACE_BINDER */
#ifdef _cplusplus