diff --git a/conf/init.felix.rc b/conf/init.felix.rc index 1328b9f..8e31082 100644 --- a/conf/init.felix.rc +++ b/conf/init.felix.rc @@ -111,3 +111,18 @@ on property:persist.vendor.se.ese2.mode=ctsmode on property:sys.retaildemo.enabled=1 setprop persist.vendor.charge.stop.level 35 setprop persist.vendor.charge.start.level 30 + +# WiFi +on post-fs-data + setprop wifi.direct.interface p2p-dev-wlan0 + setprop wifi.aware.interface aware_nmi0 + +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 diff --git a/felix/BoardConfig.mk b/felix/BoardConfig.mk index 6f33c15..87aa2f4 100644 --- a/felix/BoardConfig.mk +++ b/felix/BoardConfig.mk @@ -23,3 +23,4 @@ include device/google/gs201/BoardConfig-common.mk -include vendor/google_devices/gs201/prebuilts/BoardConfigVendor.mk -include vendor/google_devices/felix/proprietary/BoardConfigVendor.mk include device/google/felix-sepolicy/felix-sepolicy.mk +include device/google/felix/wifi/BoardConfig-wifi.mk diff --git a/wifi/BoardConfig-wifi.mk b/wifi/BoardConfig-wifi.mk new file mode 100644 index 0000000..1b21c5f --- /dev/null +++ b/wifi/BoardConfig-wifi.mk @@ -0,0 +1,37 @@ +# +# Copyright (C) 2022 The Android Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# WiFi +BOARD_WLAN_DEVICE := bcmdhd +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +BOARD_HOSTAPD_DRIVER := NL80211 +# Wifi interface combination - {1 STA + 1 AP} or {1 STA + 1 AP_BRIDGED} or {1 STA + 1 P2P} +# or {1 STA + 1 NAN} or {2 STA} +WIFI_HAL_INTERFACE_COMBINATIONS := {{{STA}, 1}, {{P2P, NAN, AP, AP_BRIDGED}, 1}}, {{{STA}, 2}} +WIFI_FEATURE_WIFI_EXT_HAL := true +WIFI_FEATURE_IMU_DETECTION := true +# Avoid Wifi reset on MAC Address change +WIFI_AVOID_IFACE_RESET_MAC_CHANGE := true +WIFI_FEATURE_HOSTAPD_11AX := true +BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL := true + +PRODUCT_COPY_FILES += \ + device/google/pantah/wifi/p2p_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant.conf \ + device/google/pantah/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf + diff --git a/wifi/p2p_supplicant.conf b/wifi/p2p_supplicant.conf new file mode 100644 index 0000000..2f0bc1b --- /dev/null +++ b/wifi/p2p_supplicant.conf @@ -0,0 +1,9 @@ +driver_param=use_p2p_group_interface=1p2p_device=1 +update_config=1 +eapol_version=1 +ap_scan=1 +fast_reauth=1 +pmf=1 +p2p_add_cli_chan=1 +disable_scan_offload=1 +p2p_go_vht=1 diff --git a/wifi/wpa_supplicant_overlay.conf b/wifi/wpa_supplicant_overlay.conf new file mode 100644 index 0000000..6f274c1 --- /dev/null +++ b/wifi/wpa_supplicant_overlay.conf @@ -0,0 +1,10 @@ +sae_pwe=2 +driver_param=use_p2p_group_interface=1p2p_device=1 +disable_scan_offload=1 +wowlan_triggers=any +bss_max_count=512 +interworking=1 +hs20=1 +auto_interworking=0 +bss_no_flush_when_down=1 +btm_offload=1