From 0786af077c5d504913f584bc1116761960e33563 Mon Sep 17 00:00:00 2001 From: Ye Jiao Date: Mon, 13 Mar 2023 10:33:50 +0800 Subject: [PATCH] Add config to skip state toggle off/on for Wi-Fi NAN If STA and NAN share the same iface wlan0, Wi-Fi vendor HAL service sends eventDisabled to NAN framework when STA setMacAddress to wlan0. This disables NAN when STA is turned on. Since NAN always uses its own random MAC instead of using MAC of STA, this action is not necessary and gets NAN kicked off for no benefits. We add a build time configuration to optionally disable this behavior. Bug: 273426515 Test: manually test Change-Id: If0d84b3898387b75392c8012640bc728126f2cff --- core/board_config_wifi.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/board_config_wifi.mk b/core/board_config_wifi.mk index ddeb0d7d6d..a7360992ae 100644 --- a/core/board_config_wifi.mk +++ b/core/board_config_wifi.mk @@ -74,4 +74,7 @@ ifdef WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION endif ifdef WIFI_AVOID_IFACE_RESET_MAC_CHANGE $(call soong_config_set,wifi,avoid_iface_reset_mac_change,true) -endif \ No newline at end of file +endif +ifdef WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN + $(call soong_config_set,wifi,wifi_skip_state_toggle_off_on_for_nan,true) +endif