qcacld-3.0: Add INI to force the P2p-Go to 11n for 11AC
The existing INI gSapForce11NFor11AC forces both P2P-Go and SAP to 11n for 11AC. Add gGoForce11NFor11AC to force SAP and GO separately. Change-Id: I26dce96ec582bed0ff3c62bd5f06fc96e85f0ee4 CRs-Fixed: 2140051
This commit is contained in:
@@ -9901,6 +9901,11 @@ enum dot11p_mode {
|
|||||||
#define CFG_SAP_FORCE_11N_FOR_11AC_MAX (1)
|
#define CFG_SAP_FORCE_11N_FOR_11AC_MAX (1)
|
||||||
#define CFG_SAP_FORCE_11N_FOR_11AC_DEFAULT (0)
|
#define CFG_SAP_FORCE_11N_FOR_11AC_DEFAULT (0)
|
||||||
|
|
||||||
|
#define CFG_GO_FORCE_11N_FOR_11AC_NAME "gGoForce11NFor11AC"
|
||||||
|
#define CFG_GO_FORCE_11N_FOR_11AC_MIN (0)
|
||||||
|
#define CFG_GO_FORCE_11N_FOR_11AC_MAX (1)
|
||||||
|
#define CFG_GO_FORCE_11N_FOR_11AC_DEFAULT (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sap tx leakage threshold
|
* sap tx leakage threshold
|
||||||
* customer can set this value from 100 to 1000 which means
|
* customer can set this value from 100 to 1000 which means
|
||||||
@@ -14257,6 +14262,7 @@ struct hdd_config {
|
|||||||
bool indoor_channel_support;
|
bool indoor_channel_support;
|
||||||
/* parameter to force sap into 11n */
|
/* parameter to force sap into 11n */
|
||||||
bool sap_force_11n_for_11ac;
|
bool sap_force_11n_for_11ac;
|
||||||
|
bool go_force_11n_for_11ac;
|
||||||
uint16_t sap_tx_leakage_threshold;
|
uint16_t sap_tx_leakage_threshold;
|
||||||
bool multicast_replay_filter;
|
bool multicast_replay_filter;
|
||||||
/* parameter for indicating sifs burst duration to fw */
|
/* parameter for indicating sifs burst duration to fw */
|
||||||
|
@@ -4366,6 +4366,13 @@ struct reg_table_entry g_registry_table[] = {
|
|||||||
CFG_SAP_FORCE_11N_FOR_11AC_MIN,
|
CFG_SAP_FORCE_11N_FOR_11AC_MIN,
|
||||||
CFG_SAP_FORCE_11N_FOR_11AC_MAX),
|
CFG_SAP_FORCE_11N_FOR_11AC_MAX),
|
||||||
|
|
||||||
|
REG_VARIABLE(CFG_GO_FORCE_11N_FOR_11AC_NAME, WLAN_PARAM_Integer,
|
||||||
|
struct hdd_config, go_force_11n_for_11ac,
|
||||||
|
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||||
|
CFG_GO_FORCE_11N_FOR_11AC_DEFAULT,
|
||||||
|
CFG_GO_FORCE_11N_FOR_11AC_MIN,
|
||||||
|
CFG_GO_FORCE_11N_FOR_11AC_MAX),
|
||||||
|
|
||||||
REG_VARIABLE(CFG_INTERFACE_CHANGE_WAIT_NAME, WLAN_PARAM_Integer,
|
REG_VARIABLE(CFG_INTERFACE_CHANGE_WAIT_NAME, WLAN_PARAM_Integer,
|
||||||
struct hdd_config, iface_change_wait_time,
|
struct hdd_config, iface_change_wait_time,
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
|
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
|
||||||
@@ -6880,6 +6887,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
|
|||||||
hdd_debug("Name = [%s] Value = [%d]",
|
hdd_debug("Name = [%s] Value = [%d]",
|
||||||
CFG_SAP_FORCE_11N_FOR_11AC_NAME,
|
CFG_SAP_FORCE_11N_FOR_11AC_NAME,
|
||||||
hdd_ctx->config->sap_force_11n_for_11ac);
|
hdd_ctx->config->sap_force_11n_for_11ac);
|
||||||
|
hdd_debug("Name = [%s] Value = [%d]",
|
||||||
|
CFG_GO_FORCE_11N_FOR_11AC_NAME,
|
||||||
|
hdd_ctx->config->go_force_11n_for_11ac);
|
||||||
hdd_debug("Name = [%s] Value = [%d]",
|
hdd_debug("Name = [%s] Value = [%d]",
|
||||||
CFG_BPF_PACKET_FILTER_OFFLOAD,
|
CFG_BPF_PACKET_FILTER_OFFLOAD,
|
||||||
hdd_ctx->config->bpf_packet_filter_enable);
|
hdd_ctx->config->bpf_packet_filter_enable);
|
||||||
|
@@ -2563,7 +2563,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||||||
else
|
else
|
||||||
vht_enabled = 0;
|
vht_enabled = 0;
|
||||||
|
|
||||||
if (hdd_ctx->config->sap_force_11n_for_11ac) {
|
if (((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))) {
|
||||||
vht_enabled = 0;
|
vht_enabled = 0;
|
||||||
hdd_log(LOG1, FL("VHT is Disabled in ACS"));
|
hdd_log(LOG1, FL("VHT is Disabled in ACS"));
|
||||||
}
|
}
|
||||||
@@ -2577,7 +2580,9 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||||||
ch_width = 20;
|
ch_width = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this may be possible, when sap_force_11n_for_11ac is set */
|
/* this may be possible, when sap_force_11n_for_11ac or
|
||||||
|
* go_force_11n_for_11ac is set
|
||||||
|
*/
|
||||||
if ((ch_width == 80 || ch_width == 160) && !vht_enabled) {
|
if ((ch_width == 80 || ch_width == 160) && !vht_enabled) {
|
||||||
if (ht_enabled && ht40_enabled)
|
if (ht_enabled && ht40_enabled)
|
||||||
ch_width = 40;
|
ch_width = 40;
|
||||||
@@ -2683,7 +2688,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||||||
sap_config->acs_cfg.band = hw_mode;
|
sap_config->acs_cfg.band = hw_mode;
|
||||||
/* ACS override for android */
|
/* ACS override for android */
|
||||||
if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled &&
|
if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled &&
|
||||||
!hdd_ctx->config->sap_force_11n_for_11ac) {
|
!(((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_debug("ACS Config override for 11AC vhtChannelWidth %d",
|
||||||
hdd_ctx->config->vhtChannelWidth);
|
hdd_ctx->config->vhtChannelWidth);
|
||||||
vht_enabled = 1;
|
vht_enabled = 1;
|
||||||
|
@@ -7322,8 +7322,11 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
|
|||||||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY ||
|
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 ||
|
||||||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) &&
|
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) &&
|
||||||
!hdd_ctx->config->sap_force_11n_for_11ac) {
|
!(((ap_adapter->device_mode == QDF_SAP_MODE) &&
|
||||||
hdd_debug("** Driver force override for SAP/Go **");
|
(hdd_ctx->config->sap_force_11n_for_11ac)) ||
|
||||||
|
((ap_adapter->device_mode == QDF_P2P_GO_MODE) &&
|
||||||
|
(hdd_ctx->config->go_force_11n_for_11ac)))) {
|
||||||
|
hdd_debug("** Driver force 11AC override for SAP/Go **");
|
||||||
|
|
||||||
/* 11n only shall not be overridden since it may be on purpose*/
|
/* 11n only shall not be overridden since it may be on purpose*/
|
||||||
if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n)
|
if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n)
|
||||||
@@ -7396,7 +7399,10 @@ static int wlan_hdd_setup_acs_overrides(struct hdd_adapter *ap_adapter)
|
|||||||
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ac;
|
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ac;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hdd_ctx->config->sap_force_11n_for_11ac) {
|
if (((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))) {
|
||||||
if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac ||
|
if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac ||
|
||||||
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY)
|
sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY)
|
||||||
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11n;
|
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11n;
|
||||||
@@ -7944,7 +7950,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||||||
if (!cds_is_sub_20_mhz_enabled())
|
if (!cds_is_sub_20_mhz_enabled())
|
||||||
wlan_hdd_set_sap_hwmode(adapter);
|
wlan_hdd_set_sap_hwmode(adapter);
|
||||||
|
|
||||||
if (hdd_ctx->config->sap_force_11n_for_11ac) {
|
if (((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))) {
|
||||||
if (pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac ||
|
if (pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac ||
|
||||||
pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY)
|
pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY)
|
||||||
pConfig->SapHw_mode = eCSR_DOT11_MODE_11n;
|
pConfig->SapHw_mode = eCSR_DOT11_MODE_11n;
|
||||||
@@ -7966,7 +7975,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||||||
sme_config->csrConfig.WMMSupportMode = eCsrRoamWmmNoQos;
|
sme_config->csrConfig.WMMSupportMode = eCsrRoamWmmNoQos;
|
||||||
sme_update_config(hdd_ctx->hHal, sme_config);
|
sme_update_config(hdd_ctx->hHal, sme_config);
|
||||||
|
|
||||||
if (!hdd_ctx->config->sap_force_11n_for_11ac) {
|
if (!((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))) {
|
||||||
pConfig->ch_width_orig =
|
pConfig->ch_width_orig =
|
||||||
hdd_map_nl_chan_width(pConfig->ch_width_orig);
|
hdd_map_nl_chan_width(pConfig->ch_width_orig);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user