aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-06-03 05:20:02 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-06-03 05:20:02 +0000
commit80ec1ea19d4713c56c2fda94c73aee8222893e81 (patch)
treefa1481af9e762033995ab4d4d6eff61863f1f5e9
parent7e882ec657d000272d6fc0dbc3342e269ad5776e (diff)
parent653883d277084a90792d727475de3744db7cf379 (diff)
downloadwpa_supplicant_8-80ec1ea19d4713c56c2fda94c73aee8222893e81.tar.gz
Snap for 10255078 from 653883d277084a90792d727475de3744db7cf379 to udc-qpr1-release
Change-Id: I3919bdbcb508e78a9412640cccdbff1a229b5236
-rw-r--r--wpa_supplicant/notify.c19
-rw-r--r--wpa_supplicant/wpa_supplicant.c9
2 files changed, 21 insertions, 7 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index 943897df..89a0389e 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -37,6 +37,16 @@ int wpas_notify_supplicant_initialized(struct wpa_global *global)
}
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
+#ifdef CONFIG_AIDL
+ // Initialize AIDL here if daemonize is disabled.
+ // Otherwise initialize it later.
+ if (!global->params.daemonize) {
+ global->aidl = wpas_aidl_init(global);
+ if (!global->aidl)
+ return -1;
+ }
+#endif /* CONFIG_AIDL */
+
return 0;
}
@@ -63,13 +73,14 @@ int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
}
#ifdef CONFIG_AIDL
- /* AIDL initialization may not be complete at this point.
+ /*
+ * AIDL initialization may not be complete here if daemonize is enabled.
* Initialization is done after daemonizing in order to avoid
* issues with the file descriptor.
*/
- if (!wpa_s || !wpa_s->global->aidl)
+ if (!wpa_s->global->aidl)
return 0;
- /* HIDL interface wants to keep track of the P2P mgmt iface. */
+ /* AIDL interface wants to keep track of the P2P mgmt iface. */
if (wpas_aidl_register_interface(wpa_s))
return -1;
#endif
@@ -85,7 +96,7 @@ void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s)
wpas_dbus_unregister_interface(wpa_s);
}
- /* HIDL interface wants to keep track of the P2P mgmt iface. */
+ /* AIDL interface wants to keep track of the P2P mgmt iface. */
wpas_aidl_unregister_interface(wpa_s);
}
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 99ecef8d..287bc9e6 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -7920,9 +7920,12 @@ int wpa_supplicant_run(struct wpa_global *global)
}
#ifdef CONFIG_AIDL
- global->aidl = wpas_aidl_init(global);
- if (!global->aidl)
- return -1;
+ // If daemonize is enabled, initialize AIDL here.
+ if (global->params.daemonize) {
+ global->aidl = wpas_aidl_init(global);
+ if (!global->aidl)
+ return -1;
+ }
#endif /* CONFIG_AIDL */
eloop_register_signal_terminate(wpa_supplicant_terminate, global);