diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index aea2bef0965c..46534eb8b73a 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -8407,20 +8407,17 @@ enum hdd_link_speed_rpt_type {
/*
*
- * gAP11ACOverride - Override 11AC in driver even if supplicant or hostapd
- * configures HT.
+ * gSAP11ACOverride - Override bw to 11ac for SAP in driver even if supplicant
+ * or hostapd configures HT.
* @Min: 0
* @Max: 1
- * @Default: 1
+ * @Default: 0
*
- * This ini is used to enable/disable 11AC override.
- * 1. P2P GO or SAP also follows start_bss and since p2p GO or SAP
- * could not be configured to setup VHT channel width in
- * wpa_supplicant, driver can override 11AC.
- * 2. Android UI does not provide advanced configuration options
- * for SoftAP
- * Default override enabled for android. MDM shall
- * disable it in ini
+ * This ini is used to enable/disable 11AC override for SAP.
+ * Android UI does not provide advanced configuration options
+ * for SoftAP for Android O and below.
+ * Default override disabled for android. Can be enabled from
+ * ini for Android O and below.
*
*
* Supported Feature: SAP
@@ -8430,11 +8427,35 @@ enum hdd_link_speed_rpt_type {
*
*
*/
+#define CFG_SAP_11AC_OVERRIDE_NAME "gSAP11ACOverride"
+#define CFG_SAP_11AC_OVERRIDE_MIN (0)
+#define CFG_SAP_11AC_OVERRIDE_MAX (1)
+#define CFG_SAP_11AC_OVERRIDE_DEFAULT (0)
-#define CFG_SAP_P2P_11AC_OVERRIDE_NAME "gAP11ACOverride"
-#define CFG_SAP_P2P_11AC_OVERRIDE_MIN (0)
-#define CFG_SAP_P2P_11AC_OVERRIDE_MAX (1)
-#define CFG_SAP_P2P_11AC_OVERRIDE_DEFAULT (1)
+/*
+ *
+ * gGO11ACOverride - Override bw to 11ac for P2P GO
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable 11AC override for GO.
+ * P2P GO also follows start_bss and since P2P GO could not be
+ * configured to setup VHT channel width in wpa_supplicant, driver
+ * can override 11AC.
+ *
+ *
+ * Supported Feature: P2P
+ *
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_GO_11AC_OVERRIDE_NAME "gGO11ACOverride"
+#define CFG_GO_11AC_OVERRIDE_MIN (0)
+#define CFG_GO_11AC_OVERRIDE_MAX (1)
+#define CFG_GO_11AC_OVERRIDE_DEFAULT (1)
#define CFG_SAP_DOT11MC "gSapDot11mc"
#define CFG_SAP_DOT11MC_MIN (0)
@@ -14688,7 +14709,8 @@ struct hdd_config {
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
bool sap_channel_avoidance;
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- uint8_t sap_p2p_11ac_override;
+ uint8_t sap_11ac_override;
+ uint8_t go_11ac_override;
uint8_t sap_dot11mc;
uint8_t prefer_non_dfs_on_radar;
bool ignore_peer_erp_info;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index d29031c2132b..96981fee1ce3 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3354,13 +3354,21 @@ struct reg_table_entry g_registry_table[] = {
CFG_SAP_MCC_CHANNEL_AVOIDANCE_MAX),
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- REG_VARIABLE(CFG_SAP_P2P_11AC_OVERRIDE_NAME, WLAN_PARAM_Integer,
- struct hdd_config, sap_p2p_11ac_override,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_SAP_P2P_11AC_OVERRIDE_DEFAULT,
- CFG_SAP_P2P_11AC_OVERRIDE_MIN,
- CFG_SAP_P2P_11AC_OVERRIDE_MAX),
+ REG_VARIABLE(CFG_SAP_11AC_OVERRIDE_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, sap_11ac_override,
+ VAR_FLAGS_OPTIONAL |
+ VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SAP_11AC_OVERRIDE_DEFAULT,
+ CFG_SAP_11AC_OVERRIDE_MIN,
+ CFG_SAP_11AC_OVERRIDE_MAX),
+
+ REG_VARIABLE(CFG_GO_11AC_OVERRIDE_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, go_11ac_override,
+ VAR_FLAGS_OPTIONAL |
+ VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_GO_11AC_OVERRIDE_DEFAULT,
+ CFG_GO_11AC_OVERRIDE_MIN,
+ CFG_GO_11AC_OVERRIDE_MAX),
REG_VARIABLE(CFG_ENABLE_RAMDUMP_COLLECTION, WLAN_PARAM_Integer,
struct hdd_config, is_ramdump_enabled,
@@ -6400,8 +6408,10 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
hdd_debug("Name = [sap_channel_avoidance] value = [%u]",
hdd_ctx->config->sap_channel_avoidance);
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- hdd_debug("Name = [%s] value = [%u]", CFG_SAP_P2P_11AC_OVERRIDE_NAME,
- hdd_ctx->config->sap_p2p_11ac_override);
+ hdd_debug("Name = [%s] value = [%u]", CFG_SAP_11AC_OVERRIDE_NAME,
+ hdd_ctx->config->sap_11ac_override);
+ hdd_debug("Name = [%s] value = [%u]", CFG_GO_11AC_OVERRIDE_NAME,
+ hdd_ctx->config->go_11ac_override);
hdd_debug("Name = [ChannelBondingMode] Value = [%u]",
hdd_ctx->config->nChannelBondingMode24GHz);
hdd_debug("Name = [%s] Value = [%u] ",
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index fe51e0807edf..f727e6628359 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -2560,14 +2560,16 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
}
/* ACS override for android */
- if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled &&
+ if (ht_enabled &&
sap_config->acs_cfg.end_ch >= WLAN_REG_CH_NUM(CHAN_ENUM_36) &&
- !(((adapter->device_mode == QDF_SAP_MODE) &&
- (hdd_ctx->config->sap_force_11n_for_11ac)) ||
- ((adapter->device_mode == QDF_P2P_GO_MODE) &&
- (hdd_ctx->config->go_force_11n_for_11ac)))) {
- hdd_debug("ACS Config override for 11AC vhtChannelWidth %d",
- hdd_ctx->config->vhtChannelWidth);
+ ((adapter->device_mode == QDF_SAP_MODE &&
+ !hdd_ctx->config->sap_force_11n_for_11ac &&
+ hdd_ctx->config->sap_11ac_override) ||
+ (adapter->device_mode == QDF_P2P_GO_MODE &&
+ !hdd_ctx->config->go_force_11n_for_11ac &&
+ hdd_ctx->config->go_11ac_override))) {
+ hdd_debug("ACS Config override for 11AC, vhtChannelWidth %d",
+ hdd_ctx->config->vhtChannelWidth);
vht_enabled = 1;
sap_config->acs_cfg.hw_mode = eCSR_DOT11_MODE_11ac;
sap_config->acs_cfg.ch_width =
@@ -15528,7 +15530,8 @@ void wlan_hdd_update_11n_mode(struct hdd_config *cfg)
if ((cfg->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY) ||
(cfg->dot11Mode == eHDD_DOT11_MODE_11ac)) {
cfg->dot11Mode = eHDD_DOT11_MODE_11n;
- cfg->sap_p2p_11ac_override = 0;
+ cfg->sap_11ac_override = 0;
+ cfg->go_11ac_override = 0;
}
}
}
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index b3e7cffa6d43..a64108bf6e63 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7199,16 +7199,17 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
* enable_sub_20_channel_width is non zero
*/
if (!hdd_ctx->config->enable_sub_20_channel_width &&
- hdd_ctx->config->sap_p2p_11ac_override &&
(sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n ||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac ||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY ||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax ||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) &&
- !(((ap_adapter->device_mode == QDF_SAP_MODE) &&
- (hdd_ctx->config->sap_force_11n_for_11ac)) ||
- ((ap_adapter->device_mode == QDF_P2P_GO_MODE) &&
- (hdd_ctx->config->go_force_11n_for_11ac)))) {
+ ((ap_adapter->device_mode == QDF_SAP_MODE &&
+ !hdd_ctx->config->sap_force_11n_for_11ac &&
+ hdd_ctx->config->sap_11ac_override) ||
+ (ap_adapter->device_mode == QDF_P2P_GO_MODE &&
+ !hdd_ctx->config->go_force_11n_for_11ac &&
+ hdd_ctx->config->go_11ac_override))) {
hdd_debug("** Driver force 11AC override for SAP/Go **");
/* 11n only shall not be overridden since it may be on purpose*/