SoftAp: Add support to configure acsShouldExcludeDfs.
This change is to make acsShouldExcludeDfs parameter configurable
using "config_wifi_softap_acs_include_dfs".
Bug: 156571063
Test: atest com.android.server.wifi.HostapdHalTest
Test: Manual - Connect STA in DFS channel and turn on SoftAp
and verify that SoftAp does't come up in DFS channel.
Change-Id: I33b527f95699e706901fe5e2d57e7dac92948ab0
diff --git a/service/java/com/android/server/wifi/HostapdHal.java b/service/java/com/android/server/wifi/HostapdHal.java
index 6ef0a7f..1ff8368 100644
--- a/service/java/com/android/server/wifi/HostapdHal.java
+++ b/service/java/com/android/server/wifi/HostapdHal.java
@@ -424,7 +424,8 @@
&& !mForceApChannel;
if (enableAcs) {
ifaceParams.channelParams.enableAcs = true;
- ifaceParams.channelParams.acsShouldExcludeDfs = true;
+ ifaceParams.channelParams.acsShouldExcludeDfs = !mContext.getResources()
+ .getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs);
}
ifaceParams.channelParams.channel =
mForceApChannel ? mForcedApChannel : config.getChannel();
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index 5d8a47c..635b3ad 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -414,4 +414,7 @@
<integer translatable="false" name="config_wifiMaxNativeFailureSelfRecoveryPerHour">2</integer>
<!-- Ignore the open saved network if from carrier provisioning app, there is a same open suggestion and a secure suggestion from same carrier available -->
<bool translatable="false" name="config_wifiIgnoreOpenSavedNetworkWhenSecureSuggestionAvailable">true</bool>
+
+ <!-- Wifi driver Automatic channel selection (ACS) for softap to include DFS channels -->
+ <bool translatable="false" name="config_wifiSoftapAcsIncludeDfs">false</bool>
</resources>
diff --git a/service/res/values/overlayable.xml b/service/res/values/overlayable.xml
index d0dd875..52ef09e 100644
--- a/service/res/values/overlayable.xml
+++ b/service/res/values/overlayable.xml
@@ -130,6 +130,7 @@
<item type="bool" name="config_wifiSaeUpgradeOffloadEnabled" />
<item type="integer" name="config_wifiMaxNativeFailureSelfRecoveryPerHour" />
<item type="bool" name="config_wifiIgnoreOpenSavedNetworkWhenSecureSuggestionAvailable" />
+ <item type="bool" name="config_wifiSoftapAcsIncludeDfs" />
<!-- Params from config.xml that can be overlayed -->
<!-- Params from strings.xml that can be overlayed -->