From 973bc0affad8fa21786c9be4420557581a7c9534 Mon Sep 17 00:00:00 2001 From: Priyadarshnee S Date: Wed, 25 Jul 2018 11:08:40 +0530 Subject: [PATCH] qcacmn: Add support for twice antenna gain param Existing antenna gain command does not take odd antenna gain value that is gains are not supported in steps of 0.5db. antenna_gain_half_db pdev param provides this support. Added WMI and CDP changes to configure/read this data. CRs-Fixed: 2024854 Change-Id: I47da9eed74a1a0180cefb4c3f47bc4340da1bdfd --- dp/inc/cdp_txrx_stats_struct.h | 1 + wmi/inc/wmi_unified_param.h | 1 + wmi/src/wmi_unified_non_tlv.c | 3 +++ wmi/src/wmi_unified_tlv.c | 3 +++ 4 files changed, 8 insertions(+) diff --git a/dp/inc/cdp_txrx_stats_struct.h b/dp/inc/cdp_txrx_stats_struct.h index d996bdfe21..f6f8161193 100644 --- a/dp/inc/cdp_txrx_stats_struct.h +++ b/dp/inc/cdp_txrx_stats_struct.h @@ -1268,6 +1268,7 @@ enum _ol_ath_param_t { OL_ATH_PARAM_CBS_WAIT_TIME = 384, OL_ATH_PARAM_CBS_REST_TIME = 385, OL_ATH_PARAM_CBS_CSA = 386, + OL_ATH_PARAM_TWICE_ANTENNA_GAIN = 387, }; /* Enumeration of PDEV Configuration parameter */ diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index d34c983a08..1c51835efb 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5775,6 +5775,7 @@ typedef enum { wmi_pdev_param_soft_tx_chain_mask, wmi_pdev_param_cck_tx_enable, wmi_pdev_param_esp_indication_period, + wmi_pdev_param_antenna_gain_half_db, wmi_pdev_param_max, } wmi_conv_pdev_params_id; diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c index 90301d9481..ddcda5b12a 100644 --- a/wmi/src/wmi_unified_non_tlv.c +++ b/wmi/src/wmi_unified_non_tlv.c @@ -6671,6 +6671,7 @@ static QDF_STATUS extract_pdev_tpc_config_ev_param_non_tlv(wmi_unified_t wmi_han param->phyMode = event->phyMode; param->twiceAntennaReduction = event->twiceAntennaReduction; param->twiceMaxRDPower = event->twiceMaxRDPower; + param->twiceAntennaGain = event->twiceAntennaGain; param->powerLimit = event->powerLimit; param->rateMax = event->rateMax; param->numTxChain = event->numTxChain; @@ -9443,6 +9444,8 @@ static void populate_pdev_param_non_tlv(uint32_t *pdev_param) pdev_param[wmi_pdev_param_rx_chain_mask_5g] = WMI_UNAVAILABLE_PARAM; pdev_param[wmi_pdev_param_tx_chain_mask_cck] = WMI_UNAVAILABLE_PARAM; pdev_param[wmi_pdev_param_tx_chain_mask_1ss] = WMI_UNAVAILABLE_PARAM; + pdev_param[wmi_pdev_param_antenna_gain_half_db] = + WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB; } /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index db9f70e363..e4c7900ae4 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -18272,6 +18272,7 @@ static QDF_STATUS extract_pdev_tpc_config_ev_param_tlv(wmi_unified_t wmi_handle, param->chanFreq = event->chanFreq; param->phyMode = event->phyMode; param->twiceAntennaReduction = event->twiceAntennaReduction; + param->twiceAntennaGain = event->twiceAntennaGain; param->twiceMaxRDPower = event->twiceMaxRDPower; param->powerLimit = event->powerLimit; param->rateMax = event->rateMax; @@ -23056,6 +23057,8 @@ static void populate_pdev_param_tlv(uint32_t *pdev_param) pdev_param[wmi_pdev_param_rx_decap_mode] = WMI_PDEV_PARAM_RX_DECAP_MODE; pdev_param[wmi_pdev_param_tx_ack_timeout] = WMI_PDEV_PARAM_ACK_TIMEOUT; pdev_param[wmi_pdev_param_cck_tx_enable] = WMI_PDEV_PARAM_CCK_TX_ENABLE; + pdev_param[wmi_pdev_param_antenna_gain_half_db] = + WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB; } /**