hikey32: Set bootloader version demand to 0.7 am: 8ba551fd28 am: fbf9aeacc5
am: 9ce5d6d103

Change-Id: Ia73bf2d9ccaf8475e6ddf110f15bb2c7f89693e6
diff --git a/init.common.rc b/init.common.rc
index 9feaacc..0ed0152 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)
@@ -94,6 +99,8 @@
 service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant \
      -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
      -g@android:wpa_wlan0
+     interface android.hardware.wifi.supplicant@1.0::ISupplicant default
+     interface android.hardware.wifi.supplicant@1.1::ISupplicant default
      socket wpa_wlan0 dgram 660 wifi wifi
      class main
      disabled
diff --git a/manifest.xml b/manifest.xml
index 61da9eb..0971a19 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -45,10 +45,19 @@
         </interface>
     </hal>
     <hal format="hidl">
-        <name>android.hardware.wifi.supplicant</name>
+        <name>android.hardware.wifi.hostapd</name>
         <transport>hwbinder</transport>
         <version>1.0</version>
         <interface>
+            <name>IHostapd</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.wifi.supplicant</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
             <name>ISupplicant</name>
             <instance>default</instance>
         </interface>
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;
diff --git a/sepolicy/hostapd.te b/sepolicy/hostapd.te
deleted file mode 100644
index 86b985a..0000000
--- a/sepolicy/hostapd.te
+++ /dev/null
@@ -1,11 +0,0 @@
-# TODO(b/36657258): Remove data_between_core_and_vendor_violators once
-# hostapd no longer directly accesses /data outside /data/vendor.
-typeattribute hostapd data_between_core_and_vendor_violators;
-# hostapd can read and write WiFi related data and configuration.
-allow hostapd wifi_data_file:file rw_file_perms;
-r_dir_file(hostapd, wifi_data_file)
-
-# hostapd wants to create the directory holding its control socket.
-allow hostapd hostapd_socket:dir create_dir_perms;
-# hostapd needs to create, bind to, read, and write its control socket.
-allow hostapd hostapd_socket:sock_file create_file_perms;