Browse Source

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
Venkata Sharath Chandra Manchala 7 years ago
parent
commit
f5e2570abe
1 changed files with 4 additions and 4 deletions
  1. 4 4
      dp/wifi3.0/dp_htt.c

+ 4 - 4
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,