From 34f6fe213246f532ea324cc40914707f1470fcbf Mon Sep 17 00:00:00 2001 From: nobelj Date: Fri, 27 Dec 2019 09:53:04 -0800 Subject: [PATCH] qcacmn: update timestamp to mgmt ctrl payload head update timestamp to mgmt ctrl payload head that is needed for tx packet capture Change-Id: Ic68124c994a351e6e8bf150ffa0193db24a71492 --- dp/wifi3.0/dp_htt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 1af3b8b7a7b6..06902f385d36 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -2809,11 +2809,20 @@ dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv(struct dp_pdev *pdev, uint8_t trim_size; size_t head_size; struct cdp_tx_mgmt_comp_info *ptr_mgmt_comp_info; + uint32_t *msg_word; + uint32_t tsf_hdr; if ((!pdev->tx_sniffer_enable) && (!pdev->mcopy_mode) && (!pdev->bpr_enable) && (!pdev->tx_capture_enabled)) return QDF_STATUS_SUCCESS; + /* + * get timestamp from htt_t2h_ppdu_stats_ind_hdr_t + */ + msg_word = (uint32_t *)qdf_nbuf_data(tag_buf); + msg_word = msg_word + 2; + tsf_hdr = *msg_word; + trim_size = ((pdev->mgmtctrl_frm_info.mgmt_buf + HTT_MGMT_CTRL_TLV_HDR_RESERVERD_LEN) - qdf_nbuf_data(tag_buf)); @@ -2837,6 +2846,7 @@ dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv(struct dp_pdev *pdev, qdf_assert_always(ptr_mgmt_comp_info); ptr_mgmt_comp_info->ppdu_id = ppdu_id; ptr_mgmt_comp_info->is_sgen_pkt = true; + ptr_mgmt_comp_info->tx_tsf = tsf_hdr; } else { head_size = sizeof(ppdu_id); nbuf_ptr = (uint32_t *)qdf_nbuf_push_head(tag_buf, head_size);