From c38d0a2d4ca14f96281256a1ac4479538849ccb8 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Mon, 11 Jul 2022 18:54:12 +0800 Subject: [PATCH] p2p: fix p2p configuration The correct path should be under /data, or it is not writable. wpa_supplicant now support p2p overlay configuration, a unified wpa_supplicant init entry can be used. Bug: 238601241 Test: create a group and check this group is persisted after reboot Change-Id: I3c5523626de22c26cb562c03e9fbd7aabf6d98e7 --- Android.mk | 2 +- conf/init.gs101.rc | 11 ----------- device.mk | 2 +- wifi/BoardConfig-wifi.mk | 2 +- ...2p_supplicant.conf => p2p_supplicant_overlay.conf} | 0 5 files changed, 3 insertions(+), 14 deletions(-) rename wifi/{p2p_supplicant.conf => p2p_supplicant_overlay.conf} (100%) diff --git a/Android.mk b/Android.mk index 40726555..de54c3a4 100644 --- a/Android.mk +++ b/Android.mk @@ -32,7 +32,7 @@ $(eval $(call declare-copy-files-license-metadata,device/google/gs101,media_prof $(eval $(call declare-copy-files-license-metadata,device/google/gs101,media_codecs_performance.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) $(eval $(call declare-copy-files-license-metadata,device/google/gs101,device_state_configuration.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) $(eval $(call declare-copy-files-license-metadata,device/google/gs101,task_profiles.json,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) -$(eval $(call declare-copy-files-license-metadata,device/google/gs101,p2p_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) +$(eval $(call declare-copy-files-license-metadata,device/google/gs101,p2p_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) $(eval $(call declare-copy-files-license-metadata,device/google/gs101,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) $(eval $(call declare-copy-files-license-metadata,device/google/gs101,wpa_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,)) diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc index 4dde67d8..d174880f 100644 --- a/conf/init.gs101.rc +++ b/conf/init.gs101.rc @@ -621,17 +621,6 @@ service abox /vendor/bin/main_abox 17c50000.abox group audioserver seclabel u:r:abox:s0 -service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ - -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \ - -m/vendor/etc/wifi/p2p_supplicant.conf \ - -g@android:wpa_wlan0 -dd - interface aidl android.hardware.wifi.supplicant.ISupplicant/default - socket wpa_wlan0 dgram 660 wifi wifi - class main - disabled - oneshot - - # GPS service lhd /vendor/bin/hw/lhd /vendor/etc/gnss/lhd.conf class main diff --git a/device.mk b/device.mk index 0618c8a9..6903e5b8 100644 --- a/device.mk +++ b/device.mk @@ -707,7 +707,7 @@ PRODUCT_CHARACTERISTICS := nosdcard # WPA SUPPLICANT PRODUCT_COPY_FILES += \ - device/google/gs101/wifi/p2p_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant.conf \ + device/google/gs101/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \ device/google/gs101/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf # WIFI COEX diff --git a/wifi/BoardConfig-wifi.mk b/wifi/BoardConfig-wifi.mk index 58a97780..a9dc7db6 100644 --- a/wifi/BoardConfig-wifi.mk +++ b/wifi/BoardConfig-wifi.mk @@ -30,4 +30,4 @@ WIFI_FEATURE_IMU_DETECTION := true WIFI_AVOID_IFACE_RESET_MAC_CHANGE := true WIFI_FEATURE_HOSTAPD_11AX := true BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL := true - +WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true diff --git a/wifi/p2p_supplicant.conf b/wifi/p2p_supplicant_overlay.conf similarity index 100% rename from wifi/p2p_supplicant.conf rename to wifi/p2p_supplicant_overlay.conf