diff options
| author | Jeff Johnson <jjohnson@codeaurora.org> | 2017-03-16 14:37:38 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-23 13:25:06 -0700 |
| commit | 7531a120210896aea1fee5700c2f39f469d5717e (patch) | |
| tree | fd0378e23260b7af72609dd872c01cbe7528b612 | |
| parent | 392b64168e2b42105489bb14c4ab66fe71e51978 (diff) | |
qcacld-3.0: Fix nonsense Class A stats field names
The qcacld-3.0 driver inherited the tCsrGlobalClassAStatsInfo data
structure from a prior version of the driver. This structure was based
upon the WDI firmware API used by older generations of hardware, and
this interface is not directly supported by the WMI interface used by
current generations of firmware. However "glue" code was introduced
which converts between the WMI data and this WDI-based representation.
When the glue code was introduced there were some parameters which
were supported by WDI but not WMI, and there were some parameters
which were supported by WMI but not WDI. Rather than remove the fields
for parameters not supported by WMI and add new fields for the
parameters only supported by WMI, for some reason the existing
WDI-only fields were repurposed. This fact is captured in WMA:
/* rx_frag_cnt and promiscuous_rx_frag_cnt
* parameter is currently not used. lets use the
* same parameter to hold the nss value and mcs
* rate flags */
classa_stats->rx_frag_cnt = node->nss;
classa_stats->promiscuous_rx_frag_cnt = mcsRateFlags;
And leads to nonsense code such as the following in HDD:
nss = pAdapter->hdd_stats.ClassA_stat.rx_frag_cnt;
rate_flags = pAdapter->hdd_stats.ClassA_stat.promiscuous_rx_frag_cnt;
Rename these fields so that they match the data they hold, and remove
other legacy fields which are unused.
Change-Id: If04a8943ad90d796968c817ff5e634eec23c97f0
CRs-Fixed: 2021520
| -rw-r--r-- | core/hdd/src/wlan_hdd_stats.c | 5 | ||||
| -rw-r--r-- | core/sme/inc/csr_api.h | 8 | ||||
| -rw-r--r-- | core/wma/src/wma_utils.c | 9 |
3 files changed, 6 insertions, 16 deletions
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index db70990a7a88..a1c1df7db312 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -2150,13 +2150,12 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, /* convert to the UI units of 100kbps */ myRate = pAdapter->hdd_stats.ClassA_stat.tx_rate * 5; if (!(rate_flags & eHAL_TX_RATE_LEGACY)) { - nss = pAdapter->hdd_stats.ClassA_stat.rx_frag_cnt; + nss = pAdapter->hdd_stats.ClassA_stat.nss; if (eHDD_LINK_SPEED_REPORT_ACTUAL == pCfg->reportMaxLinkSpeed) { /* Get current rate flags if report actual */ rate_flags = - pAdapter->hdd_stats.ClassA_stat. - promiscuous_rx_frag_cnt; + pAdapter->hdd_stats.ClassA_stat.mcs_rate_flags; } if (mcs_index == INVALID_MCS_IDX) diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 50afce88e40d..25af56de2fc7 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1500,16 +1500,12 @@ typedef struct tagCsrSummaryStatsInfo { } tCsrSummaryStatsInfo; typedef struct tagCsrGlobalClassAStatsInfo { - uint32_t rx_frag_cnt; - uint32_t promiscuous_rx_frag_cnt; - /* uint32_t rx_fcs_err; */ - uint32_t rx_input_sensitivity; + uint32_t nss; uint32_t max_pwr; - /* uint32_t default_pwr; */ - uint32_t sync_fail_cnt; uint32_t tx_rate; /* mcs index for HT20 and HT40 rates */ uint32_t mcs_index; + uint32_t mcs_rate_flags; /* to diff between HT20 & HT40 rates;short & long guard interval */ uint32_t tx_rate_flags; diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index bab915282650..d1cef8ff84c0 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -1769,13 +1769,8 @@ static void wma_update_peer_stats(tp_wma_handle wma, wma_get_mcs_idx((peer_stats->peer_tx_rate / 100), node->rate_flags, node->nss, &mcsRateFlags); - /* rx_frag_cnt and promiscuous_rx_frag_cnt - * parameter is currently not used. lets use the - * same parameter to hold the nss value and mcs - * rate flags */ - classa_stats->rx_frag_cnt = node->nss; - classa_stats->promiscuous_rx_frag_cnt = - mcsRateFlags; + classa_stats->nss = node->nss; + classa_stats->mcs_rate_flags = mcsRateFlags; } /* FW returns tx power in intervals of 0.5 dBm Convert it back to intervals of 1 dBm */ |
