Browse Source

qcacld-3.0: Correct INI item's data type from bool to uint8_t

rxLdpcEnable and txLdpcEnable have incorrect data type which may
lead to confusion and error.
Fix the data types from boolean to uint8_t.

Change-Id: Idb8642a528d7e4c75cd2bc7c2e04f52a888f3d2b
CRs-Fixed: 2018096
Krunal Soni 8 years ago
parent
commit
a2c0e41dd2

+ 41 - 26
core/hdd/inc/wlan_hdd_cfg.h

@@ -5590,29 +5590,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_TX_STBC_MAX                   (1)
 #define CFG_ENABLE_TX_STBC_DEFAULT               (0)
 
-/*
- * <ini>
- * gEnableRXLDPC - Enables/disables Rx LDPC capability in STA mode
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to set default Rx LDPC capability
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_ENABLE_RX_LDPC                       "gEnableRXLDPC"
-#define CFG_ENABLE_RX_LDPC_MIN                   (0)
-#define CFG_ENABLE_RX_LDPC_MAX                   (1)
-#define CFG_ENABLE_RX_LDPC_DEFAULT               (0)
-
 /*
  * <ini>
  * gMaxHTMCSForTxData - max HT mcs for TX
@@ -6268,17 +6245,55 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_LPWR_IMG_TRANSITION_MAX         (1)
 #define CFG_ENABLE_LPWR_IMG_TRANSITION_DEFAULT     (0)
 
-/* Config Param to enable the txLdpc capability
+/*
+ * <ini>
+ * gTxLdpcEnable - Config Param to enable Tx LDPC capability
+ * @Min: 0
+ * @Max: 3
+ * @Default: 3
+ *
+ * This ini is used to enable/disable Tx LDPC capability
  * 0 - disable
  * 1 - HT LDPC enable
  * 2 - VHT LDPC enable
  * 3 - HT & VHT LDPC enable
+ *
+ * Related: STA/SAP/P2P/IBSS/NAN.
+ *
+ * Supported Feature: Concurrency/Standalone
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
  */
 #define CFG_TX_LDPC_ENABLE_FEATURE         "gTxLdpcEnable"
 #define CFG_TX_LDPC_ENABLE_FEATURE_MIN     (0)
 #define CFG_TX_LDPC_ENABLE_FEATURE_MAX     (3)
 #define CFG_TX_LDPC_ENABLE_FEATURE_DEFAULT (3)
 
