From f7786d3822239cd2a3686aa78251f0f8e8b18bab Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Fri, 5 Apr 2019 14:25:09 +0530 Subject: [PATCH] qcacmn: Change the data type of average/roundup tx rate The datatype of average and round up tx rate was uint32_t which truncates the upper byte of the average and round up tx rate value. changing the datatype of average and round up tx rate from uint32_t to uint64_t. Change-Id: I3809ba7cfc73ec0b4609981e70d57112ac958f33 CRs-Fixed: 2409751 --- dp/cmn_dp_api/dp_ratetable.h | 4 ++-- dp/inc/cdp_txrx_stats_struct.h | 4 ++-- dp/wifi3.0/dp_htt.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dp/cmn_dp_api/dp_ratetable.h b/dp/cmn_dp_api/dp_ratetable.h index e395222a9cd3..8809515d7bb4 100644 --- a/dp/cmn_dp_api/dp_ratetable.h +++ b/dp/cmn_dp_api/dp_ratetable.h @@ -65,14 +65,14 @@ enum CMN_BW_TYPES { #define DUMMY_MARKER 0 #define DP_ATH_RATE_IN(c) (DP_ATH_EP_MUL((c), DP_ATH_RATE_EP_MULTIPLIER)) -static inline int dp_ath_rate_lpf(int _d, int _e) +static inline int dp_ath_rate_lpf(uint64_t _d, int _e) { _e = DP_ATH_RATE_IN((_e)); return (((_d) != DUMMY_MARKER) ? ((((_d) << 3) + (_e) - (_d)) >> 3) : (_e)); } -static inline int dp_ath_rate_out(int _i) +static inline int dp_ath_rate_out(uint64_t _i) { int _mul = DP_ATH_RATE_EP_MULTIPLIER; diff --git a/dp/inc/cdp_txrx_stats_struct.h b/dp/inc/cdp_txrx_stats_struct.h index 0c68982d2f7b..993e5333b6ee 100644 --- a/dp/inc/cdp_txrx_stats_struct.h +++ b/dp/inc/cdp_txrx_stats_struct.h @@ -418,8 +418,8 @@ struct cdp_tx_stats { uint32_t mcast_last_tx_rate; uint32_t mcast_last_tx_rate_mcs; uint32_t last_per; - uint32_t rnd_avg_tx_rate; - uint32_t avg_tx_rate; + uint64_t rnd_avg_tx_rate; + uint64_t avg_tx_rate; uint32_t last_ack_rssi; uint32_t tx_bytes_success_last; uint32_t tx_data_success_last; diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index a3b21d500026..59ee68324140 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -129,7 +129,7 @@ dp_tx_rate_stats_update(struct dp_peer *peer, struct cdp_tx_completion_ppdu_user *ppdu) { uint32_t ratekbps = 0; - uint32_t ppdu_tx_rate = 0; + uint64_t ppdu_tx_rate = 0; uint32_t rix; if (!peer || !ppdu)