qcacmn: Support enhanced Rx capture
Support Rx capture mode to deliver first 128 bytes of each MSDU, along with some meta data. Change-Id: I1ffa8b1a029d46f68aa78520bacc019de8af7a82
This commit is contained in:
@@ -32,6 +32,26 @@
|
||||
#include "dp_ratetable.h"
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_RX_PKT_CAPTURE_ENH
|
||||
#include "dp_rx_mon_feature.h"
|
||||
#else
|
||||
static QDF_STATUS
|
||||
dp_rx_handle_enh_capture(struct dp_soc *soc, struct dp_pdev *pdev,
|
||||
struct hal_rx_ppdu_info *ppdu_info)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
dp_rx_mon_enh_capture_process(struct dp_pdev *pdev, uint32_t tlv_status,
|
||||
qdf_nbuf_t status_nbuf,
|
||||
struct hal_rx_ppdu_info *ppdu_info,
|
||||
bool *nbuf_used,
|
||||
uint32_t rx_enh_capture_mode)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* dp_rx_populate_cdp_indication_ppdu() - Populate cdp rx indication structure
|
||||
* @pdev: pdev ctx
|
||||
@@ -531,9 +551,13 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id,
|
||||
uint8_t *rx_tlv_start;
|
||||
uint32_t tlv_status = HAL_TLV_STATUS_BUF_DONE;
|
||||
QDF_STATUS m_copy_status = QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS enh_log_status = QDF_STATUS_SUCCESS;
|
||||
struct cdp_pdev_mon_stats *rx_mon_stats;
|
||||
int smart_mesh_status;
|
||||
enum WDI_EVENT pktlog_mode = WDI_NO_VAL;
|
||||
bool nbuf_used;
|
||||
uint32_t rx_enh_capture_mode;
|
||||
|
||||
|
||||
ppdu_info = &pdev->ppdu_info;
|
||||
rx_mon_stats = &pdev->rx_mon_stats;
|
||||
@@ -541,16 +565,19 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id,
|
||||
if (pdev->mon_ppdu_status != DP_PPDU_STATUS_START)
|
||||
return;
|
||||
|
||||
rx_enh_capture_mode = pdev->rx_enh_capture_mode;
|
||||
|
||||
while (!qdf_nbuf_is_queue_empty(&pdev->rx_status_q)) {
|
||||
|
||||
status_nbuf = qdf_nbuf_queue_remove(&pdev->rx_status_q);
|
||||
|
||||
rx_tlv = qdf_nbuf_data(status_nbuf);
|
||||
rx_tlv_start = rx_tlv;
|
||||
nbuf_used = false;
|
||||
|
||||
if ((pdev->monitor_vdev) || (pdev->enhanced_stats_en) ||
|
||||
pdev->mcopy_mode) {
|
||||
|
||||
pdev->mcopy_mode ||
|
||||
(rx_enh_capture_mode != CDP_RX_ENH_CAPTURE_DISABLED)) {
|
||||
do {
|
||||
tlv_status = hal_rx_status_get_tlv_info(rx_tlv,
|
||||
ppdu_info, pdev->soc->hal_soc);
|
||||
@@ -558,12 +585,18 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id,
|
||||
dp_rx_mon_update_dbg_ppdu_stats(ppdu_info,
|
||||
rx_mon_stats);
|
||||
|
||||
dp_rx_mon_enh_capture_process(pdev, tlv_status,
|
||||
status_nbuf, ppdu_info,
|
||||
&nbuf_used, rx_enh_capture_mode);
|
||||
|
||||
rx_tlv = hal_rx_status_get_next_tlv(rx_tlv);
|
||||
|
||||
if ((rx_tlv - rx_tlv_start) >= RX_BUFFER_SIZE)
|
||||
break;
|
||||
|
||||
} while (tlv_status == HAL_TLV_STATUS_PPDU_NOT_DONE);
|
||||
} while ((tlv_status == HAL_TLV_STATUS_PPDU_NOT_DONE) ||
|
||||
(tlv_status == HAL_TLV_STATUS_HEADER) ||
|
||||
(tlv_status == HAL_TLV_STATUS_MPDU_END));
|
||||
}
|
||||
if (pdev->dp_peer_based_pktlog) {
|
||||
dp_rx_process_peer_based_pktlog(soc, ppdu_info,
|
||||
@@ -593,6 +626,14 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id,
|
||||
pdev, ppdu_info, status_nbuf);
|
||||
if (m_copy_status == QDF_STATUS_SUCCESS)
|
||||
qdf_nbuf_free(status_nbuf);
|
||||
} else if (rx_enh_capture_mode != CDP_RX_ENH_CAPTURE_DISABLED) {
|
||||
if (!nbuf_used)
|
||||
qdf_nbuf_free(status_nbuf);
|
||||
|
||||
if (tlv_status == HAL_TLV_STATUS_PPDU_DONE)
|
||||
enh_log_status =
|
||||
dp_rx_handle_enh_capture(soc,
|
||||
pdev, ppdu_info);
|
||||
} else {
|
||||
qdf_nbuf_free(status_nbuf);
|
||||
}
|
||||
@@ -1022,6 +1063,7 @@ dp_rx_pdev_mon_status_attach(struct dp_pdev *pdev, int ring_id) {
|
||||
union dp_rx_desc_list_elem_t *tail = NULL;
|
||||
struct dp_srng *mon_status_ring;
|
||||
uint32_t num_entries;
|
||||
uint32_t i;
|
||||
struct rx_desc_pool *rx_desc_pool;
|
||||
QDF_STATUS status;
|
||||
int mac_for_pdev = dp_get_mac_id_for_mac(soc, ring_id);
|
||||
@@ -1065,5 +1107,13 @@ dp_rx_pdev_mon_status_attach(struct dp_pdev *pdev, int ring_id) {
|
||||
dp_rx_mon_init_dbg_ppdu_stats(&pdev->ppdu_info,
|
||||
&pdev->rx_mon_stats);
|
||||
|
||||
for (i = 0; i < MAX_MU_USERS; i++) {
|
||||
qdf_nbuf_queue_init(&pdev->mpdu_q[i]);
|
||||
pdev->is_mpdu_hdr[i] = true;
|
||||
}
|
||||
qdf_mem_zero(pdev->msdu_list, sizeof(pdev->msdu_list[MAX_MU_USERS]));
|
||||
|
||||
pdev->rx_enh_capture_mode = CDP_RX_ENH_CAPTURE_DISABLED;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user