qcacmn: Add support to Legacy tx monitor and Waikiki
Add function pointers to free buffer address stored in status buffer and support tx monitor in legacy and Waikiki flow. Change-Id: I28612d388009292ff751fe514183fb801909f485
This commit is contained in:

committed by
Madan Koyyalamudi

parent
154f9b8298
commit
357bfbe52d
@@ -2030,11 +2030,15 @@ struct cdp_tx_indication_mpdu_info {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct cdp_tx_indication_info - Tx capture information
|
* struct cdp_tx_indication_info - Tx capture information
|
||||||
|
* @radiotap_done: Flag to say radiotap already done or not
|
||||||
|
* 0 - radiotap not updated
|
||||||
|
* 1 - radiotap header updated
|
||||||
* @mpdu_info: Tx MPDU completion information
|
* @mpdu_info: Tx MPDU completion information
|
||||||
* @mpdu_nbuf: reconstructed mpdu packet
|
* @mpdu_nbuf: reconstructed mpdu packet
|
||||||
* @ppdu_desc: tx completion ppdu
|
* @ppdu_desc: tx completion ppdu
|
||||||
*/
|
*/
|
||||||
struct cdp_tx_indication_info {
|
struct cdp_tx_indication_info {
|
||||||
|
bool radiotap_done;
|
||||||
struct cdp_tx_indication_mpdu_info mpdu_info;
|
struct cdp_tx_indication_mpdu_info mpdu_info;
|
||||||
qdf_nbuf_t mpdu_nbuf;
|
qdf_nbuf_t mpdu_nbuf;
|
||||||
struct cdp_tx_completion_ppdu *ppdu_desc;
|
struct cdp_tx_completion_ppdu *ppdu_desc;
|
||||||
|
@@ -353,6 +353,14 @@ static inline QDF_STATUS dp_monitor_config_enh_tx_capture(struct dp_pdev *pdev,
|
|||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS dp_monitor_tx_peer_filter(struct dp_pdev *pdev,
|
||||||
|
struct dp_peer *peer,
|
||||||
|
uint8_t is_tx_pkt_cap_enable,
|
||||||
|
uint8_t *peer_mac)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
static inline QDF_STATUS dp_monitor_config_enh_rx_capture(struct dp_pdev *pdev,
|
static inline QDF_STATUS dp_monitor_config_enh_rx_capture(struct dp_pdev *pdev,
|
||||||
uint32_t val)
|
uint32_t val)
|
||||||
{
|
{
|
||||||
|
@@ -879,19 +879,24 @@ dp_mon_register_feature_ops_1_0(struct dp_soc *soc)
|
|||||||
mon_ops->mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data;
|
mon_ops->mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data;
|
||||||
mon_ops->mon_neighbour_peer_add_ast = dp_mon_neighbour_peer_add_ast;
|
mon_ops->mon_neighbour_peer_add_ast = dp_mon_neighbour_peer_add_ast;
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
||||||
mon_ops->mon_peer_tid_peer_id_update = dp_peer_tid_peer_id_update;
|
mon_ops->mon_peer_tid_peer_id_update = dp_peer_tid_peer_id_update_1_0;
|
||||||
mon_ops->mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach;
|
mon_ops->mon_tx_capture_debugfs_init = dp_tx_capture_debugfs_init_1_0;
|
||||||
mon_ops->mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach;
|
mon_ops->mon_tx_add_to_comp_queue = dp_tx_add_to_comp_queue_1_0;
|
||||||
mon_ops->mon_tx_capture_debugfs_init = dp_tx_capture_debugfs_init;
|
|
||||||
mon_ops->mon_tx_add_to_comp_queue = dp_tx_add_to_comp_queue;
|
|
||||||
mon_ops->mon_peer_tx_capture_filter_check =
|
|
||||||
dp_peer_tx_capture_filter_check;
|
|
||||||
mon_ops->mon_print_pdev_tx_capture_stats =
|
mon_ops->mon_print_pdev_tx_capture_stats =
|
||||||
dp_print_pdev_tx_capture_stats;
|
dp_print_pdev_tx_capture_stats_1_0;
|
||||||
mon_ops->mon_config_enh_tx_capture = dp_config_enh_tx_capture;
|
mon_ops->mon_config_enh_tx_capture = dp_config_enh_tx_capture_1_0;
|
||||||
|
mon_ops->mon_tx_peer_filter = dp_peer_set_tx_capture_enabled_1_0;
|
||||||
mon_ops->mon_peer_tx_capture_get_stats = dp_get_peer_tx_capture_stats;
|
mon_ops->mon_peer_tx_capture_get_stats = dp_get_peer_tx_capture_stats;
|
||||||
mon_ops->mon_pdev_tx_capture_get_stats = dp_get_pdev_tx_capture_stats;
|
mon_ops->mon_pdev_tx_capture_get_stats = dp_get_pdev_tx_capture_stats;
|
||||||
#endif
|
#endif
|
||||||
|
#if (defined(WIFI_MONITOR_SUPPORT) && !defined(WLAN_TX_PKT_CAPTURE_ENH))
|
||||||
|
mon_ops->mon_peer_tid_peer_id_update = NULL;
|
||||||
|
mon_ops->mon_tx_capture_debugfs_init = NULL;
|
||||||
|
mon_ops->mon_tx_add_to_comp_queue = NULL;
|
||||||
|
mon_ops->mon_print_pdev_tx_capture_stats = NULL;
|
||||||
|
mon_ops->mon_config_enh_tx_capture = NULL;
|
||||||
|
mon_ops->mon_tx_peer_filter = NULL;
|
||||||
|
#endif
|
||||||
#if defined(WDI_EVENT_ENABLE) &&\
|
#if defined(WDI_EVENT_ENABLE) &&\
|
||||||
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
|
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
|
||||||
mon_ops->mon_ppdu_stats_ind_handler = dp_ppdu_stats_ind_handler;
|
mon_ops->mon_ppdu_stats_ind_handler = dp_ppdu_stats_ind_handler;
|
||||||
@@ -1030,6 +1035,16 @@ struct dp_mon_ops monitor_ops_1_0 = {
|
|||||||
.mon_register_intr_ops = dp_mon_register_intr_ops_1_0,
|
.mon_register_intr_ops = dp_mon_register_intr_ops_1_0,
|
||||||
#endif
|
#endif
|
||||||
.mon_register_feature_ops = dp_mon_register_feature_ops_1_0,
|
.mon_register_feature_ops = dp_mon_register_feature_ops_1_0,
|
||||||
|
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
||||||
|
.mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach_1_0,
|
||||||
|
.mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach_1_0,
|
||||||
|
.mon_peer_tx_capture_filter_check = dp_peer_tx_capture_filter_check_1_0,
|
||||||
|
#endif
|
||||||
|
#if (defined(WIFI_MONITOR_SUPPORT) && !defined(WLAN_TX_PKT_CAPTURE_ENH))
|
||||||
|
.mon_tx_ppdu_stats_attach = NULL,
|
||||||
|
.mon_tx_ppdu_stats_detach = NULL,
|
||||||
|
.mon_peer_tx_capture_filter_check = NULL,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cdp_mon_ops dp_ops_mon_1_0 = {
|
struct cdp_mon_ops dp_ops_mon_1_0 = {
|
||||||
|
@@ -827,6 +827,32 @@ QDF_STATUS dp_mon_pdev_alloc_2_0(struct dp_pdev *pdev)
|
|||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dp_tx_ppdu_stats_attach_2_0(struct dp_pdev *pdev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void dp_tx_ppdu_stats_detach_2_0(struct dp_pdev *pdev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void dp_print_pdev_tx_capture_stats_2_0(struct dp_pdev *pdev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS dp_config_enh_tx_capture_2_0(struct dp_pdev *pdev, uint8_t val)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS dp_peer_set_tx_capture_enabled_2_0(struct dp_pdev *pdev_handle,
|
||||||
|
struct dp_peer *peer_handle,
|
||||||
|
uint8_t is_tx_pkt_cap_enable,
|
||||||
|
uint8_t *peer_mac)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS dp_mon_htt_srng_setup_2_0(struct dp_soc *soc,
|
QDF_STATUS dp_mon_htt_srng_setup_2_0(struct dp_soc *soc,
|
||||||
@@ -900,6 +926,17 @@ QDF_STATUS dp_vdev_set_monitor_mode_rings_2_0(struct dp_pdev *pdev,
|
|||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void dp_mon_pdev_free_2_0(struct dp_pdev *pdev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
QDF_STATUS dp_mon_pdev_alloc_2_0(struct dp_pdev *pdev)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void dp_mon_register_intr_ops_2_0(struct dp_soc *soc)
|
static void dp_mon_register_intr_ops_2_0(struct dp_soc *soc)
|
||||||
@@ -946,15 +983,22 @@ dp_mon_register_feature_ops_2_0(struct dp_soc *soc)
|
|||||||
#ifndef DISABLE_MON_CONFIG
|
#ifndef DISABLE_MON_CONFIG
|
||||||
mon_ops->mon_tx_process = dp_tx_mon_process_2_0;
|
mon_ops->mon_tx_process = dp_tx_mon_process_2_0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
#ifdef WLAN_TX_PKT_CAPTURE_ENH_BE
|
||||||
|
mon_ops->mon_peer_tid_peer_id_update = NULL;
|
||||||
|
mon_ops->mon_tx_capture_debugfs_init = NULL;
|
||||||
|
mon_ops->mon_tx_add_to_comp_queue = NULL;
|
||||||
|
mon_ops->mon_print_pdev_tx_capture_stats =
|
||||||
|
dp_print_pdev_tx_capture_stats_2_0;
|
||||||
|
mon_ops->mon_config_enh_tx_capture = dp_config_enh_tx_capture_2_0;
|
||||||
|
mon_ops->mon_tx_peer_filter = dp_peer_set_tx_capture_enabled_2_0;
|
||||||
|
#endif
|
||||||
|
#if (defined(WIFI_MONITOR_SUPPORT) && !defined(WLAN_TX_PKT_CAPTURE_ENH_BE))
|
||||||
mon_ops->mon_peer_tid_peer_id_update = NULL;
|
mon_ops->mon_peer_tid_peer_id_update = NULL;
|
||||||
mon_ops->mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach;
|
|
||||||
mon_ops->mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach;
|
|
||||||
mon_ops->mon_tx_capture_debugfs_init = NULL;
|
mon_ops->mon_tx_capture_debugfs_init = NULL;
|
||||||
mon_ops->mon_tx_add_to_comp_queue = NULL;
|
mon_ops->mon_tx_add_to_comp_queue = NULL;
|
||||||
mon_ops->mon_peer_tx_capture_filter_check = NULL;
|
|
||||||
mon_ops->mon_print_pdev_tx_capture_stats = NULL;
|
mon_ops->mon_print_pdev_tx_capture_stats = NULL;
|
||||||
mon_ops->mon_config_enh_tx_capture = dp_config_enh_tx_capture;
|
mon_ops->mon_config_enh_tx_capture = NULL;
|
||||||
|
mon_ops->mon_tx_peer_filter = NULL;
|
||||||
#endif
|
#endif
|
||||||
#if defined(WDI_EVENT_ENABLE) &&\
|
#if defined(WDI_EVENT_ENABLE) &&\
|
||||||
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
|
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
|
||||||
@@ -1099,6 +1143,16 @@ struct dp_mon_ops monitor_ops_2_0 = {
|
|||||||
.mon_register_intr_ops = dp_mon_register_intr_ops_2_0,
|
.mon_register_intr_ops = dp_mon_register_intr_ops_2_0,
|
||||||
#endif
|
#endif
|
||||||
.mon_register_feature_ops = dp_mon_register_feature_ops_2_0,
|
.mon_register_feature_ops = dp_mon_register_feature_ops_2_0,
|
||||||
|
#ifdef WLAN_TX_PKT_CAPTURE_ENH_BE
|
||||||
|
.mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach_2_0,
|
||||||
|
.mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach_2_0,
|
||||||
|
.mon_peer_tx_capture_filter_check = NULL,
|
||||||
|
#endif
|
||||||
|
#if (defined(WIFI_MONITOR_SUPPORT) && !defined(WLAN_TX_PKT_CAPTURE_ENH_BE))
|
||||||
|
.mon_tx_ppdu_stats_attach = NULL,
|
||||||
|
.mon_tx_ppdu_stats_detach = NULL,
|
||||||
|
.mon_peer_tx_capture_filter_check = NULL,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cdp_mon_ops dp_ops_mon_2_0 = {
|
struct cdp_mon_ops dp_ops_mon_2_0 = {
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <dp_mon_filter.h>
|
#include <dp_mon_filter.h>
|
||||||
#include <dp_htt.h>
|
#include <dp_htt.h>
|
||||||
#include <dp_mon.h>
|
#include <dp_mon.h>
|
||||||
|
#include <dp_tx_mon_2.0.h>
|
||||||
|
|
||||||
#define DP_MON_RING_FILL_LEVEL_DEFAULT 2048
|
#define DP_MON_RING_FILL_LEVEL_DEFAULT 2048
|
||||||
#define DP_MON_DATA_BUFFER_SIZE 2048
|
#define DP_MON_DATA_BUFFER_SIZE 2048
|
||||||
|
@@ -44,6 +44,7 @@ dp_tx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
|
|||||||
union dp_mon_desc_list_elem_t *desc_list = NULL;
|
union dp_mon_desc_list_elem_t *desc_list = NULL;
|
||||||
union dp_mon_desc_list_elem_t *tail = NULL;
|
union dp_mon_desc_list_elem_t *tail = NULL;
|
||||||
struct dp_mon_desc_pool *tx_mon_desc_pool = &mon_soc_be->tx_desc_mon;
|
struct dp_mon_desc_pool *tx_mon_desc_pool = &mon_soc_be->tx_desc_mon;
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
if (!pdev) {
|
if (!pdev) {
|
||||||
dp_mon_err("%pK: pdev is null for mac_id = %d", soc, mac_id);
|
dp_mon_err("%pK: pdev is null for mac_id = %d", soc, mac_id);
|
||||||
@@ -93,11 +94,15 @@ dp_tx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
|
|||||||
mon_desc->unmapped = 1;
|
mon_desc->unmapped = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dp_tx_mon_process_status_tlv(soc, pdev,
|
status = dp_tx_mon_process_status_tlv(soc, pdev,
|
||||||
&hal_mon_tx_desc,
|
&hal_mon_tx_desc,
|
||||||
mon_desc->paddr);
|
mon_desc->paddr);
|
||||||
|
if (status != QDF_STATUS_SUCCESS) {
|
||||||
|
hal_txmon_status_free_buffer(pdev->soc->hal_soc,
|
||||||
|
mon_desc->buf_addr);
|
||||||
|
qdf_frag_free(mon_desc->buf_addr);
|
||||||
|
}
|
||||||
|
|
||||||
qdf_frag_free(mon_desc->buf_addr);
|
|
||||||
dp_mon_add_to_free_desc_list(&desc_list, &tail, mon_desc);
|
dp_mon_add_to_free_desc_list(&desc_list, &tail, mon_desc);
|
||||||
work_done++;
|
work_done++;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -82,10 +82,10 @@ dp_tx_mon_buf_desc_pool_alloc(struct dp_soc *soc);
|
|||||||
* @frag_addr: frag address
|
* @frag_addr: frag address
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void dp_tx_mon_process_status_tlv(struct dp_soc *soc,
|
QDF_STATUS dp_tx_mon_process_status_tlv(struct dp_soc *soc,
|
||||||
struct dp_pdev *pdev,
|
struct dp_pdev *pdev,
|
||||||
struct hal_mon_desc *mon_ring_desc,
|
struct hal_mon_desc *mon_ring_desc,
|
||||||
qdf_dma_addr_t addr);
|
qdf_dma_addr_t addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dp_tx_mon_process_2_0() - tx monitor interrupt process
|
* dp_tx_mon_process_2_0() - tx monitor interrupt process
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -17,16 +18,28 @@
|
|||||||
#include "qdf_nbuf.h"
|
#include "qdf_nbuf.h"
|
||||||
#include "dp_internal.h"
|
#include "dp_internal.h"
|
||||||
#include "qdf_mem.h" /* qdf_mem_malloc,free */
|
#include "qdf_mem.h" /* qdf_mem_malloc,free */
|
||||||
|
#include <dp_be.h>
|
||||||
#include <qdf_nbuf_frag.h>
|
#include <qdf_nbuf_frag.h>
|
||||||
#include <hal_be_api_mon.h>
|
#include <hal_be_api_mon.h>
|
||||||
#include <dp_mon.h>
|
#include <dp_mon.h>
|
||||||
#include <dp_mon_2.0.h>
|
#include <dp_mon_2.0.h>
|
||||||
#include <dp_tx_mon_2.0.h>
|
#include <dp_tx_mon_2.0.h>
|
||||||
|
|
||||||
void dp_tx_mon_process_status_tlv(struct dp_soc *soc,
|
/**
|
||||||
struct dp_pdev *pdev,
|
* dp_tx_mon_process_status_tlv() - API to processed TLV
|
||||||
struct hal_mon_desc *mon_ring_desc,
|
* invoked from interrupt handler
|
||||||
qdf_dma_addr_t addr)
|
*
|
||||||
|
* @soc - DP_SOC handle
|
||||||
|
* @pdev - DP_PDEV handle
|
||||||
|
* @mon_ring_desc - descriptor status info
|
||||||
|
* @addr - status buffer frag address
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS dp_tx_mon_process_status_tlv(struct dp_soc *soc,
|
||||||
|
struct dp_pdev *pdev,
|
||||||
|
struct hal_mon_desc *mon_ring_desc,
|
||||||
|
qdf_dma_addr_t addr)
|
||||||
{
|
{
|
||||||
/* API to process tlv */
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <dp_htt.h>
|
#include <dp_htt.h>
|
||||||
#include <dp_mon.h>
|
#include <dp_mon.h>
|
||||||
#include <dp_rx_mon.h>
|
#include <dp_rx_mon.h>
|
||||||
|
#include <dp_internal.h>
|
||||||
#include "htt_ppdu_stats.h"
|
#include "htt_ppdu_stats.h"
|
||||||
#include "dp_cal_client_api.h"
|
#include "dp_cal_client_api.h"
|
||||||
#if defined(DP_CON_MON)
|
#if defined(DP_CON_MON)
|
||||||
@@ -1848,9 +1849,8 @@ dp_peer_update_pkt_capture_params(ol_txrx_soc_handle soc,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
/* we need to set tx pkt capture for non associated peer */
|
/* we need to set tx pkt capture for non associated peer */
|
||||||
status = dp_peer_set_tx_capture_enabled(pdev, peer,
|
status = dp_monitor_tx_peer_filter(pdev, peer, is_tx_pkt_cap_enable,
|
||||||
is_tx_pkt_cap_enable,
|
peer_mac);
|
||||||
peer_mac);
|
|
||||||
|
|
||||||
status = dp_peer_set_rx_capture_enabled(pdev, peer,
|
status = dp_peer_set_rx_capture_enabled(pdev, peer,
|
||||||
is_rx_pkt_cap_enable,
|
is_rx_pkt_cap_enable,
|
||||||
@@ -4760,7 +4760,8 @@ QDF_STATUS dp_mon_pdev_init(struct dp_pdev *pdev)
|
|||||||
if (mon_ops->rx_mon_buffers_alloc)
|
if (mon_ops->rx_mon_buffers_alloc)
|
||||||
mon_ops->rx_mon_buffers_alloc(pdev);
|
mon_ops->rx_mon_buffers_alloc(pdev);
|
||||||
|
|
||||||
dp_tx_ppdu_stats_attach(pdev);
|
/* attach monitor function */
|
||||||
|
dp_monitor_tx_ppdu_stats_attach(pdev);
|
||||||
mon_pdev->is_dp_mon_pdev_initialized = true;
|
mon_pdev->is_dp_mon_pdev_initialized = true;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
@@ -4790,7 +4791,8 @@ QDF_STATUS dp_mon_pdev_deinit(struct dp_pdev *pdev)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
dp_mon_filters_reset(pdev);
|
dp_mon_filters_reset(pdev);
|
||||||
dp_tx_ppdu_stats_detach(pdev);
|
/* detach monitor function */
|
||||||
|
dp_monitor_tx_ppdu_stats_detach(pdev);
|
||||||
|
|
||||||
if (mon_ops->rx_mon_buffers_free)
|
if (mon_ops->rx_mon_buffers_free)
|
||||||
mon_ops->rx_mon_buffers_free(pdev);
|
mon_ops->rx_mon_buffers_free(pdev);
|
||||||
@@ -4873,7 +4875,7 @@ QDF_STATUS dp_mon_peer_attach(struct dp_peer *peer)
|
|||||||
* when unassociated peer get associated peer need to
|
* when unassociated peer get associated peer need to
|
||||||
* update tx_cap_enabled flag to support peer filter.
|
* update tx_cap_enabled flag to support peer filter.
|
||||||
*/
|
*/
|
||||||
dp_peer_tx_capture_filter_check(pdev, peer);
|
dp_monitor_peer_tx_capture_filter_check(pdev, peer);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@@ -459,7 +459,7 @@ struct dp_mon_ops {
|
|||||||
void (*mon_peer_tx_init)(struct dp_pdev *pdev, struct dp_peer *peer);
|
void (*mon_peer_tx_init)(struct dp_pdev *pdev, struct dp_peer *peer);
|
||||||
void (*mon_peer_tx_cleanup)(struct dp_vdev *vdev,
|
void (*mon_peer_tx_cleanup)(struct dp_vdev *vdev,
|
||||||
struct dp_peer *peer);
|
struct dp_peer *peer);
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
#ifdef WIFI_MONITOR_SUPPORT
|
||||||
void (*mon_peer_tid_peer_id_update)(struct dp_peer *peer,
|
void (*mon_peer_tid_peer_id_update)(struct dp_peer *peer,
|
||||||
uint16_t peer_id);
|
uint16_t peer_id);
|
||||||
void (*mon_tx_ppdu_stats_attach)(struct dp_pdev *pdev);
|
void (*mon_tx_ppdu_stats_attach)(struct dp_pdev *pdev);
|
||||||
@@ -493,10 +493,14 @@ struct dp_mon_ops {
|
|||||||
void (*mon_htt_ppdu_stats_detach)(struct dp_pdev *pdev);
|
void (*mon_htt_ppdu_stats_detach)(struct dp_pdev *pdev);
|
||||||
void (*mon_print_pdev_rx_mon_stats)(struct dp_pdev *pdev);
|
void (*mon_print_pdev_rx_mon_stats)(struct dp_pdev *pdev);
|
||||||
|
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
#ifdef WIFI_MONITOR_SUPPORT
|
||||||
void (*mon_print_pdev_tx_capture_stats)(struct dp_pdev *pdev);
|
void (*mon_print_pdev_tx_capture_stats)(struct dp_pdev *pdev);
|
||||||
QDF_STATUS (*mon_config_enh_tx_capture)(struct dp_pdev *pdev,
|
QDF_STATUS (*mon_config_enh_tx_capture)(struct dp_pdev *pdev,
|
||||||
uint8_t val);
|
uint8_t val);
|
||||||
|
QDF_STATUS (*mon_tx_peer_filter)(struct dp_pdev *pdev_handle,
|
||||||
|
struct dp_peer *peer_handle,
|
||||||
|
uint8_t is_tx_pkt_cap_enable,
|
||||||
|
uint8_t *peer_mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WLAN_RX_PKT_CAPTURE_ENH
|
#ifdef WLAN_RX_PKT_CAPTURE_ENH
|
||||||
QDF_STATUS (*mon_config_enh_rx_capture)(struct dp_pdev *pdev,
|
QDF_STATUS (*mon_config_enh_rx_capture)(struct dp_pdev *pdev,
|
||||||
@@ -917,14 +921,6 @@ void dp_rx_mon_update_protocol_flow_tag(struct dp_soc *soc,
|
|||||||
#endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG || WLAN_SUPPORT_RX_FLOW_TAG */
|
#endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG || WLAN_SUPPORT_RX_FLOW_TAG */
|
||||||
|
|
||||||
#ifndef WLAN_TX_PKT_CAPTURE_ENH
|
#ifndef WLAN_TX_PKT_CAPTURE_ENH
|
||||||
static inline
|
|
||||||
QDF_STATUS dp_peer_set_tx_capture_enabled(struct dp_pdev *pdev,
|
|
||||||
struct dp_peer *peer_handle,
|
|
||||||
uint8_t value, uint8_t *peer_mac)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_peer_tid_queue_init() – Initialize ppdu stats queue per TID
|
* dp_peer_tid_queue_init() – Initialize ppdu stats queue per TID
|
||||||
* @peer: Datapath peer
|
* @peer: Datapath peer
|
||||||
@@ -954,89 +950,6 @@ dp_peer_update_80211_hdr(struct dp_vdev *vdev, struct dp_peer *peer)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* dp_tx_ppdu_stats_attach - Initialize Tx PPDU stats and enhanced capture
|
|
||||||
* @pdev: DP PDEV
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
static inline void dp_tx_ppdu_stats_attach(struct dp_pdev *pdev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* dp_tx_ppdu_stats_detach - Cleanup Tx PPDU stats and enhanced capture
|
|
||||||
* @pdev: DP PDEV
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
static inline void dp_tx_ppdu_stats_detach(struct dp_pdev *pdev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* dp_tx_add_to_comp_queue() - add completion msdu to queue
|
|
||||||
* @soc: DP Soc handle
|
|
||||||
* @tx_desc: software Tx descriptor
|
|
||||||
* @ts : Tx completion status from HAL/HTT descriptor
|
|
||||||
* @peer: DP peer
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
static inline
|
|
||||||
QDF_STATUS dp_tx_add_to_comp_queue(struct dp_soc *soc,
|
|
||||||
struct dp_tx_desc_s *desc,
|
|
||||||
struct hal_tx_completion_status *ts,
|
|
||||||
struct dp_peer *peer)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* dp_update_msdu_to_list(): Function to queue msdu from wbm
|
|
||||||
* @pdev: dp_pdev
|
|
||||||
* @peer: dp_peer
|
|
||||||
* @ts: hal tx completion status
|
|
||||||
* @netbuf: msdu
|
|
||||||
*
|
|
||||||
* return: status
|
|
||||||
*/
|
|
||||||
static inline
|
|
||||||
QDF_STATUS dp_update_msdu_to_list(struct dp_soc *soc,
|
|
||||||
struct dp_pdev *pdev,
|
|
||||||
struct dp_peer *peer,
|
|
||||||
struct hal_tx_completion_status *ts,
|
|
||||||
qdf_nbuf_t netbuf)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* dp_peer_tx_capture_filter_check: check filter is enable for the filter
|
|
||||||
* and update tx_cap_enabled flag
|
|
||||||
* @pdev: DP PDEV handle
|
|
||||||
* @peer: DP PEER handle
|
|
||||||
*
|
|
||||||
* return: void
|
|
||||||
*/
|
|
||||||
static inline
|
|
||||||
void dp_peer_tx_capture_filter_check(struct dp_pdev *pdev,
|
|
||||||
struct dp_peer *peer)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* dp_tx_capture_debugfs_init: tx capture debugfs init
|
|
||||||
* @pdev: DP PDEV handle
|
|
||||||
*
|
|
||||||
* return: QDF_STATUS
|
|
||||||
*/
|
|
||||||
static inline
|
|
||||||
QDF_STATUS dp_tx_capture_debugfs_init(struct dp_pdev *pdev)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_get_peer_tx_capture_stats: to get peer tx capture stats
|
* dp_get_peer_tx_capture_stats: to get peer tx capture stats
|
||||||
* @peer: DP PEER handle
|
* @peer: DP PEER handle
|
||||||
@@ -1117,16 +1030,6 @@ void dp_tx_capture_htt_frame_counter(struct dp_pdev *pdev,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* dp_tx_cature_stats: print tx capture stats
|
|
||||||
* @pdev: DP PDEV handle
|
|
||||||
*
|
|
||||||
* return: void
|
|
||||||
*/
|
|
||||||
static inline
|
|
||||||
void dp_print_pdev_tx_capture_stats(struct dp_pdev *pdev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2115,8 +2018,8 @@ static inline void dp_monitor_peer_tx_cleanup(struct dp_vdev *vdev,
|
|||||||
return monitor_ops->mon_peer_tx_cleanup(vdev, peer);
|
return monitor_ops->mon_peer_tx_cleanup(vdev, peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
#ifdef WIFI_MONITOR_SUPPORT
|
||||||
/*
|
/**
|
||||||
* dp_monitor_peer_tid_peer_id_update() - peer tid update
|
* dp_monitor_peer_tid_peer_id_update() - peer tid update
|
||||||
* @soc: point to soc
|
* @soc: point to soc
|
||||||
* @peer: point to peer
|
* @peer: point to peer
|
||||||
@@ -2547,13 +2450,13 @@ static inline void dp_monitor_print_pdev_rx_mon_stats(struct dp_pdev *pdev)
|
|||||||
return monitor_ops->mon_print_pdev_rx_mon_stats(pdev);
|
return monitor_ops->mon_print_pdev_rx_mon_stats(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WIFI_MONITOR_SUPPORT
|
||||||
/*
|
/*
|
||||||
* dp_monitor_print_pdev_tx_capture_stats() - print tx capture stats
|
* dp_monitor_print_pdev_tx_capture_stats() - print tx capture stats
|
||||||
* @pdev: Datapath PDEV handle
|
* @pdev: Datapath PDEV handle
|
||||||
*
|
*
|
||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
|
||||||
static inline void dp_monitor_print_pdev_tx_capture_stats(struct dp_pdev *pdev)
|
static inline void dp_monitor_print_pdev_tx_capture_stats(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct dp_mon_ops *monitor_ops;
|
struct dp_mon_ops *monitor_ops;
|
||||||
@@ -2573,6 +2476,13 @@ static inline void dp_monitor_print_pdev_tx_capture_stats(struct dp_pdev *pdev)
|
|||||||
return monitor_ops->mon_print_pdev_tx_capture_stats(pdev);
|
return monitor_ops->mon_print_pdev_tx_capture_stats(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_monitor_config_enh_tx_capture() - configure tx capture
|
||||||
|
* @pdev: Datapath PDEV handle
|
||||||
|
* @val: mode
|
||||||
|
*
|
||||||
|
* Return: status
|
||||||
|
*/
|
||||||
static inline QDF_STATUS dp_monitor_config_enh_tx_capture(struct dp_pdev *pdev,
|
static inline QDF_STATUS dp_monitor_config_enh_tx_capture(struct dp_pdev *pdev,
|
||||||
uint32_t val)
|
uint32_t val)
|
||||||
{
|
{
|
||||||
@@ -2592,15 +2502,37 @@ static inline QDF_STATUS dp_monitor_config_enh_tx_capture(struct dp_pdev *pdev,
|
|||||||
|
|
||||||
return monitor_ops->mon_config_enh_tx_capture(pdev, val);
|
return monitor_ops->mon_config_enh_tx_capture(pdev, val);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static inline void dp_monitor_print_pdev_tx_capture_stats(struct dp_pdev *pdev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline QDF_STATUS dp_monitor_config_enh_tx_capture(struct dp_pdev *pdev,
|
/**
|
||||||
uint32_t val)
|
* dp_monitor_tx_peer_filter() - add tx monitor peer filter
|
||||||
|
* @pdev: Datapath PDEV handle
|
||||||
|
* @peer: Datapath PEER handle
|
||||||
|
* @is_tx_pkt_cap_enable: flag for tx capture enable/disable
|
||||||
|
* @peer_mac: peer mac address
|
||||||
|
*
|
||||||
|
* Return: status
|
||||||
|
*/
|
||||||
|
static inline QDF_STATUS dp_monitor_tx_peer_filter(struct dp_pdev *pdev,
|
||||||
|
struct dp_peer *peer,
|
||||||
|
uint8_t is_tx_pkt_cap_enable,
|
||||||
|
uint8_t *peer_mac)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_E_INVAL;
|
struct dp_mon_ops *monitor_ops;
|
||||||
|
struct dp_mon_soc *mon_soc = pdev->soc->monitor_soc;
|
||||||
|
|
||||||
|
if (!mon_soc) {
|
||||||
|
qdf_err("monitor soc is NULL");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
monitor_ops = mon_soc->mon_ops;
|
||||||
|
if (!monitor_ops || !monitor_ops->mon_tx_peer_filter) {
|
||||||
|
qdf_err("callback not registered");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return monitor_ops->mon_tx_peer_filter(pdev, peer, is_tx_pkt_cap_enable,
|
||||||
|
peer_mac);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -22,6 +22,14 @@
|
|||||||
|
|
||||||
#include <mon_ingress_ring.h>
|
#include <mon_ingress_ring.h>
|
||||||
#include <mon_destination_ring.h>
|
#include <mon_destination_ring.h>
|
||||||
|
#include "hal_be_hw_headers.h"
|
||||||
|
#include <mon_ingress_ring.h>
|
||||||
|
#include <mon_destination_ring.h>
|
||||||
|
#include <hal_be_hw_headers.h>
|
||||||
|
#include "hal_api_mon.h"
|
||||||
|
#include <hal_generic_api.h>
|
||||||
|
#include <hal_generic_api.h>
|
||||||
|
#include <hal_api_mon.h>
|
||||||
|
|
||||||
#define HAL_MON_BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_OFFSET 0x00000000
|
#define HAL_MON_BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_OFFSET 0x00000000
|
||||||
#define HAL_MON_BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_LSB 0
|
#define HAL_MON_BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_LSB 0
|
||||||
@@ -65,6 +73,13 @@
|
|||||||
(paddr_hi << HAL_MON_MON_INGRESS_RING_BUFFER_VIRT_ADDR_63_32_LSB) & \
|
(paddr_hi << HAL_MON_MON_INGRESS_RING_BUFFER_VIRT_ADDR_63_32_LSB) & \
|
||||||
HAL_MON_MON_INGRESS_RING_BUFFER_VIRT_ADDR_63_32_MASK)
|
HAL_MON_MON_INGRESS_RING_BUFFER_VIRT_ADDR_63_32_MASK)
|
||||||
|
|
||||||
|
enum hal_dest_desc_end_reason {
|
||||||
|
HAL_TX_MON_STATUS_BUFFER_FULL = 0,
|
||||||
|
HAL_TX_MON_FLUSH_DETECTED,
|
||||||
|
HAL_TX_MON_END_OF_PPDU,
|
||||||
|
HAL_TX_MON_PPDU_TRUNCATED
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct hal_mon_desc () - HAL Monitor descriptor
|
* struct hal_mon_desc () - HAL Monitor descriptor
|
||||||
*
|
*
|
||||||
@@ -99,6 +114,29 @@ struct hal_mon_desc {
|
|||||||
looping_count:4;
|
looping_count:4;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct hal_mon_desc *hal_mon_desc_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct hal_mon_buf_addr_status () - HAL buffer address tlv get status
|
||||||
|
*
|
||||||
|
* @buf_addr_31_0: Lower 32 bits of virtual address of status buffer
|
||||||
|
* @buf_addr_63_32: Upper 32 bits of virtual address of status buffer
|
||||||
|
* @dma_length: DMA length
|
||||||
|
* @msdu_continuation: is msdu size more than fragment size
|
||||||
|
* @truncated: is msdu got truncated
|
||||||
|
* @tlv_padding: tlv paddding
|
||||||
|
*/
|
||||||
|
struct hal_mon_buf_addr_status {
|
||||||
|
uint32_t buffer_virt_addr_31_0;
|
||||||
|
uint32_t buffer_virt_addr_63_32;
|
||||||
|
uint32_t dma_length:12,
|
||||||
|
reserved_2a:4,
|
||||||
|
msdu_continuation:1,
|
||||||
|
truncated:1,
|
||||||
|
reserved_2b:14;
|
||||||
|
uint32_t tlv64_padding;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_be_get_mon_dest_status() - Get monitor descriptor
|
* hal_be_get_mon_dest_status() - Get monitor descriptor
|
||||||
* @hal_soc_hdl: HAL Soc handle
|
* @hal_soc_hdl: HAL Soc handle
|
||||||
@@ -148,5 +186,112 @@ void hal_mon_buff_addr_info_set(hal_soc_handle_t hal_soc_hdl,
|
|||||||
HAL_MON_VADDR_HI_SET(mon_entry, vaddr_hi);
|
HAL_MON_VADDR_HI_SET(mon_entry, vaddr_hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_mon_buf_get() - Get monitor descriptor
|
||||||
|
* @hal_soc_hdl: HAL Soc handle
|
||||||
|
* @desc: HAL monitor descriptor
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
void hal_mon_buf_get(hal_soc_handle_t hal_soc_hdl,
|
||||||
|
void *dst_ring_desc,
|
||||||
|
struct hal_mon_desc *mon_desc)
|
||||||
|
{
|
||||||
|
struct mon_destination_ring *hal_dst_ring =
|
||||||
|
(struct mon_destination_ring *)dst_ring_desc;
|
||||||
|
|
||||||
|
mon_desc->buf_addr =
|
||||||
|
((u64)hal_dst_ring->stat_buf_virt_addr_31_0 |
|
||||||
|
((u64)hal_dst_ring->stat_buf_virt_addr_63_32 << 32));
|
||||||
|
mon_desc->ppdu_id = hal_dst_ring->ppdu_id;
|
||||||
|
mon_desc->end_offset = hal_dst_ring->end_offset;
|
||||||
|
mon_desc->end_reason = hal_dst_ring->end_reason;
|
||||||
|
mon_desc->initiator = hal_dst_ring->initiator;
|
||||||
|
mon_desc->ring_id = hal_dst_ring->ring_id;
|
||||||
|
mon_desc->empty_descriptor = hal_dst_ring->empty_descriptor;
|
||||||
|
mon_desc->looping_count = hal_dst_ring->looping_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TX monitor */
|
||||||
|
#define TX_MON_STATUS_BUF_SIZE 2048
|
||||||
|
|
||||||
|
#define HAL_INVALID_PPDU_ID 0xFFFFFFFF
|
||||||
|
|
||||||
|
enum hal_tx_tlv_status {
|
||||||
|
HAL_MON_TX_FES_SETUP,
|
||||||
|
HAL_MON_TX_FES_STATUS_END,
|
||||||
|
HAL_MON_RX_RESPONSE_REQUIRED_INFO,
|
||||||
|
HAL_MON_RESPONSE_END_STATUS_INFO,
|
||||||
|
|
||||||
|
HAL_MON_TX_PCU_PPDU_SETUP_INIT,
|
||||||
|
|
||||||
|
HAL_MON_TX_MPDU_START,
|
||||||
|
HAL_MON_TX_MSDU_START,
|
||||||
|
HAL_MON_TX_BUFFER_ADDR,
|
||||||
|
HAL_MON_TX_DATA,
|
||||||
|
|
||||||
|
HAL_MON_TX_FES_STATUS_START,
|
||||||
|
|
||||||
|
HAL_MON_TX_FES_STATUS_PROT,
|
||||||
|
HAL_MON_TX_FES_STATUS_START_PROT,
|
||||||
|
|
||||||
|
HAL_MON_TX_FES_STATUS_START_PPDU,
|
||||||
|
HAL_MON_TX_FES_STATUS_USER_PPDU,
|
||||||
|
|
||||||
|
HAL_MON_RX_FRAME_BITMAP_ACK,
|
||||||
|
HAL_MON_RX_FRAME_BITMAP_BLOCK_ACK_256,
|
||||||
|
HAL_MON_RX_FRAME_BITMAP_BLOCK_ACK_1K,
|
||||||
|
HAL_MON_COEX_TX_STATUS,
|
||||||
|
|
||||||
|
HAL_MON_MACTX_HE_SIG_A_SU,
|
||||||
|
HAL_MON_MACTX_HE_SIG_A_MU_DL,
|
||||||
|
HAL_MON_MACTX_HE_SIG_B1_MU,
|
||||||
|
HAL_MON_MACTX_HE_SIG_B2_MU,
|
||||||
|
HAL_MON_MACTX_HE_SIG_B2_OFDMA,
|
||||||
|
HAL_MON_MACTX_L_SIG_A,
|
||||||
|
HAL_MON_MACTX_L_SIG_B,
|
||||||
|
HAL_MON_MACTX_HT_SIG,
|
||||||
|
HAL_MON_MACTX_VHT_SIG_A,
|
||||||
|
|
||||||
|
HAL_MON_MACTX_USER_DESC_PER_USER,
|
||||||
|
HAL_MON_MACTX_USER_DESC_COMMON,
|
||||||
|
HAL_MON_MACTX_PHY_DESC,
|
||||||
|
|
||||||
|
HAL_MON_TX_STATUS_PPDU_NOT_DONE,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_tx_status_get_next_tlv() - get next tx status TLV
|
||||||
|
* @tx_tlv: pointer to TLV header
|
||||||
|
*
|
||||||
|
* Return: pointer to next tlv info
|
||||||
|
*/
|
||||||
|
static inline uint8_t*
|
||||||
|
hal_tx_status_get_next_tlv(uint8_t *tx_tlv) {
|
||||||
|
uint32_t tlv_len, tlv_tag;
|
||||||
|
|
||||||
|
tlv_len = HAL_RX_GET_USER_TLV32_LEN(tx_tlv);
|
||||||
|
tlv_tag = HAL_RX_GET_USER_TLV32_TYPE(tx_tlv);
|
||||||
|
|
||||||
|
return (uint8_t *)(((unsigned long)(tx_tlv + tlv_len +
|
||||||
|
HAL_RX_TLV32_HDR_SIZE + 3)) & (~3));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* hal_txmon_status_free_buffer() - api to free status buffer
|
||||||
|
* @hal_soc: HAL soc handle
|
||||||
|
* @status_frag: qdf_frag_t buffer
|
||||||
|
*
|
||||||
|
* Return void
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_txmon_status_free_buffer(hal_soc_handle_t hal_soc_hdl,
|
||||||
|
qdf_frag_t status_frag)
|
||||||
|
{
|
||||||
|
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||||
|
|
||||||
|
hal_soc->ops->hal_txmon_status_free_buffer(status_frag);
|
||||||
|
}
|
||||||
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||||
#endif /* _HAL_BE_API_MON_H_ */
|
#endif /* _HAL_BE_API_MON_H_ */
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "hal_be_reo.h"
|
#include "hal_be_reo.h"
|
||||||
#include <hal_api_mon.h>
|
#include <hal_api_mon.h>
|
||||||
#include <hal_generic_api.h>
|
#include <hal_generic_api.h>
|
||||||
|
#include <hal_be_api_mon.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_tx_comp_get_status() - TQM Release reason
|
* hal_tx_comp_get_status() - TQM Release reason
|
||||||
@@ -1719,4 +1720,80 @@ hal_rx_fst_get_fse_size_be(void)
|
|||||||
{
|
{
|
||||||
return HAL_RX_FST_ENTRY_SIZE;
|
return HAL_RX_FST_ENTRY_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TX MONITOR
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef QCA_MONITOR_2_0_SUPPORT
|
||||||
|
/**
|
||||||
|
* hal_txmon_get_buffer_addr_generic_be() - api to get buffer address
|
||||||
|
* @tx_tlv: pointer to TLV header
|
||||||
|
* @status: hal mon buffer address status
|
||||||
|
*
|
||||||
|
* Return: Address to qdf_frag_t
|
||||||
|
*/
|
||||||
|
static inline qdf_frag_t
|
||||||
|
hal_txmon_get_buffer_addr_generic_be(void *tx_tlv,
|
||||||
|
struct hal_mon_buf_addr_status *status)
|
||||||
|
{
|
||||||
|
struct mon_buffer_addr *hal_buffer_addr =
|
||||||
|
(struct mon_buffer_addr *)((uint8_t *)tx_tlv +
|
||||||
|
HAL_RX_TLV32_HDR_SIZE);
|
||||||
|
qdf_frag_t buf_addr = NULL;
|
||||||
|
|
||||||
|
buf_addr = (qdf_frag_t)((u64)hal_buffer_addr->buffer_virt_addr_31_0 |
|
||||||
|
((u64)hal_buffer_addr->buffer_virt_addr_63_32 <<
|
||||||
|
32));
|
||||||
|
|
||||||
|
/* qdf_frag_t is derived from buffer address tlv */
|
||||||
|
if (qdf_unlikely(status)) {
|
||||||
|
qdf_mem_copy(status,
|
||||||
|
(uint8_t *)tx_tlv + HAL_RX_TLV32_HDR_SIZE,
|
||||||
|
sizeof(struct hal_mon_buf_addr_status));
|
||||||
|
/* update hal_mon_buf_addr_status */
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf_addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_txmon_free_status_buffer() - api to free status buffer
|
||||||
|
* @pdev_handle: DP_PDEV handle
|
||||||
|
* @status_frag: qdf_frag_t buffer
|
||||||
|
*
|
||||||
|
* Return void
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_txmon_status_free_buffer_generic_be(qdf_frag_t status_frag)
|
||||||
|
{
|
||||||
|
uint32_t tlv_tag, tlv_len;
|
||||||
|
uint32_t tlv_status = HAL_MON_TX_STATUS_PPDU_NOT_DONE;
|
||||||
|
uint8_t *tx_tlv;
|
||||||
|
uint8_t *tx_tlv_start;
|
||||||
|
qdf_frag_t frag_buf = NULL;
|
||||||
|
|
||||||
|
tx_tlv = (uint8_t *)status_frag;
|
||||||
|
tx_tlv_start = tx_tlv;
|
||||||
|
/* parse tlv and populate tx_ppdu_info */
|
||||||
|
do {
|
||||||
|
/* TODO: check config_length is full monitor mode */
|
||||||
|
tlv_tag = HAL_RX_GET_USER_TLV32_TYPE(tx_tlv);
|
||||||
|
tlv_len = HAL_RX_GET_USER_TLV32_LEN(tx_tlv);
|
||||||
|
|
||||||
|
if (tlv_tag == WIFIMON_BUFFER_ADDR_E) {
|
||||||
|
frag_buf = hal_txmon_get_buffer_addr_generic_be(tx_tlv,
|
||||||
|
NULL);
|
||||||
|
if (frag_buf)
|
||||||
|
qdf_frag_free(frag_buf);
|
||||||
|
|
||||||
|
frag_buf = NULL;
|
||||||
|
}
|
||||||
|
/* need api definition for hal_tx_status_get_next_tlv */
|
||||||
|
tx_tlv = hal_tx_status_get_next_tlv(tx_tlv);
|
||||||
|
if ((tx_tlv - tx_tlv_start) >= TX_MON_STATUS_BUF_SIZE)
|
||||||
|
break;
|
||||||
|
} while (tlv_status == HAL_MON_TX_STATUS_PPDU_NOT_DONE);
|
||||||
|
}
|
||||||
|
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||||
#endif /* _HAL_BE_GENERIC_API_H_ */
|
#endif /* _HAL_BE_GENERIC_API_H_ */
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -32,6 +32,15 @@
|
|||||||
#if defined(QCA_WIFI_KIWI)
|
#if defined(QCA_WIFI_KIWI)
|
||||||
#include "msmhwioreg.h"
|
#include "msmhwioreg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* TX MONITOR */
|
||||||
|
#ifdef QCA_MONITOR_2_0_SUPPORT
|
||||||
|
#include "mon_buffer_addr.h"
|
||||||
|
/* FES WINDOW OPEN */
|
||||||
|
#include "tx_fes_setup.h"
|
||||||
|
#include "rx_response_required_info.h"
|
||||||
|
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||||
|
|
||||||
#include <reo_descriptor_threshold_reached_status.h>
|
#include <reo_descriptor_threshold_reached_status.h>
|
||||||
#include <reo_flush_queue.h>
|
#include <reo_flush_queue.h>
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -85,7 +86,7 @@ static inline void hal_get_radiotap_he_gi_ltf(uint16_t *he_gi, uint16_t *he_ltf)
|
|||||||
*
|
*
|
||||||
* Return - Channel frequency in Mhz
|
* Return - Channel frequency in Mhz
|
||||||
*/
|
*/
|
||||||
static uint16_t
|
static inline uint16_t
|
||||||
hal_rx_radiotap_num_to_freq(uint16_t chan_num, qdf_freq_t center_freq)
|
hal_rx_radiotap_num_to_freq(uint16_t chan_num, qdf_freq_t center_freq)
|
||||||
{
|
{
|
||||||
if (center_freq > CHANNEL_FREQ_5920 && center_freq < CHANNEL_FREQ_5950)
|
if (center_freq > CHANNEL_FREQ_5920 && center_freq < CHANNEL_FREQ_5950)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -1023,6 +1023,11 @@ struct hal_hw_txrx_ops {
|
|||||||
uint32_t tlv, int *num_ref);
|
uint32_t tlv, int *num_ref);
|
||||||
uint8_t (*hal_get_tlv_hdr_size)(void);
|
uint8_t (*hal_get_tlv_hdr_size)(void);
|
||||||
uint8_t (*hal_get_idle_link_bm_id)(uint8_t chip_id);
|
uint8_t (*hal_get_idle_link_bm_id)(uint8_t chip_id);
|
||||||
|
|
||||||
|
/* TX MONITOR */
|
||||||
|
#ifdef QCA_MONITOR_2_0_SUPPORT
|
||||||
|
void (*hal_txmon_status_free_buffer)(qdf_frag_t status_frag);
|
||||||
|
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -39,6 +39,13 @@
|
|||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
#define HAL_OFFSET(block, field) block ## _ ## field ## _OFFSET
|
#define HAL_OFFSET(block, field) block ## _ ## field ## _OFFSET
|
||||||
|
|
||||||
|
#define HAL_TX_LSB(block, field) block ## _ ## field ## _LSB
|
||||||
|
|
||||||
|
#define HAL_TX_MASK(block, field) block ## _ ## field ## _MASK
|
||||||
|
|
||||||
|
#define HAL_TX_DESC_OFFSET(desc, block, field) \
|
||||||
|
(((uint8_t *)desc) + HAL_OFFSET(block, field))
|
||||||
|
|
||||||
#define HAL_SET_FLD(desc, block , field) \
|
#define HAL_SET_FLD(desc, block , field) \
|
||||||
(*(uint32_t *) ((uint8_t *) desc + HAL_OFFSET(block, field)))
|
(*(uint32_t *) ((uint8_t *) desc + HAL_OFFSET(block, field)))
|
||||||
|
|
||||||
|
@@ -196,6 +196,11 @@
|
|||||||
#define MAX_CHAIN 8
|
#define MAX_CHAIN 8
|
||||||
#define QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS 8
|
#define QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS 8
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @qdf_nbuf_queue_t - Platform independent packet queue abstraction
|
||||||
|
*/
|
||||||
|
typedef __qdf_nbuf_queue_t qdf_nbuf_queue_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the length for radiotap, combined length
|
* This is the length for radiotap, combined length
|
||||||
* (Mandatory part struct ieee80211_radiotap_header + RADIOTAP_HEADER_LEN)
|
* (Mandatory part struct ieee80211_radiotap_header + RADIOTAP_HEADER_LEN)
|
||||||
@@ -461,6 +466,7 @@ struct mon_rx_status {
|
|||||||
* @ba_control: Block ack control
|
* @ba_control: Block ack control
|
||||||
* @ba_bitmap: 256 bit block ack bitmap
|
* @ba_bitmap: 256 bit block ack bitmap
|
||||||
* @tid: QoS traffic tid number
|
* @tid: QoS traffic tid number
|
||||||
|
* @mpdu_q: user mpdu_queue used for monitor
|
||||||
*/
|
*/
|
||||||
struct mon_rx_user_status {
|
struct mon_rx_user_status {
|
||||||
uint32_t mcs:4,
|
uint32_t mcs:4,
|
||||||
@@ -519,6 +525,7 @@ struct mon_rx_user_status {
|
|||||||
uint32_t ba_bitmap[32];
|
uint32_t ba_bitmap[32];
|
||||||
uint32_t ba_bitmap_sz;
|
uint32_t ba_bitmap_sz;
|
||||||
uint16_t aid;
|
uint16_t aid;
|
||||||
|
qdf_nbuf_queue_t mpdu_q;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -843,11 +850,6 @@ typedef __qdf_nbuf_queue_head_t qdf_nbuf_queue_head_t;
|
|||||||
typedef void (*qdf_dma_map_cb_t)(void *arg, qdf_nbuf_t buf,
|
typedef void (*qdf_dma_map_cb_t)(void *arg, qdf_nbuf_t buf,
|
||||||
qdf_dma_map_t dmap);
|
qdf_dma_map_t dmap);
|
||||||
|
|
||||||
/**
|
|
||||||
* @qdf_nbuf_queue_t - Platform independent packet queue abstraction
|
|
||||||
*/
|
|
||||||
typedef __qdf_nbuf_queue_t qdf_nbuf_queue_t;
|
|
||||||
|
|
||||||
/* BUS/DMA mapping routines */
|
/* BUS/DMA mapping routines */
|
||||||
|
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
|
Reference in New Issue
Block a user