qcacmn: Fix channel information in mesh tx completion

Update channel information tx completion with frequecy
received in ppdu tx completion. Convert freq to channel
and store in pdev.

Change-Id: I5826528b76b4a5a28a05e805b737d2d49d2140d8
This commit is contained in:
Venkateswara Swamy Bandaru 2017-11-15 19:04:49 +05:30 • committed by snandini
commit 2907bc546c
2 changed files with 11 additions and 1 deletions

View file

@ -644,6 +644,7 @@ struct ol_if_ops {
void (*rx_mic_error)(void *ol_soc_handle,
uint16_t vdev_id, void *wh);
uint8_t (*freq_to_channel)(void *ol_soc_handle, uint16_t vdev_id);
/* TODO: Add any other control path calls required to OL_IF/WMA layer */
};

View file

@ -1359,6 +1359,8 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
uint32_t *tag_buf)
{
uint16_t frame_type;
uint16_t freq;
struct dp_soc *soc = NULL;
struct cdp_tx_completion_ppdu *ppdu_desc;
htt_ppdu_stats_common_tlv *dp_stats_buf =
(htt_ppdu_stats_common_tlv *)tag_buf;
@ -1382,7 +1384,14 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
ppdu_desc->ppdu_start_timestamp = dp_stats_buf->ppdu_start_tstmp_us;
ppdu_desc->ppdu_end_timestamp = dp_stats_buf->ppdu_sch_end_tstmp_us;
tag_buf += 6;
ppdu_desc->channel = HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_GET(*tag_buf);
freq = HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_GET(*tag_buf);
if (freq != ppdu_desc->channel) {
soc = pdev->soc;
ppdu_desc->channel = freq;
if (soc && soc->cdp_soc.ol_ops->freq_to_channel)
pdev->operating_channel =
soc->cdp_soc.ol_ops->freq_to_channel(pdev->osif_pdev, freq);
}
ppdu_desc->phy_mode = HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_GET(*tag_buf);
}