Forráskód Böngészése

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
Kai Chen 3 éve
szülő
commit
8cace9cda9
2 módosított fájl, 12 hozzáadás és 0 törlés
  1. 7 0
      dp/wifi3.0/dp_htt.c
  2. 5 0
      dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.c

+ 7 - 0
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

+ 5 - 0
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;
 }