From d7e10baaa94042632fc6b9b0e417f3c7bce085f1 Mon Sep 17 00:00:00 2001 From: Pranita Solanke Date: Wed, 13 Dec 2017 15:40:38 +0530 Subject: [PATCH] qcacmn: Change the BW mapping on host side according to FW Stats counters for BW were not updated correctly due to difference in mapping of BW on host and FW Also fix the Rx Stats to account for TCP Ack count Change-Id: I7e844a7032e7968c110c7a0f8c45b0349a5cb818 --- dp/inc/cdp_txrx_cmn_struct.h | 18 +++++++++--------- dp/wifi3.0/dp_main.c | 4 ++-- dp/wifi3.0/dp_types.h | 2 +- hal/wifi3.0/hal_api_mon.h | 4 +++- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 8c90e79c8ba5..d05ceb5cfa05 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -56,7 +56,7 @@ /* 1 additional GI is for invalid values */ #define MAX_GI (4 + 1) #define SS_COUNT 8 -#define MAX_BW 4 +#define MAX_BW 7 #define MAX_RECEPTION_TYPES 4 /* Options for Dump Statistics */ @@ -1117,10 +1117,10 @@ struct cdp_pdev_stats { * @he_re: he_re (range extension) * @txbf: txbf * @bw: Transmission bandwidth - * - * - * - * + * + * + * + * * @nss: NSS 1,2, ...8 * @mcs: MCS index * @preamble: preamble @@ -1217,10 +1217,10 @@ struct cdp_tx_completion_ppdu { /** * struct cdp_rate_stats - Tx/Rx Rate statistics * @bw: Indicates the BW of the upcoming transmission - - * - * - * - * + * + * + * + * * @pkt_type: Transmit Packet Type * @stbc: When set, STBC transmission rate was used * @ldpc: When set, use LDPC transmission rates diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index d5448bf0bb52..6a64abf95d7c 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -4606,8 +4606,8 @@ static inline void dp_print_peer_stats(struct dp_peer *peer) peer->stats.tx.sgi_count[2], peer->stats.tx.sgi_count[3]); DP_PRINT_STATS("BW Counts = 20MHZ %d 40MHZ %d 80MHZ %d 160MHZ %d\n", - peer->stats.tx.bw[0], peer->stats.tx.bw[1], - peer->stats.tx.bw[2], peer->stats.tx.bw[3]); + peer->stats.tx.bw[2], peer->stats.tx.bw[3], + peer->stats.tx.bw[4], peer->stats.tx.bw[5]); DP_PRINT_STATS("Aggregation:"); DP_PRINT_STATS(" Number of Msdu's Part of Amsdu = %d", diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 42c1e510b82a..2b94ca75879d 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -48,7 +48,7 @@ #include #include "hal_rx.h" -#define MAX_BW 4 +#define MAX_BW 7 #define MAX_RETRIES 4 #define MAX_RECEPTION_TYPES 4 diff --git a/hal/wifi3.0/hal_api_mon.h b/hal/wifi3.0/hal_api_mon.h index 0b1a648d2be0..e804f42e0fea 100644 --- a/hal/wifi3.0/hal_api_mon.h +++ b/hal/wifi3.0/hal_api_mon.h @@ -538,7 +538,9 @@ hal_rx_status_get_tlv_info(void *rx_tlv, struct hal_rx_ppdu_info *ppdu_info) MCS); ppdu_info->rx_status.tcp_msdu_count = HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_9, - TCP_MSDU_COUNT); + TCP_MSDU_COUNT) + + HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_10, + TCP_ACK_MSDU_COUNT); ppdu_info->rx_status.udp_msdu_count = HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_9, UDP_MSDU_COUNT);