From 8cace9cda93a25ad31df501a460445785d13715f Mon Sep 17 00:00:00 2001 From: Kai Chen Date: Wed, 4 May 2022 12:31:18 -0700 Subject: [PATCH] qcacmn: Adding mlo timestamp offset to tsf for radiotap Adding MLO timestamp offset reported from firmware to tsf time for radiotap header. Change-Id: I2947dacf6c37214e60d70fcb3df4a5f9897356ac CRs-Fixed: 3211179 --- dp/wifi3.0/dp_htt.c | 7 +++++++ dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 396ece568f..24b789ac9d 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -3096,6 +3096,13 @@ dp_rx_mlo_timestamp_ind_handler(struct dp_soc *soc, pdev->timestamp.mlo_comp_timer = HTT_T2H_MLO_TIMESTAMP_OFFSET_MLO_TIMESTAMP_COMP_PERIOD_US_GET( *(msg_word + 7)); + + dp_htt_debug("tsf_lo=%d tsf_hi=%d, mlo_ofst_lo=%d, mlo_ofst_hi=%d\n", + pdev->timestamp.sync_tstmp_lo_us, + pdev->timestamp.sync_tstmp_hi_us, + pdev->timestamp.mlo_offset_lo_us, + pdev->timestamp.mlo_offset_hi_us); + qdf_spin_unlock_bh(&soc->htt_stats.lock); } #else diff --git a/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c b/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c index 03d5f1718e..c5375938d8 100644 --- a/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c +++ b/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c @@ -1199,6 +1199,11 @@ dp_rx_mon_process_status_tlv(struct dp_pdev *pdev) &desc_list, &tail); } + ppdu_info->rx_status.tsft = ppdu_info->rx_status.tsft + + pdev->timestamp.mlo_offset_lo_us + + ((uint64_t)pdev->timestamp.mlo_offset_hi_us + << 32); + return ppdu_info; }