aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Chen <jimmycmchen@google.com>2022-07-10 10:25:21 +0800
committerJimmy Chen <jimmycmchen@google.com>2022-08-04 01:26:32 +0000
commit115616ef1b52a5df12dfc4162a442a8e3171e50e (patch)
tree7473f4c736666d494e3916e433a115ad1bf9043e
parent6f3aa559f8dd7d90eb80201dd35f0664aa6ceedd (diff)
downloadwpa_supplicant_8-115616ef1b52a5df12dfc4162a442a8e3171e50e.tar.gz
wifi: HIDL/AIDL register networks when p2p dev interface added
persistent groups are not registered to the AIDL network map, hence wifi service gets errors on getting the group information. If p2p uses dedicated interface, register the network whose SSID starts with DIRECT-. Bug: 238529085 Bug: 238601241 Test: create a persistent group, turn off wifi, turn on wifi, check saved group Merged-In: Ib61459774d9afe236c4cc09023b87d718f23b831 Change-Id: Ib61459774d9afe236c4cc09023b87d718f23b831
-rw-r--r--wpa_supplicant/wpa_supplicant.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 24c8818f..cb429940 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -7175,11 +7175,15 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
return NULL;
}
- /* Notify the control interfaces about new networks for non p2p mgmt
- * ifaces. */
- if (iface->p2p_mgmt == 0) {
- for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
+ /* Notify the control interfaces about new networks */
+ for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
+ if (iface->p2p_mgmt == 0) {
wpas_notify_network_added(wpa_s, ssid);
+ } else if (ssid->ssid_len > P2P_WILDCARD_SSID_LEN
+ && os_strncmp((const char *) ssid->ssid,
+ P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN) == 0) {
+ wpas_notify_persistent_group_added(wpa_s, ssid);
+ }
}
wpa_s->next = global->ifaces;