From f5e2570abe65a3efff7acebfaa2fe00830cd4667 Mon Sep 17 00:00:00 2001 From: Venkata Sharath Chandra Manchala Date: Thu, 26 Apr 2018 08:41:04 -0700 Subject: [PATCH] qcacmn: Fill htt message length correctly Fill htt msg length before the htt stats response handler so that the wifistats tool can read the htt msg data correctly. Change-Id: I544d1b97c8d74a0115a4a5a509780a6e9c273ab7 CRs-Fixed: 2231948 --- dp/wifi3.0/dp_htt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 939641413f8a..c0894e39cfe0 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -1394,6 +1394,10 @@ static inline void dp_process_htt_stat_msg(struct htt_stats_context *htt_stats, != NULL) { msg_word = (uint32_t *) qdf_nbuf_data(htt_msg); cookie_val = *(msg_word + 1); + htt_stats->msg_len = HTT_T2H_EXT_STATS_CONF_TLV_LENGTH_GET( + *(msg_word + + HTT_T2H_EXT_STATS_TLV_START_OFFSET)); + if (cookie_val) { if (dp_send_htt_stat_resp(htt_stats, soc, htt_msg) == QDF_STATUS_SUCCESS) { @@ -1409,10 +1413,6 @@ static inline void dp_process_htt_stat_msg(struct htt_stats_context *htt_stats, copy_stats = true; } - htt_stats->msg_len = HTT_T2H_EXT_STATS_CONF_TLV_LENGTH_GET( - *(msg_word + - HTT_T2H_EXT_STATS_TLV_START_OFFSET)); - /* read 5th word */ msg_word = msg_word + 4; msg_remain_len = qdf_min(htt_stats->msg_len,