hikey: wpa_supplicant: move control sockets to /data/vendor

Treble compliance.

Bug: 70228425
Bug: 70393317
Test: Manual

Change-Id: Ia9c7a903307e7b7b86369199eb3195667d0a5da6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/init.common.rc b/init.common.rc
index 9feaacc..81afbad 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -61,6 +61,11 @@
     # Set SELinux security contexts for files used by lava.
     restorecon_recursive /data/local/tmp/lava
 
+on zygote-start
+    mkdir /data/vendor/wifi 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+
 on property:sys.boot_completed=1
     # update cpuset now that processors are up
     # Foreground should contain most cores (7 is reserved for top-app)
diff --git a/sepolicy/hal_wifi_supplicant_default.te b/sepolicy/hal_wifi_supplicant_default.te
index 3646bac..c657db5 100644
--- a/sepolicy/hal_wifi_supplicant_default.te
+++ b/sepolicy/hal_wifi_supplicant_default.te
@@ -4,7 +4,3 @@
 
 allow hal_wifi_supplicant_default wifi_data_file:dir create_dir_perms;
 allow hal_wifi_supplicant_default wifi_data_file:file create_file_perms;
-
-# Create a socket for receiving info from wpa
-allow hal_wifi_supplicant_default wpa_socket:dir create_dir_perms;
-allow hal_wifi_supplicant_default wpa_socket:sock_file create_file_perms;