binder: Implement network addition/removal
Implement the |IIface.AddNetwork| & |IIface.RemoveNetwork| binder calls.
Also hookup the network addition notifications to BinderManager for
creating corresponding network binder objects. The network binder
objects are keyed using |ifname|_|network_id|.
BUG: 30015382
Change-Id: I0842563e74ff8b120d34f63fa28965bf264bb55f
TEST: Ran the integration tests under |wificond|.
Signed-off-by: Roshan Pius <rpius@google.com>
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index 536f3e6..b2b4225 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -328,8 +328,10 @@
* applications since these network objects won't behave like
* regular ones.
*/
- if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)
+ if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s) {
wpas_dbus_register_network(wpa_s, ssid);
+ wpas_binder_register_network(wpa_s, ssid);
+ }
}
@@ -359,8 +361,10 @@
if (wpa_s->wpa)
wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s &&
- !wpa_s->p2p_mgmt)
+ !wpa_s->p2p_mgmt) {
wpas_dbus_unregister_network(wpa_s, ssid->id);
+ wpas_binder_unregister_network(wpa_s, ssid);
+ }
if (network_is_persistent_group(ssid))
wpas_notify_persistent_group_removed(wpa_s, ssid);