RM6785: Compile wpa_supplicant from source

Change-Id: Id59b8289440c5ae3ab2f9e287d2a10ea94f7b7bf
Signed-off-by: bengris32 <bengris32@protonmail.ch>
diff --git a/Android.mk b/Android.mk
index af53642..b0b7163 100644
--- a/Android.mk
+++ b/Android.mk
@@ -11,6 +11,4 @@
   $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
 
 include $(CLEAR_VARS)
-include external/wpa_supplicant_8/hostapd/Android.mk
-
 endif
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 1e4cdb3..6c44bc2 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -136,5 +136,15 @@
 TARGET_VIBRATOR_SUPPORTS_EFFECTS := true
 
 # Wi-Fi
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
 BOARD_HOSTAPD_DRIVER := NL80211
+WIFI_DRIVER_FW_PATH_PARAM := "/dev/wmtWifi"
+WIFI_DRIVER_FW_PATH_STA := "STA"
+WIFI_DRIVER_FW_PATH_AP := "AP"
+WIFI_DRIVER_FW_PATH_P2P := "P2P"
+WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wmtWifi"
+WIFI_DRIVER_STATE_ON := "1"
+WIFI_DRIVER_STATE_OFF := "0"
+WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
 WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
diff --git a/RM6785.mk b/RM6785.mk
index 84d14e0..373cf57 100644
--- a/RM6785.mk
+++ b/RM6785.mk
@@ -346,10 +346,8 @@
     TetheringConfigOverlayRM6785 \
     WifiOverlayRM6785 \
     hostapd \
-    android.hardware.wifi-service.RM6785 \
-    android.hardware.wifi.supplicant@1.3.vendor:64 \
-    libkeystore-engine-wifi-hidl:64 \
-    libkeystore-wifi-hidl:64
+    wpa_supplicant \
+    android.hardware.wifi-service.RM6785
 
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/configs/wifi/txpowerctrl.cfg:$(TARGET_COPY_OUT_VENDOR)/firmware/txpowerctrl.cfg \
diff --git a/manifest.xml b/manifest.xml
index 909ab79..70ab0e4 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -393,15 +393,6 @@
         </interface>
     </hal>
     <hal format="hidl">
-        <name>vendor.mediatek.hardware.wifi.supplicant</name>
-        <transport>hwbinder</transport>
-        <version>2.0</version>
-        <interface>
-            <name>ISupplicant</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
         <name>vendor.nxp.nxpnfc</name>
         <transport>hwbinder</transport>
         <version>1.0</version>
diff --git a/proprietary-files.txt b/proprietary-files.txt
index af0a28c..06bdd7c 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1923,14 +1923,11 @@
 odm/firmware/fastchg/20682/oplus_vooc_fw.bin
 
 # Wifi
--vendor/bin/hw/wpa_supplicant
 -vendor/bin/stp_dump3
 -vendor/bin/wfca
 -vendor/bin/wlan_assistant
 -vendor/bin/wmt_launcher
 -vendor/bin/wmt_loader
--vendor/bin/wpa_cli
-vendor/etc/init/android.hardware.wifi.supplicant-service.rc
 vendor/etc/init/init.wfca.rc
 vendor/etc/init/init.wlan_drv.rc
 vendor/etc/init/init.wmt_drv.rc
@@ -1940,13 +1937,7 @@
 vendor/etc/wifi/wpa_supplicant.conf
 vendor/etc/wifi/wpa_supplicant_overlay.conf
 -vendor/lib64/libwifi-hal.so:vendor/lib64/libwifi-hal-mtk.so
--vendor/lib64/libwapi.so
 -vendor/lib64/libwifitest.so
--vendor/lib64/libwpa_client.so
--vendor/lib64/vendor.mediatek.hardware.wifi.supplicant@2.0.so
--vendor/lib64/vendor.mediatek.hardware.wifi.supplicant@2.1.so
--vendor/lib64/vendor.mediatek.hardware.wifi.supplicant@2.2.so
--vendor/lib64/vendor.oplus.hardware.wifi.supplicant@2.0.so
 
 # Wifi (Firmware)
 vendor/firmware/WIFI_RAM_CODE_soc1_0_2a_1.bin
diff --git a/sepolicy/vendor/hwservice_contexts b/sepolicy/vendor/hwservice_contexts
index fa21862..9ae95b8 100644
--- a/sepolicy/vendor/hwservice_contexts
+++ b/sepolicy/vendor/hwservice_contexts
@@ -12,6 +12,3 @@
 # Radio
 vendor.oplus.hardware.radio::IOplusRadio u:object_r:hal_telephony_hwservice:s0
 vendor.oplus.hardware.appradio::IOplusAppRadio u:object_r:hal_telephony_hwservice:s0
-
-# Wifi
-vendor.oplus.hardware.wifi.supplicant::IOplusSupplicant u:object_r:hal_wifi_supplicant_hwservice:s0