+/*
+ * <ini>
+ * gEnableRXLDPC - Config Param to enable Rx LDPC capability
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable Rx LDPC capability
+ *
+ * Related: STA/SAP/P2P/IBSS/NAN.
+ *
+ * Supported Feature: Concurrency/Standalone
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+
+#define CFG_ENABLE_RX_LDPC                       "gEnableRXLDPC"
+#define CFG_ENABLE_RX_LDPC_MIN                   (0)
+#define CFG_ENABLE_RX_LDPC_MAX                   (1)
+#define CFG_ENABLE_RX_LDPC_DEFAULT               (0)
+
 /*
  * <ini>
  * gEnableMCCAdaptiveScheduler - MCC Adaptive Scheduler feature.
@@ -10235,7 +10250,8 @@ struct hdd_config {
 	bool ignoreDynamicDtimInP2pMode;
 	bool enableRxSTBC;
 	bool enableTxSTBC;
-	bool enableRxLDPC;
+	uint8_t enable_tx_ldpc;
+	uint8_t enable_rx_ldpc;
 	bool enable5gEBT;
 #ifdef FEATURE_WLAN_TDLS
 	bool fEnableTDLSSupport;
@@ -10268,7 +10284,6 @@ struct hdd_config {
 #endif
 	uint32_t enableLpwrImgTransition;
 	uint8_t scanAgingTimeout;
-	bool enableTxLdpc;
 	uint8_t disableLDPCWithTxbfAP;
 	uint8_t enableMCCAdaptiveScheduler;
 	bool sapAllowAllChannel;

+ 12 - 12
core/hdd/src/wlan_hdd_cfg.c

@@ -2180,13 +2180,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_TX_STBC_MIN,
 		     CFG_ENABLE_TX_STBC_MAX),
 
-	REG_VARIABLE(CFG_ENABLE_RX_LDPC, WLAN_PARAM_Integer,
-		     struct hdd_config, enableRxLDPC,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ENABLE_RX_LDPC_DEFAULT,
-		     CFG_ENABLE_RX_LDPC_MIN,
-		     CFG_ENABLE_RX_LDPC_MAX),
-
 	REG_VARIABLE(CFG_PPS_ENABLE_5G_EBT, WLAN_PARAM_Integer,
 		     struct hdd_config, enable5gEBT,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2389,12 +2382,19 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_SCAN_AGING_PARAM_MAX),
 
 	REG_VARIABLE(CFG_TX_LDPC_ENABLE_FEATURE, WLAN_PARAM_Integer,
-		     struct hdd_config, enableTxLdpc,
+		     struct hdd_config, enable_tx_ldpc,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
 		     CFG_TX_LDPC_ENABLE_FEATURE_DEFAULT,
 		     CFG_TX_LDPC_ENABLE_FEATURE_MIN,
 		     CFG_TX_LDPC_ENABLE_FEATURE_MAX),
 
+	REG_VARIABLE(CFG_ENABLE_RX_LDPC, WLAN_PARAM_Integer,
+		     struct hdd_config, enable_rx_ldpc,
+		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		     CFG_ENABLE_RX_LDPC_DEFAULT,
+		     CFG_ENABLE_RX_LDPC_MIN,
+		     CFG_ENABLE_RX_LDPC_MAX),
+
 	REG_VARIABLE(CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_NAME,
 		     WLAN_PARAM_Integer,
 		     struct hdd_config, enableMCCAdaptiveScheduler,
@@ -6361,7 +6361,7 @@ static bool hdd_update_ht_cap_in_cfg(hdd_context_t *hdd_ctx)
 	}
 	val16 = (uint16_t) val32;
 	ht_cap_info = (tSirMacHTCapabilityInfo *) &val16;
-	ht_cap_info->advCodingCap &= hdd_ctx->config->enableRxLDPC;
+	ht_cap_info->advCodingCap &= hdd_ctx->config->enable_rx_ldpc;
 	ht_cap_info->rxSTBC = QDF_MIN(ht_cap_info->rxSTBC,
 			hdd_ctx->config->enableRxSTBC);
 	ht_cap_info->txSTBC &= hdd_ctx->config->enableTxSTBC;
@@ -6478,7 +6478,7 @@ static bool hdd_update_vht_cap_in_cfg(hdd_context_t *hdd_ctx)
 		hdd_err("Could not get WNI_CFG_VHT_LDPC_CODING_CAP");
 	}
 	if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_VHT_LDPC_CODING_CAP,
-			config->enableRxLDPC & val) == QDF_STATUS_E_FAILURE) {
+			config->enable_rx_ldpc & val) == QDF_STATUS_E_FAILURE) {
 		status = false;
 		hdd_err("Couldn't pass on WNI_CFG_VHT_LDPC_CODING_CAP to CFG");
 	}
@@ -7258,8 +7258,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
 	/* Scan Results Aging Time out value */
 	smeConfig->csrConfig.scanCfgAgingTime = pConfig->scanAgingTimeout;
 
-	smeConfig->csrConfig.enableTxLdpc = pConfig->enableTxLdpc;
-	smeConfig->csrConfig.enableRxLDPC = pConfig->enableRxLDPC;
+	smeConfig->csrConfig.enable_tx_ldpc = pConfig->enable_tx_ldpc;
+	smeConfig->csrConfig.enable_rx_ldpc = pConfig->enable_rx_ldpc;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode;
 #endif

+ 1 - 1
core/mac/src/pe/lim/lim_utils.c

