qcacmn: Add support to parse HTT_PPDU_STATS_FOR_SMU_TLV

Firmware sends some ppdu stats required for packet capture
mode in new ppdu stats tlv HTT_PPDU_STATS_FOR_SMU_TLV.
Add code to parse it if feature is enabled via ini and
send the ppdu stats using wdi event to packet capture
component.

Change-Id: I5567007a91093dd342f37458760b3a61c040b779
CRs-Fixed: 3004476
这个提交包含在:
Surabhi Vishnoi
2021-08-17 15:36:31 +05:30
提交者 Madan Koyyalamudi
父节点 17818ac91e
当前提交 91674a4b07
修改 2 个文件,包含 50 行新增0 行删除

查看文件

@@ -3530,6 +3530,46 @@ dp_ppdu_desc_user_stats_update(struct dp_pdev *pdev,
}
#endif /* QCA_ENHANCED_STATS_SUPPORT */
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
static void dp_htt_process_smu_ppdu_stats_tlv(struct dp_soc *soc,
qdf_nbuf_t htt_t2h_msg)
{
uint32_t length;
uint8_t tlv_type;
uint32_t tlv_length, tlv_expected_size;
uint8_t *tlv_buf;
uint32_t *msg_word = (uint32_t *)qdf_nbuf_data(htt_t2h_msg);
length = HTT_T2H_PPDU_STATS_PAYLOAD_SIZE_GET(*msg_word);
msg_word = msg_word + 4;
while (length > 0) {
tlv_buf = (uint8_t *)msg_word;
tlv_type = HTT_STATS_TLV_TAG_GET(*msg_word);
tlv_length = HTT_STATS_TLV_LENGTH_GET(*msg_word);
if (tlv_length == 0)
break;
tlv_length += HTT_TLV_HDR_LEN;
if (tlv_type == HTT_PPDU_STATS_FOR_SMU_TLV) {
tlv_expected_size = sizeof(htt_ppdu_stats_for_smu_tlv);
if (tlv_length >= tlv_expected_size)
dp_wdi_event_handler(
WDI_EVENT_PKT_CAPTURE_PPDU_STATS,
soc, msg_word, HTT_INVALID_VDEV,
WDI_NO_VAL, 0);
}
msg_word = (uint32_t *)((uint8_t *)tlv_buf + tlv_length);
length -= (tlv_length);
}
}
#endif
/**
* dp_txrx_ppdu_stats_handler() - Function to process HTT PPDU stats from FW
* @soc: DP SOC handle
@@ -3580,6 +3620,15 @@ static bool dp_txrx_ppdu_stats_handler(struct dp_soc *soc,
return free_buf;
}
#elif defined(WLAN_FEATURE_PKT_CAPTURE_V2)
static bool dp_txrx_ppdu_stats_handler(struct dp_soc *soc,
uint8_t pdev_id, qdf_nbuf_t htt_t2h_msg)
{
if (wlan_cfg_get_pkt_capture_mode(soc->wlan_cfg_ctx))
dp_htt_process_smu_ppdu_stats_tlv(soc, htt_t2h_msg);
return true;
}
#else
static bool dp_txrx_ppdu_stats_handler(struct dp_soc *soc,
uint8_t pdev_id, qdf_nbuf_t htt_t2h_msg)