summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2018-05-09 16:48:56 +0530
committernshrivas <nshrivas@codeaurora.org>2018-05-18 02:42:16 -0700
commitdcf4faa6aee0229f7d9e52b07f0ef6a9ee530f53 (patch)
tree903109f8ca3a9fdfac2f019b1b2125f465036f93
parent08e690e20460a0558ae56cf7c06dcfeed7a3993b (diff)
qcacld-3.0: Break gAP11ACOverride for SAP and P2P GO
Presently, gAP11ACOverride is used to do 11ac override for both SAP and P2P GO. So, enabling 11ac override in SAP and disbaling it in P2P GO or vice versa is not possible as per current design. This causes issue in the latest framework where 11ac override is not needed for SAP but is required for P2P GO. Break gAP11ACOverride into 2 inis, one for SAP and one for P2P GO to have better control over the functionality. Change-Id: I3809b91a80077d6d9958fe8e0bb770f960b691d6 CRs-Fixed: 2240387
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h52
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c28
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c15
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c11
4 files changed, 72 insertions, 34 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 827091eb6b55..a89f2e615ae5 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -9027,21 +9027,44 @@ enum hdd_link_speed_rpt_type {
#define CFG_SAP_MCC_CHANNEL_AVOIDANCE_MAX (1)
#define CFG_SAP_MCC_CHANNEL_AVOIDANCE_DEFAULT (0)
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
+/*
+ * <ini>
+ * gSAP11ACOverride - Override bw to 11ac for SAP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * 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
+ *
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#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)
+
/*
* <ini>
- * gAP11ACOverride - Override 11AC when GO follow SAP channel
+ * gGO11ACOverride - Override bw to 11ac for P2P GO
* @Min: 0
* @Max: 1
* @Default: 1
*
- * This ini is used to enable/disable 11AC override.
- * 1. 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.
- * 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 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
@@ -9051,10 +9074,10 @@ enum hdd_link_speed_rpt_type {
*
* </ini>
*/
-#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)
+#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)
@@ -15441,7 +15464,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 cf9e44baf3b8..cebeb65c34d8 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3595,13 +3595,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,
@@ -6624,8 +6632,10 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hdd_debug("Name = [sap_channel_avoidance] value = [%u]",
pHddCtx->config->sap_channel_avoidance);
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- hdd_debug("Name = [%s] value = [%u]", CFG_SAP_P2P_11AC_OVERRIDE_NAME,
- pHddCtx->config->sap_p2p_11ac_override);
+ hdd_debug("Name = [%s] value = [%u]", CFG_SAP_11AC_OVERRIDE_NAME,
+ pHddCtx->config->sap_11ac_override);
+ hdd_debug("Name = [%s] value = [%u]", CFG_GO_11AC_OVERRIDE_NAME,
+ pHddCtx->config->go_11ac_override);
hdd_debug("Name = [ChannelBondingMode] Value = [%u]",
pHddCtx->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 7ce04b9002e8..a261aaa2e5bf 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1776,12 +1776,14 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
ht_enabled, vht_enabled);
/* ACS override for android */
- if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled &&
+ if (ht_enabled &&
sap_config->acs_cfg.end_ch >= CDS_CHANNEL_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)))) {
+ ((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");
vht_enabled = 1;
sap_config->acs_cfg.hw_mode = eCSR_DOT11_MODE_11ac;
@@ -13797,7 +13799,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 3665fa1b5736..c5de344d4974 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7546,14 +7546,15 @@ static int wlan_hdd_setup_driver_overrides(hdd_adapter_t *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) &&
- !(((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*/