@@ -6263,7 +6263,7 @@ static QDF_STATUS lim_send_ie(tpAniSirGlobal mac_ctx, uint32_t sme_session_id,
  */
 static inline bool lim_get_rx_ldpc(tpAniSirGlobal mac_ctx, uint8_t ch)
 {
-	if (mac_ctx->roam.configParam.rxLdpcEnable &&
+	if (mac_ctx->roam.configParam.rx_ldpc_enable &&
 		wma_is_rx_ldpc_supported_for_channel(WLAN_REG_CH_NUM(ch)))
 		return true;
 	else

+ 2 - 2
core/sme/inc/csr_api.h

@@ -1241,8 +1241,8 @@ typedef struct tagCsrConfigParam {
 	bool isRoamOffloadScanEnabled;
 	bool bFastRoamInConIniFeatureEnabled;
 	uint8_t scanCfgAgingTime;
-	uint8_t enableTxLdpc;
-	uint8_t enableRxLDPC;
+	uint8_t enable_tx_ldpc;
+	uint8_t enable_rx_ldpc;
 	uint8_t isAmsduSupportInAMPDU;
 	uint8_t nSelect5GHzMargin;
 	uint8_t isCoalesingInIBSSAllowed;

+ 2 - 2
core/sme/inc/csr_internal.h

@@ -569,8 +569,8 @@ typedef struct tagCsrConfig {
 	uint8_t enableHtSmps;
 	uint8_t htSmps;
 	bool send_smps_action;
-	uint8_t txLdpcEnable;
-	uint8_t rxLdpcEnable;
+	uint8_t tx_ldpc_enable;
+	uint8_t rx_ldpc_enable;
 	/*
 	 * Enable/Disable heartbeat offload
 	 */

+ 8 - 8
core/sme/src/csr/csr_api_roam.c

@@ -2717,8 +2717,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 		pMac->roam.configParam.htSmps = pParam->htSmps;
 		pMac->roam.configParam.send_smps_action =
 			pParam->send_smps_action;
-		pMac->roam.configParam.txLdpcEnable = pParam->enableTxLdpc;
-		pMac->roam.configParam.rxLdpcEnable = pParam->enableRxLDPC;
+		pMac->roam.configParam.tx_ldpc_enable = pParam->enable_tx_ldpc;
+		pMac->roam.configParam.rx_ldpc_enable = pParam->enable_rx_ldpc;
 		pMac->roam.configParam.ignore_peer_erp_info =
 			pParam->ignore_peer_erp_info;
 		pMac->roam.configParam.isAmsduSupportInAMPDU =
@@ -2971,8 +2971,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	pParam->cc_switch_mode = cfg_params->cc_switch_mode;
 #endif
-	pParam->enableTxLdpc = cfg_params->txLdpcEnable;
-	pParam->enableRxLDPC = cfg_params->rxLdpcEnable;
+	pParam->enable_tx_ldpc = cfg_params->tx_ldpc_enable;
+	pParam->enable_rx_ldpc = cfg_params->rx_ldpc_enable;
 	pParam->isAmsduSupportInAMPDU = cfg_params->isAmsduSupportInAMPDU;
 	pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
 	pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed;
@@ -14523,7 +14523,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 			csr_join_req->isFastRoamIniFeatureEnabled = false;
 
 		csr_join_req->txLdpcIniFeatureEnabled =
-			(uint8_t) pMac->roam.configParam.txLdpcEnable;
+			(uint8_t) pMac->roam.configParam.tx_ldpc_enable;
 
 		if ((csr_is11h_supported(pMac)) &&
 			(WLAN_REG_IS_5GHZ_CH(pBssDescription->channelId)) &&
@@ -14546,7 +14546,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 		    !policy_mgr_is_dbs_enable(pMac->psoc))
 			csr_set_ldpc_exception(pMac, pSession,
 					pBssDescription->channelId,
-					pMac->roam.configParam.rxLdpcEnable);
+					pMac->roam.configParam.rx_ldpc_enable);
 		qdf_mem_copy(&csr_join_req->htConfig,
 				&pSession->htConfig, sizeof(tSirHTConfig));
 		qdf_mem_copy(&csr_join_req->vht_config, &pSession->vht_config,
@@ -15361,7 +15361,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t
 	pMsg->wps_state = pParam->wps_state;
 	pMsg->isCoalesingInIBSSAllowed = pMac->isCoalesingInIBSSAllowed;
 	pMsg->bssPersona = pParam->bssPersona;
-	pMsg->txLdpcIniFeatureEnabled = pMac->roam.configParam.txLdpcEnable;
+	pMsg->txLdpcIniFeatureEnabled = pMac->roam.configParam.tx_ldpc_enable;
 
 	if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, &value)
 					!= eSIR_SUCCESS)
@@ -15406,7 +15406,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t
 		!policy_mgr_is_dbs_enable(pMac->psoc))
 		csr_set_ldpc_exception(pMac, pSession,
 				pMsg->channelId,
-				pMac->roam.configParam.rxLdpcEnable);
+				pMac->roam.configParam.rx_ldpc_enable);
 	qdf_mem_copy(&pMsg->vht_config,
 		     &pSession->vht_config,
 		     sizeof(pSession->vht_config));