qcacld-3.0: Save mac_id and mac_id_valid in TSF report

To support uplink delay calculation, FW will report mac_id and
mac_id_valid in TSF report so as to differentiate from legacy
TSF report. Thus save mac_id and mac_id_valid fields in TSF
report so that host can differentiate the TSF report purposes.

Change-Id: If76fd49ff9693a7733389d184a84360c0564216e
CRs-Fixed: 2991959
This commit is contained in:
Jia Ding 2022-04-26 11:14:19 +08:00 • committed by Madan Koyyalamudi
commit c155eb2449
2 changed files with 28 additions and 0 deletions

View file

@ -4413,6 +4413,8 @@ struct sir_sme_ext_cng_chan_ind {
* @soc_timer_high: high 32bits of synced SOC timer value
* @global_tsf_low: low 32bits of tsf64
* @global_tsf_high: high 32bits of tsf64
* @mac_id: MAC identifier
* @mac_id_valid: Indicate if mac_id is valid or not
*
* driver use this struct to store the tsf info
*/
@ -4424,6 +4426,10 @@ struct stsf {
uint32_t soc_timer_high;
uint32_t global_tsf_low;
uint32_t global_tsf_high;
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
uint32_t mac_id;
uint32_t mac_id_valid;
#endif
};
#define SIR_BCN_FLT_MAX_ELEMS_IE_LIST 8

View file

@ -313,6 +313,24 @@ end:
}
#ifdef WLAN_FEATURE_TSF
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
static void wma_vdev_tsf_set_mac_id(struct stsf *ptsf, uint32_t mac_id,
uint32_t mac_id_valid)
{
ptsf->mac_id = mac_id;
ptsf->mac_id_valid = mac_id_valid;
wma_nofl_debug("mac_id %d mac_id_valid %d", ptsf->mac_id,
ptsf->mac_id_valid);
}
#else /* !WLAN_FEATURE_TSF_UPLINK_DELAY */
static inline void wma_vdev_tsf_set_mac_id(struct stsf *ptsf, uint32_t mac_id,
uint32_t mac_id_valid)
{
}
#endif /* WLAN_FEATURE_TSF_UPLINK_DELAY */
/**
* wma_vdev_tsf_handler() - handle tsf event indicated by FW
* @handle: wma context
@ -352,6 +370,10 @@ int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len)
wma_nofl_debug("g_tsf: %d %d; soc_timer: %d %d",
ptsf->global_tsf_low, ptsf->global_tsf_high,
ptsf->soc_timer_low, ptsf->soc_timer_high);
wma_vdev_tsf_set_mac_id(ptsf, tsf_event->mac_id,
tsf_event->mac_id_valid);
tsf_msg.type = eWNI_SME_TSF_EVENT;
tsf_msg.bodyptr = ptsf;
tsf_msg.bodyval = 0;