summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@qca.qualcomm.com>2015-12-16 16:03:16 -0800
committerAkash Patel <akashp@codeaurora.org>2016-02-17 15:20:53 -0800
commit381c39f7c498631f6f2d158ea27ecd86628335c8 (patch)
tree5558b1b90179c4888325818d8a57bdb660cbc4f4
parent945c02a9d617f77acd4a49f2a3c710b78775bd61 (diff)
qcacld-3.0: Enable Tx beamformee in SAP mode
Currently Tx beamformee feature is enabled only in STA mode. Add knob to enable or disable the Tx beamformee feature in SAP mode Change-Id: I6ea218b3bff6c973688aad716a3f1a3c8acc469b CRs-Fixed: 963034
-rw-r--r--config/WCNSS_qcom_cfg.ini3
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h10
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c9
-rw-r--r--core/mac/inc/sir_api.h2
-rw-r--r--core/mac/src/pe/include/lim_session.h1
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c19
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c14
-rw-r--r--core/sme/inc/csr_api.h1
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/src/csr/csr_api_roam.c8
10 files changed, 51 insertions, 17 deletions
diff --git a/config/WCNSS_qcom_cfg.ini b/config/WCNSS_qcom_cfg.ini
index 8de3a16d4241..cab58d6c3c77 100644
--- a/config/WCNSS_qcom_cfg.ini
+++ b/config/WCNSS_qcom_cfg.ini
@@ -367,6 +367,9 @@ gEnableRXLDPC=1
#Enable/Disable Tx beamforming
gTxBFEnable=1
+#Enable/Disable Tx beamformee in SAP mode
+gEnableTxBFeeSAP=1
+
# Enable Tx beamforming in VHT20MHz
# Valid values are 0,1. If commented out, the default value is 0.
# 0=disable, 1=enable
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 33c79eb54bdc..c626a29dcb02 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -1739,6 +1739,15 @@ typedef enum {
#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MAX (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX)
#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_DEFAULT (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF)
+/*
+ * Enable / Disable Tx beamformee in SAP mode
+ * Default: Disable
+ */
+#define CFG_VHT_ENABLE_TXBF_SAP_MODE "gEnableTxBFeeSAP"
+#define CFG_VHT_ENABLE_TXBF_SAP_MODE_MIN (0)
+#define CFG_VHT_ENABLE_TXBF_SAP_MODE_MAX (1)
+#define CFG_VHT_ENABLE_TXBF_SAP_MODE_DEFAULT (0)
+
#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED "gTxBFCsnValue"
#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MIN (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN)
#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MAX (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX - 1)
@@ -3154,6 +3163,7 @@ struct hdd_config {
uint8_t vhtRxMCS;
uint8_t vhtTxMCS;
bool enableTxBF;
+ bool enable_txbf_sap_mode;
uint8_t txBFCsnValue;
bool enable_su_tx_bformer;
uint8_t vhtRxMCS2x2;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 551f12e261ae..b8b2adf98e26 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -2427,6 +2427,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MIN,
CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MAX),
+ REG_VARIABLE(CFG_VHT_ENABLE_TXBF_SAP_MODE, WLAN_PARAM_Integer,
+ struct hdd_config, enable_txbf_sap_mode,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_VHT_ENABLE_TXBF_SAP_MODE_DEFAULT,
+ CFG_VHT_ENABLE_TXBF_SAP_MODE_MIN,
+ CFG_VHT_ENABLE_TXBF_SAP_MODE_MAX),
+
REG_VARIABLE(CFG_VHT_ENABLE_TXBF_IN_20MHZ, WLAN_PARAM_Integer,
struct hdd_config, enableTxBFin20MHz,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -6485,6 +6492,8 @@ CDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
#ifdef WLAN_FEATURE_11AC
smeConfig->csrConfig.nVhtChannelWidth = pConfig->vhtChannelWidth;
smeConfig->csrConfig.enableTxBF = pConfig->enableTxBF;
+ smeConfig->csrConfig.enable_txbf_sap_mode =
+ pConfig->enable_txbf_sap_mode;
smeConfig->csrConfig.txBFCsnValue = pConfig->txBFCsnValue;
smeConfig->csrConfig.enable2x2 = pConfig->enable2x2;
smeConfig->csrConfig.enableVhtFor24GHz = pConfig->enableVhtFor24GHzBand;
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index a077817867f4..51f2e11ad537 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -610,6 +610,8 @@ typedef struct sSirSmeStartBssReq {
uint8_t center_freq_seg0;
uint8_t center_freq_seg1;
uint8_t sec_ch_offset;
+ bool txbf_ini_enabled;
+ uint8_t txbf_csn_val;
uint8_t privacy;
uint8_t apUapsdEnable;
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index 4a5b5752a791..e5847c000262 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -330,6 +330,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
phy_ch_width ch_width;
uint8_t ch_center_freq_seg1;
uint8_t txBFIniFeatureEnabled;
+ uint8_t txbf_csn_value;
uint8_t txMuBformee;
uint8_t enableVhtpAid;
uint8_t enableVhtGid;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 47caaf885c71..3d806079fb1d 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -718,7 +718,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
session->vhtCapability);
session->txLdpcIniFeatureEnabled =
sme_start_bss_req->txLdpcIniFeatureEnabled;
-
if (mac_ctx->roam.configParam.enable2x2)
session->nss = 2;
else
@@ -741,6 +740,12 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
case eSIR_INFRA_AP_MODE:
lim_configure_ap_start_bss_session(mac_ctx, session,
sme_start_bss_req);
+ if (session->pePersona == CDF_SAP_MODE) {
+ session->txBFIniFeatureEnabled =
+ sme_start_bss_req->txbf_ini_enabled;
+ session->txbf_csn_value =
+ sme_start_bss_req->txbf_csn_val;
+ }
break;
case eSIR_IBSS_MODE:
session->limSystemRole = eLIM_STA_IN_IBSS_ROLE;
@@ -1740,17 +1745,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
CDF_TRACE(CDF_MODULE_ID_PE, CDF_TRACE_LEVEL_INFO_MED,
"%s: txBFCsnValue=%d", __func__,
sme_join_req->txBFCsnValue);
- if (cfg_set_int(mac_ctx,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- sme_join_req->txBFCsnValue) != eSIR_SUCCESS) {
- /*
- * Set Failed for CFG
- * CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED
- */
- lim_log(mac_ctx, LOGP, FL("Set Fail CFG"));
- ret_code = eSIR_LOGP_EXCEPTION;
- goto end;
- }
+ session->txbf_csn_value = sme_join_req->txBFCsnValue;
}
#endif
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index f7cfb78f38bb..2d443af9042f 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1002,6 +1002,8 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
CFG_GET_INT(nStatus, pMac,
WNI_CFG_VHT_MU_BEAMFORMEE_CAP, nCfgValue);
pDot11f->muBeamformeeCap = (nCfgValue & 0x0001);
+ pDot11f->csnofBeamformerAntSup =
+ psessionEntry->txbf_csn_value;
} else {
pDot11f->muBeamformeeCap = 0;
}
@@ -1037,11 +1039,13 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SU_BEAMFORMER_CAP,
nCfgValue);
pDot11f->suBeamFormerCap = (nCfgValue & 0x0001);
+
+ nCfgValue = 0;
+ CFG_GET_INT(nStatus, pMac,
+ WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
+ nCfgValue);
+ pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
}
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- nCfgValue);
- pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
nCfgValue = 0;
CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index a34856598ef2..fd4621a8bc57 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1166,6 +1166,7 @@ typedef struct tagCsrConfigParam {
#ifdef WLAN_FEATURE_11AC
uint32_t nVhtChannelWidth;
uint8_t enableTxBF;
+ uint8_t enable_txbf_sap_mode;
uint8_t txBFCsnValue;
uint8_t enable2x2;
bool enableVhtFor24GHz;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index c0a7a506f578..e2bbd48eb53a 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -601,6 +601,7 @@ typedef struct tagCsrConfig {
#ifdef WLAN_FEATURE_11AC
uint32_t nVhtChannelWidth;
uint8_t txBFEnable;
+ uint8_t enable_txbf_sap_mode;
uint8_t txBFCsnValue;
uint8_t enable2x2;
bool enableVhtFor24GHz;
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 9b1e60cf17f9..ebbfe474c24c 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -2026,6 +2026,8 @@ CDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.nVhtChannelWidth =
pParam->nVhtChannelWidth;
pMac->roam.configParam.txBFEnable = pParam->enableTxBF;
+ pMac->roam.configParam.enable_txbf_sap_mode =
+ pParam->enable_txbf_sap_mode;
pMac->roam.configParam.txBFCsnValue = pParam->txBFCsnValue;
pMac->roam.configParam.enable2x2 = pParam->enable2x2;
pMac->roam.configParam.enableVhtFor24GHz =
@@ -2189,6 +2191,8 @@ CDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
#ifdef WLAN_FEATURE_11AC
pParam->nVhtChannelWidth = cfg_params->nVhtChannelWidth;
pParam->enableTxBF = cfg_params->txBFEnable;
+ pParam->enable_txbf_sap_mode =
+ cfg_params->enable_txbf_sap_mode;
pParam->txBFCsnValue = cfg_params->txBFCsnValue;
pParam->enableMuBformee = cfg_params->txMuBformee;
pParam->enableVhtFor24GHz = cfg_params->enableVhtFor24GHz;
@@ -14600,6 +14604,10 @@ CDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId
pMsg->isCoalesingInIBSSAllowed = pMac->isCoalesingInIBSSAllowed;
pMsg->bssPersona = pParam->bssPersona;
pMsg->txLdpcIniFeatureEnabled = pMac->roam.configParam.txLdpcEnable;
+ pMsg->txbf_ini_enabled =
+ (uint8_t)pMac->roam.configParam.txBFEnable &&
+ (uint8_t)pMac->roam.configParam.enable_txbf_sap_mode;
+ pMsg->txbf_csn_val = (uint8_t)pMac->roam.configParam.txBFCsnValue;
#ifdef WLAN_FEATURE_11W
pMsg->pmfCapable = pParam->mfpCapable;
pMsg->pmfRequired = pParam->mfpRequired;