qcacmn: Add new data structures and ops for BE monitor

- New data structures are added for BE monitor support
  - dp_mon_soc_be  - to maintain soc level BE specific fields
  - dp_mon_pdev_be - to maintain pdev BE specific fields
  - dp_mon_desc_pool - to maintain descriptor pool
- Monitor ops are updated for 2.0 and corresponding dummy APIs
  are added.
- dp_mon_filter_srng_type is enhanced for TxMON

Change-Id: I12a2fbc53e4eecc7a191b7aa925431298d0a9f54
CRs-Fixed: 2991276
This commit is contained in:
Naga
2021-10-04 23:54:26 +05:30
committed by Madan Koyyalamudi
parent 3289db4279
commit db1a6c8418
12 changed files with 1168 additions and 19 deletions

View File

@@ -144,6 +144,7 @@ struct dp_tx_bank_profile {
* @hw_cc_ctx: core context of HW cookie conversion
* @tx_spt_page_desc: spt page desc allocated for TX desc pool
* @rx_spt_page_desc: spt page desc allocated for RX desc pool
* @monitor_soc_be: BE specific monitor object
*/
struct dp_soc_be {
struct dp_soc soc;
@@ -158,6 +159,9 @@ struct dp_soc_be {
struct dp_srng ppe2tcl_ring;
struct dp_srng ppe_release_ring;
#endif
#if !defined(DISABLE_MON_CONFIG)
struct dp_mon_soc_be *monitor_soc_be;
#endif
};
/* convert struct dp_soc_be pointer to struct dp_soc pointer */
@@ -166,9 +170,13 @@ struct dp_soc_be {
/**
* struct dp_pdev_be - Extended DP pdev for BE targets
* @pdev: dp pdev structure
* @monitor_pdev_be: BE specific monitor object
*/
struct dp_pdev_be {
struct dp_pdev pdev;
#if !defined(DISABLE_MON_CONFIG)
struct dp_mon_pdev_be *monitor_pdev_be;
#endif
};
/**

View File

@@ -219,6 +219,317 @@ struct htt_soc {
HTT_TX_MUTEX_TYPE htt_tx_mutex;
};
#ifdef QCA_MONITOR_2_0_SUPPORT
/**
* struct dp_tx_mon_downstream_tlv_config - Enable/Disable TxMon
* downstream TLVs
* tx_fes_setup: TX_FES_SETUP TLV
* tx_peer_entry: TX_PEER_ENTRY TLV
* tx_queue_extension: TX_QUEUE_EXTENSION TLV
* tx_last_mpdu_end: TX_LAST_MPDU_END TLV
* tx_last_mpdu_fetched: TX_LAST_MPDU_FETCHED TLV
* tx_data_sync: TX_DATA_SYNC TLV
* pcu_ppdu_setup_init: PCU_PPDU_SETUP_INIT TLV
* fw2s_mon: FW2S_MON TLV
* tx_loopback_setup: TX_LOOPBACK_SETUP TLV
* sch_critical_tlv_ref: SCH_CRITICAL_TLV_REF TLV
* ndp_preamble_done: NDP_PREAMBLE_DONE TLV
* tx_raw_frame_setup: TX_RAW_OR_NATIVE_FRAME_SETUP TLV
* txpcu_user_setup: TXPCU_USER_SETUP TLV
* rxpcu_setup: RXPCU_SETUP TLV
* rxpcu_setup_complete: RXPCU_SETUP_COMPLETE TLV
* coex_tx_req: COEX_TX_REQ TLV
* rxpcu_user_setup: RXPCU_USER_SETUP TLV
* rxpcu_user_setup_ext: RXPCU_USER_SETUP_EXT TLV
* wur_data: WUR_DATA TLV
* tqm_mpdu_global_start: TQM_MPDU_GLOBAL_START
* tx_fes_setup_complete: TX_FES_SETUP_COMPLETE TLV
* scheduler_end: SCHEDULER_END TLV
* sch_wait_instr_tx_path: SCH_WAIT_INSTR_TX_PATH TLV
*
*/
struct dp_tx_mon_downstream_tlv_config {
uint32_t tx_fes_setup:1,
tx_peer_entry:1,
tx_queue_extension:1,
tx_last_mpdu_end:1,
tx_last_mpdu_fetched:1,
tx_data_sync:1,
pcu_ppdu_setup_init:1,
fw2s_mon:1,
tx_loopback_setup:1,
sch_critical_tlv_ref:1,
ndp_preamble_done:1,
tx_raw_frame_setup:1,
txpcu_user_setup:1,
rxpcu_setup:1,
rxpcu_setup_complete:1,
coex_tx_req:1,
rxpcu_user_setup:1,
rxpcu_user_setup_ext:1,
wur_data:1,
tqm_mpdu_global_start:1,
tx_fes_setup_complete:1,
scheduler_end:1,
sch_wait_instr_tx_path:1;
};
/**
* struct dp_tx_mon_upstream_tlv_config - Enable/Disable TxMon
* upstream TLVs
* rx_response_required_info: RX_RESPONSE_REQUIRED_INFO
* TLV
* response_start_status: RESPONSE_START_STATUS TLV
* response_end_status: RESPONSE_END_STATUS TLV
* tx_fes_status_start: TX_FES_STATUS_START TLV
* tx_fes_status_start_ppdu: TX_FES_STATUS_START_PPDU TLV
* tx_fes_status_user_ppdu: TX_FES_STATUS_USER_PPDU TLV
* tx_fes_status_ack_or_ba: TX_FES_STATUS_ACK_OR_BA TLV
* tx_fes_status_1k_ba: TX_FES_STATUS_1K_BA TLV
* tx_fes_status_start_prot: TX_FES_STATUS_START_PROTO TLV
* tx_fes_status_user_response: TX_FES_STATUS_USER_RESPONSE TLV
* rx_frame_bitmap_ack: RX_FRAME_BITMAP_ACK TLV
* rx_frame_1k_bitmap_ack: RX_FRAME_1K_BITMAP_ACK TLV
* coex_tx_status: COEX_TX_STATUS TLV
* recevied_response_info: RECEIVED_RESPONSE_INFO TLV
* recevied_response_info_p2: RECEIVED_RESPONSE_INFO_PART2 TLV
* ofdma_trigger_details: OFDMA_TRIGGER_DETAILS
* recevied_trigger_info: RECEIVED_TRIGGER_INFO
* pdg_tx_request: PDG_TX_REQUEST
* pdg_response: PDG_RESPONSE
* pdg_trig_response: PDG_TRIG_RESPONSE
* trigger_response_tx_done: TRIGGER_RESPONSE_TX_DONE
* prot_tx_end: PROT_TX_END
* ppdu_tx_end: PPDU_TX_END
* r2r_status_end: R2R_STATUS_END
* flush_req: FLUSH_REQ
* mactx_phy_desc: MACTX_PHY_DESC
* mactx_user_desc_cmn: MACTX_USER_DESC_COMMON
* mactx_user_desc_per_usr: MACTX_USER_DESC_PER_USER
* tqm_acked_1k_mpdu: TQM_ACKED_1K_MPDU
* tqm_acked_mpdu: TQM_ACKED_MPDU
* tqm_update_tx_mpdu_count: TQM_UPDATE_TX_MPDU_COUNT
* phytx_ppdu_header_info_request: PHYTX_PPDU_HEADER_INFO_REQUEST
* u_sig_eht_su_mu: U_SIG_EHT_SU_MU
* u_sig_eht_su: U_SIG_EHT_SU
* eht_sig_usr_su: EHT_SIG_USR_SU
* eht_sig_usr_mu_mimo: EHT_SIG_USR_MU_MIMO
* eht_sig_usr_ofdma: EHT_SIG_USR_MU_MIMO
* he_sig_a_su: HE_SIG_A_SU
* he_sig_a_mu_dl: HE_SIG_A_MU_DL
* he_sig_a_mu_ul: HE_SIG_A_MU_UL
* he_sig_b1_mu: HE_SIG_B1_MU
* he_sig_b2_mu: HE_SIG_B2_MU
* he_sig_b2_ofdma: HE_SIG_B2_OFDMA
* vht_sig_b_mu160: VHT_SIG_B_MU160
* vht_sig_b_mu80: VHT_SIG_B_MU80
* vht_sig_b_mu40: VHT_SIG_B_MU40
* vht_sig_b_mu20: VHT_SIG_B_MU20
* vht_sig_b_su160: VHT_SIG_B_SU160
* vht_sig_b_su80: VHT_SIG_B_SU80
* vht_sig_b_su40: VHT_SIG_B_SU40
* vht_sig_b_su20: VHT_SIG_B_SU20
* vht_sig_a: VHT_SIG_A
* ht_sig: HT_SIG
* l_sig_b: L_SIG_B
* l_sig_a: L_SIG_A
* tx_service: TX_SERVICE
* txpcu_buf_status: TXPCU_BUFFER_STATUS
* txpcu_user_buf_status: TXPCU_USER_BUFFER_STATUS
* txdma_stop_request: TXDMA_STOP_REQUEST
* expected_response: EXPECTED_RESPONSE
* tx_mpdu_count_transfer_end: TX_MPDU_COUNT_TRANSFER_END
* rx_trig_info: RX_TRIG_INFO
* rxpcu_tx_setup_clear: RXPCU_TX_SETUP_CLEAR
* rx_frame_bitmap_req: RX_FRAME_BITMAP_REQ
* rx_phy_sleep: RX_PHY_SLEEP
* txpcu_preamble_done: TXPCU_PREAMBLE_DONE
* txpcu_phytx_debug32: TXPCU_PHYTX_DEBUG32
* txpcu_phytx_other_transmit_info32: TXPCU_PHYTX_OTHER_TRANSMIT_INFO32
* rx_ppdu_noack_report: RX_PPDU_NO_ACK_REPORT
* rx_ppdu_ack_report: RX_PPDU_ACK_REPORT
* coex_rx_status: COEX_RX_STATUS
* rx_start_param: RX_START_PARAM
* tx_cbf_info: TX_CBF_INFO
* rxpcu_early_rx_indication: RXPCU_EARLY_RX_INDICATION
* received_response_user_7_0: RECEIVED_RESPONSE_USER_7_0
* received_response_user_15_8: RECEIVED_RESPONSE_USER_15_8
* received_response_user_23_16: RECEIVED_RESPONSE_USER_23_16
* received_response_user_31_24: RECEIVED_RESPONSE_USER_31_24
* received_response_user_36_32: RECEIVED_RESPONSE_USER_36_32
* rx_pm_info: RX_PM_INFO
* rx_preamble: RX_PREAMBLE
* others: OTHERS
* mactx_pre_phy_desc: MACTX_PRE_PHY_DESC
*
*/
struct dp_tx_mon_upstream_tlv_config {
uint32_t rx_response_required_info:1,
response_start_status:1,
response_end_status:1,
tx_fes_status_start:1,
tx_fes_status_end:1,
tx_fes_status_start_ppdu:1,
tx_fes_status_user_ppdu:1,
tx_fes_status_ack_or_ba:1,
tx_fes_status_1k_ba:1,
tx_fes_status_start_prot:1,
tx_fes_status_prot:1,
tx_fes_status_user_response:1,
rx_frame_bitmap_ack:1,
rx_frame_1k_bitmap_ack:1,
coex_tx_status:1,
recevied_response_info:1,
recevied_response_info_p2:1,
ofdma_trigger_details:1,
recevied_trigger_info:1,
pdg_tx_request:1,
pdg_response:1,
pdg_trig_response:1,
trigger_response_tx_done:1,
prot_tx_end:1,
ppdu_tx_end:1,
r2r_status_end:1,
flush_req:1,
mactx_phy_desc:1,
mactx_user_desc_cmn:1,
mactx_user_desc_per_usr:1;
uint32_t tqm_acked_1k_mpdu:1,
tqm_acked_mpdu:1,
tqm_update_tx_mpdu_count:1,
phytx_ppdu_header_info_request:1,
u_sig_eht_su_mu:1,
u_sig_eht_su:1,
u_sig_eht_tb:1,
eht_sig_usr_su:1,
eht_sig_usr_mu_mimo:1,
eht_sig_usr_ofdma:1,
he_sig_a_su:1,
he_sig_a_mu_dl:1,
he_sig_a_mu_ul:1,
he_sig_b1_mu:1,
he_sig_b2_mu:1,
he_sig_b2_ofdma:1,
vht_sig_b_mu160:1,
vht_sig_b_mu80:1,
vht_sig_b_mu40:1,
vht_sig_b_mu20:1,
vht_sig_b_su160:1,
vht_sig_b_su80:1,
vht_sig_b_su40:1,
vht_sig_b_su20:1,
vht_sig_a:1,
ht_sig:1,
l_sig_b:1,
l_sig_a:1,
tx_service:1;
uint32_t txpcu_buf_status:1,
txpcu_user_buf_status:1,
txdma_stop_request:1,
expected_response:1,
tx_mpdu_count_transfer_end:1,
rx_trig_info:1,
rxpcu_tx_setup_clear:1,
rx_frame_bitmap_req:1,
rx_phy_sleep:1,
txpcu_preamble_done:1,
txpcu_phytx_debug32:1,
txpcu_phytx_other_transmit_info32:1,
rx_ppdu_noack_report:1,
rx_ppdu_ack_report:1,
coex_rx_status:1,
rx_start_param:1,
tx_cbf_info:1,
rxpcu_early_rx_indication:1,
received_response_user_7_0:1,
received_response_user_15_8:1,
received_response_user_23_16:1,
received_response_user_31_24:1,
received_response_user_36_32:1,
rx_pm_info:1,
rx_preamble:1,
others:1,
mactx_pre_phy_desc:1;
};
/**
* struct dp_tx_mon_wordmask_config - Tx monitor word mask
* tx_fes_setup: TX_FES_SETUP TLV word mask
* tx_peer_entry: TX_PEER_ENTRY TLV word mask
* tx_queue_ext: TX_QUEUE_EXTENSION TLV word mask
* tx_msdu_start: TX_MSDU_START TLV word mask
* tx_mpdu_start: TX_MPDU_START TLV word mask
* pcu_ppdu_setup_init: PCU_PPDU_SETUP TLV word mask
* rxpcu_user_setup: RXPCU_USER_SETUP TLV word mask
*/
struct dp_tx_mon_wordmask_config {
uint16_t tx_fes_setup;
uint16_t tx_peer_entry;
uint16_t tx_queue_ext;
uint16_t tx_msdu_start;
uint16_t tx_mpdu_start;
uint16_t pcu_ppdu_setup_init;
uint16_t rxpcu_user_setup;
};
/**
* struct htt_tx_ring_tlv_filter - Tx ring TLV filter
* enable/disable.
* @dtlvs: enable/disable downstream TLVs
* @utlvs: enable/disable upstream TLVs
* @wmask: enable/disbale word mask subscription
* @mgmt_filter: enable/disable mgmt packets
* @data_filter: enable/disable data packets
* @ctrl_filter: enable/disable ctrl packets
* @mgmt_dma_length: configure length for mgmt packet
* @ctrl_dma_length: configure length for ctrl packet
* @data_dma_length: configure length for data packet
* @mgmt_mpdu_end: enable mpdu end tlv for mgmt
* @mgmt_msdu_end: enable msdu end tlv for mgmt
* @mgmt_msdu_start: enable msdu start tlv for mgmt
* @mgmt_mpdu_start: enable mpdu start tlv for mgmt
* @ctrl_mpdu_end: enable mpdu end tlv for ctrl
* @ctrl_msdu_end: enable msdu end tlv for ctrl
* @ctrl_msdu_start: enable msdu start tlv for ctrl
* @ctrl_mpdu_start: enable mpdu start tlv for ctrl
* @data_mpdu_end: enable mpdu end tlv for data
* @data_msdu_end: enable msdu end tlv for data
* @data_msdu_start: enable msdu start tlv for data
* @data_mpdu_start: enable mpdu start tlv for data
* @mgmt_mpdu_log: enable mgmt mpdu level logging
* @ctrl_mpdu_log: enable ctrl mpdu level logging
* @data_mpdu_log: enable data mpdu level logging
*
* NOTE: Do not change the layout of this structure
*/
struct htt_tx_ring_tlv_filter {
struct dp_tx_mon_downstream_tlv_config dtlvs;
struct dp_tx_mon_upstream_tlv_config utlvs;
struct dp_tx_mon_wordmask_config wmask;
uint16_t mgmt_filter;
uint16_t data_filter;
uint16_t ctrl_filter;
uint16_t mgmt_dma_length:3,
ctrl_dma_length:3,
data_dma_length:3;
uint16_t mgmt_mpdu_end:1,
mgmt_msdu_end:1,
mgmt_msdu_start:1,
mgmt_mpdu_start:1,
ctrl_mpdu_end:1,
ctrl_msdu_end:1,
ctrl_msdu_start:1,
ctrl_mpdu_start:1,
data_mpdu_end:1,
data_msdu_end:1,
data_msdu_start:1,
data_mpdu_start:1;
uint8_t mgmt_mpdu_log:1,
ctrl_mpdu_log:1,
data_mpdu_log:1;
};
#endif /* QCA_MONITOR_2_0_SUPPORT */
/**
* struct htt_rx_ring_tlv_filter - Rx ring TLV filter
* enable/disable.
@@ -248,6 +559,16 @@ struct htt_soc {
* @rx_msdu_end_offset: Offset of rx_msdu_end tlv
* @rx_msdu_start_offset: Offset of rx_msdu_start tlv
* @rx_attn_offset: Offset of rx_attention tlv
* @rx_mpdu_start_wmask: word mask for mpdu start tlv
* @rx_mpdu_end_wmask: word mask for mpdu end tlv
* @rx_msdu_end_tlv: word mask for msdu end tlv
* @rx_pkt_tlv_offset: rx pkt tlv offset
* @mgmt_dma_length: configure length for mgmt packet
* @ctrl_dma_length: configure length for ctrl packet
* @data_dma_length: configure length for data packet
* @mgmt_mpdu_log: enable mgmt mpdu level logging
* @ctrl_mpdu_log: enable ctrl mpdu level logging
* @data_mpdu_log: enable data mpdu level logging
*
* NOTE: Do not change the layout of this structure
*/
@@ -285,6 +606,18 @@ struct htt_rx_ring_tlv_filter {
uint16_t rx_msdu_end_offset;
uint16_t rx_msdu_start_offset;
uint16_t rx_attn_offset;
#ifdef QCA_MONITOR_2_0_SUPPORT
uint16_t rx_mpdu_start_wmask;
uint16_t rx_mpdu_end_wmask;
uint16_t rx_msdu_end_wmask;
uint16_t rx_pkt_tlv_offset;
uint16_t mgmt_dma_length:3,
ctrl_dma_length:3,
data_dma_lepngth:3,
mgmt_mpdu_log:1,
ctrl_mpdu_log:1,
data_mpdu_log:1;
#endif
};
/**

View File

@@ -3220,6 +3220,8 @@ dp_rx_mon_process_1_0(struct dp_soc *soc, struct dp_intr *int_ctx,
struct dp_mon_ops monitor_ops_1_0 = {
.mon_soc_cfg_init = dp_mon_soc_cfg_init,
.mon_pdev_alloc = NULL,
.mon_pdev_free = NULL,
.mon_pdev_attach = dp_mon_pdev_attach,
.mon_pdev_detach = dp_mon_pdev_detach,
.mon_pdev_init = dp_mon_pdev_init,
@@ -3340,14 +3342,16 @@ struct dp_mon_ops monitor_ops_1_0 = {
dp_mon_filter_reset_rx_pktlog_cbf_1_0,
#endif
.mon_filter_update = dp_mon_filter_update_1_0,
.rx_pdev_mon_desc_pool_init = dp_rx_pdev_mon_desc_pool_init,
.rx_pdev_mon_desc_pool_deinit = dp_rx_pdev_mon_desc_pool_deinit,
.rx_pdev_mon_desc_pool_alloc = dp_rx_pdev_mon_desc_pool_alloc,
.rx_pdev_mon_desc_pool_free = dp_rx_pdev_mon_desc_pool_free,
.rx_pdev_mon_buffers_alloc = dp_rx_pdev_mon_buffers_alloc,
.rx_pdev_mon_buffers_free = dp_rx_pdev_mon_buffers_free,
.mon_buffers_alloc = NULL,
.mon_buffers_free = NULL,
.rx_mon_desc_pool_init = dp_rx_pdev_mon_desc_pool_init,
.rx_mon_desc_pool_deinit = dp_rx_pdev_mon_desc_pool_deinit,
.rx_mon_desc_pool_alloc = dp_rx_pdev_mon_desc_pool_alloc,
.rx_mon_desc_pool_free = dp_rx_pdev_mon_desc_pool_free,
.rx_mon_buffers_alloc = dp_rx_pdev_mon_buffers_alloc,
.rx_mon_buffers_free = dp_rx_pdev_mon_buffers_free,
.tx_mon_desc_pool_init = NULL,
.tx_mon_desc_pool_deinit = NULL,
.tx_mon_desc_pool_alloc = NULL,
.tx_mon_desc_pool_free = NULL,
.mon_rings_alloc = dp_mon_rings_alloc_1_0,
.mon_rings_free = dp_mon_rings_free_1_0,
.mon_rings_init = dp_mon_rings_init_1_0,

View File

@@ -13,3 +13,376 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <dp_types.h>
#include "dp_rx.h"
#include "dp_peer.h"
#include <dp_htt.h>
#include <dp_mon_filter.h>
#include <dp_mon.h>
#include <dp_rx_mon.h>
#include <dp_rx_mon_2.0.h>
#include <dp_mon_2.0.h>
#include <dp_mon_filter_2.0.h>
#include <dp_tx_mon_2.0.h>
#include <hal_be_api_mon.h>
#include <dp_be.h>
extern QDF_STATUS dp_srng_alloc(struct dp_soc *soc, struct dp_srng *srng,
int ring_type, uint32_t num_entries,
bool cached);
extern void dp_srng_free(struct dp_soc *soc, struct dp_srng *srng);
extern QDF_STATUS dp_srng_init(struct dp_soc *soc, struct dp_srng *srng,
int ring_type, int ring_num, int mac_id);
extern void dp_srng_deinit(struct dp_soc *soc, struct dp_srng *srng,
int ring_type, int ring_num);
#if !defined(DISABLE_MON_CONFIG)
static
void dp_vdev_set_monitor_mode_buf_rings_2_0(struct dp_pdev *pdev)
{
}
static
QDF_STATUS dp_vdev_set_monitor_mode_rings_2_0(struct dp_pdev *pdev,
uint8_t delayed_replenish)
{
return QDF_STATUS_SUCCESS;
}
#else
static inline
void dp_vdev_set_monitor_mode_buf_rings_2_0(struct dp_pdev *pdev)
{
}
static inline
QDF_STATUS dp_vdev_set_monitor_mode_rings_2_0(struct dp_pdev *pdev,
uint8_t delayed_replenish)
{
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef QCA_SUPPORT_BPR
static QDF_STATUS
dp_set_bpr_enable_2_0(struct dp_pdev *pdev, int val)
{
return QDF_STATUS_SUCCESS;
}
#endif
#ifndef DISABLE_MON_CONFIG
static
QDF_STATUS dp_mon_htt_srng_setup_2_0(struct dp_soc *soc,
struct dp_pdev *pdev,
int mac_id,
int mac_for_pdev)
{
return QDF_STATUS_SUCCESS;
}
static uint32_t
dp_rx_mon_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
uint32_t mac_id, uint32_t quota)
{
return 0;
}
static uint32_t
dp_tx_mon_process(struct dp_soc *soc, struct dp_intr *int_ctx,
uint32_t mac_id, uint32_t quota)
{
return 0;
}
static
QDF_STATUS dp_mon_soc_attach_2_0(struct dp_soc *soc)
{
return status;
}
static
QDF_STATUS dp_mon_soc_detach_2_0(struct dp_soc *soc)
{
return status;
}
static
QDF_STATUS dp_mon_soc_init_2_0(struct dp_soc *soc)
{
return status;
}
static
QDF_STATUS dp_mon_soc_deinit_2_0(struct dp_soc *soc)
{
return status;
}
static
void dp_pdev_mon_rings_deinit(struct dp_pdev *pdev)
{
}
static
QDF_STATUS dp_pdev_mon_rings_init(struct dp_soc *soc, struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}
static
void dp_pdev_mon_rings_free(struct dp_pdev *pdev)
{
}
static
QDF_STATUS dp_pdev_mon_rings_alloc(struct dp_soc *soc, struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}
#else
static inline
QDF_STATUS dp_mon_htt_srng_setup_2_0(struct dp_soc *soc,
struct dp_pdev *pdev,
int mac_id,
int mac_for_pdev)
{
return QDF_STATUS_SUCCESS;
}
static uint32_t
dp_rx_mon_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
uint32_t mac_id, uint32_t quota)
{
return 0;
}
static uint32_t
dp_tx_mon_process(struct dp_soc *soc, struct dp_intr *int_ctx,
uint32_t mac_id, uint32_t quota)
{
return 0;
}
static inline
QDF_STATUS dp_mon_soc_attach_2_0(struct dp_soc *soc)
{
return status;
}
static inline
QDF_STATUS dp_mon_soc_detach_2_0(struct dp_soc *soc)
{
return status;
}
static inline
QDF_STATUS dp_mon_soc_init_2_0(struct dp_soc *soc)
{
return status;
}
static inline
QDF_STATUS dp_mon_soc_deinit_2_0(struct dp_soc *soc)
{
return status;
}
static inline
void dp_pdev_mon_rings_deinit(struct dp_pdev *pdev)
{
}
static inline
QDF_STATUS dp_pdev_mon_rings_init(struct dp_soc *soc, struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}
static inline
void dp_pdev_mon_rings_free(struct dp_pdev *pdev)
{
}
static inline
QDF_STATUS dp_pdev_mon_rings_alloc(struct dp_soc *soc, struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}
#endif
static inline
void dp_mon_pdev_free(struct dp_pdev *pdev)
{
}
static inline
QDF_STATUS dp_mon_pdev_alloc(struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}
struct dp_mon_ops monitor_ops_2_0 = {
.mon_soc_cfg_init = dp_mon_soc_cfg_init,
.mon_soc_attach = dp_mon_soc_attach_2_0,
.mon_soc_detach = dp_mon_soc_detach_2_0,
.mon_soc_init = dp_mon_soc_init_2_0,
.mon_soc_deinit = dp_mon_soc_deinit_2_0,
.mon_pdev_alloc = dp_mon_pdev_alloc_2_0,
.mon_pdev_free = dp_mon_pdev_free_2_0,
.mon_pdev_attach = dp_mon_pdev_attach,
.mon_pdev_detach = dp_mon_pdev_detach,
.mon_pdev_init = dp_mon_pdev_init,
.mon_pdev_deinit = dp_mon_pdev_deinit,
.mon_vdev_attach = dp_mon_vdev_attach,
.mon_vdev_detach = dp_mon_vdev_detach,
.mon_peer_attach = dp_mon_peer_attach,
.mon_peer_detach = dp_mon_peer_detach,
.mon_config_debug_sniffer = dp_config_debug_sniffer,
.mon_flush_rings = NULL,
#if !defined(DISABLE_MON_CONFIG)
.mon_htt_srng_setup = dp_mon_htt_srng_setup_2_0,
#endif
#if defined(DP_CON_MON)
.mon_service_rings = NULL,
#endif
#ifndef DISABLE_MON_CONFIG
.mon_rx_process = dp_rx_mon_process_2_0,
.mon_tx_process = dp_tx_mon_process,
#endif
#if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC)
.mon_drop_packets_for_mac = NULL,
#endif
.mon_peer_tx_init = NULL,
.mon_peer_tx_cleanup = NULL,
#ifdef WLAN_TX_PKT_CAPTURE_ENH
.mon_peer_tid_peer_id_update = NULL,
.mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach,
.mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach,
.mon_tx_capture_debugfs_init = NULL,
.mon_tx_add_to_comp_queue = NULL,
.mon_peer_tx_capture_filter_check = NULL,
#endif
#if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
.mon_ppdu_stats_ind_handler = dp_ppdu_stats_ind_handler,
#endif
.mon_htt_ppdu_stats_attach = dp_htt_ppdu_stats_attach,
.mon_htt_ppdu_stats_detach = dp_htt_ppdu_stats_detach,
.mon_print_pdev_rx_mon_stats = dp_print_pdev_rx_mon_stats,
#ifdef WLAN_TX_PKT_CAPTURE_ENH
.mon_print_pdev_tx_capture_stats = NULL,
.mon_config_enh_tx_capture = dp_config_enh_tx_capture,
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
.mon_config_enh_rx_capture = dp_config_enh_rx_capture,
#endif
#ifdef QCA_SUPPORT_BPR
.mon_set_bpr_enable = dp_set_bpr_enable_2_0,
#endif
#ifdef ATH_SUPPORT_NAC
.mon_set_filter_neigh_peers = dp_set_filter_neigh_peers,
#endif
#ifdef WLAN_ATF_ENABLE
.mon_set_atf_stats_enable = dp_set_atf_stats_enable,
#endif
.mon_set_bsscolor = dp_mon_set_bsscolor,
.mon_pdev_get_filter_ucast_data = dp_pdev_get_filter_ucast_data,
.mon_pdev_get_filter_mcast_data = dp_pdev_get_filter_mcast_data,
.mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data,
#ifdef WDI_EVENT_ENABLE
.mon_set_pktlog_wifi3 = dp_set_pktlog_wifi3,
#endif
#if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG)
.mon_pktlogmod_exit = dp_pktlogmod_exit,
#endif
.mon_vdev_set_monitor_mode_buf_rings =
dp_vdev_set_monitor_mode_buf_rings_2_0,
.mon_vdev_set_monitor_mode_rings =
dp_vdev_set_monitor_mode_rings_2_0,
.mon_neighbour_peers_detach = dp_neighbour_peers_detach,
#ifdef FEATURE_NAC_RSSI
.mon_filter_neighbour_peer = dp_filter_neighbour_peer,
#endif
.mon_vdev_timer_init = NULL,
.mon_vdev_timer_start = NULL,
.mon_vdev_timer_stop = NULL,
.mon_vdev_timer_deinit = NULL,
.mon_reap_timer_init = NULL,
.mon_reap_timer_start = NULL,
.mon_reap_timer_stop = NULL,
.mon_reap_timer_deinit = NULL,
#ifdef QCA_MCOPY_SUPPORT
.mon_mcopy_check_deliver = NULL,
#endif
.mon_neighbour_peer_add_ast = NULL,
#ifdef QCA_ENHANCED_STATS_SUPPORT
.mon_filter_setup_enhanced_stats =
dp_mon_filter_setup_enhanced_stats_2_0,
.mon_filter_reset_enhanced_stats =
dp_mon_filter_reset_enhanced_stats_2_0,
#endif
#ifdef QCA_MCOPY_SUPPORT
.mon_filter_setup_mcopy_mode = dp_mon_filter_setup_mcopy_mode_2_0,
.mon_filter_reset_mcopy_mode = dp_mon_filter_reset_mcopy_mode_2_0,
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
.mon_filter_setup_smart_monitor = dp_mon_filter_setup_smart_monitor_2_0,
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
.mon_filter_setup_rx_enh_capture =
dp_mon_filter_setup_rx_enh_capture_2_0,
#endif
.mon_filter_setup_mon_mode = dp_mon_filter_setup_mon_mode_2_0,
.mon_filter_reset_mon_mode = dp_mon_filter_reset_mon_mode_2_0,
#ifdef WDI_EVENT_ENABLE
.mon_filter_setup_rx_pkt_log_full =
dp_mon_filter_setup_rx_pkt_log_full_2_0,
.mon_filter_reset_rx_pkt_log_full =
dp_mon_filter_reset_rx_pkt_log_full_2_0,
.mon_filter_setup_rx_pkt_log_lite =
dp_mon_filter_setup_rx_pkt_log_lite_2_0,
.mon_filter_reset_rx_pkt_log_lite =
dp_mon_filter_reset_rx_pkt_log_lite_2_0,
.mon_filter_setup_rx_pkt_log_cbf =
dp_mon_filter_setup_rx_pkt_log_cbf_2_0,
.mon_filter_reset_rx_pkt_log_cbf =
dp_mon_filter_reset_rx_pktlog_cbf_2_0,
#endif
.mon_filter_update = dp_mon_filter_update_2_0,
.mon_rings_alloc = dp_pdev_mon_rings_alloc,
.mon_rings_free = dp_pdev_mon_rings_free,
.mon_rings_init = dp_pdev_mon_rings_init,
.mon_rings_deinit = dp_pdev_mon_rings_deinit,
.rx_mon_desc_pool_init = NULL,
.rx_mon_desc_pool_deinit = NULL,
.rx_mon_desc_pool_alloc = NULL,
.rx_mon_desc_pool_free = NULL,
.rx_mon_buffers_alloc = NULL,
.rx_mon_buffers_free = NULL,
.tx_mon_desc_pool_init = NULL,
.tx_mon_desc_pool_deinit = NULL,
.tx_mon_desc_pool_alloc = NULL,
.tx_mon_desc_pool_free = NULL,
};
struct cdp_mon_ops dp_ops_mon_2_0 = {
.txrx_reset_monitor_mode = dp_reset_monitor_mode,
/* Added support for HK advance filter */
.txrx_set_advance_monitor_filter = dp_pdev_set_advance_monitor_filter,
.txrx_deliver_tx_mgmt = dp_deliver_tx_mgmt,
.config_full_mon_mode = NULL,
.soc_config_full_mon_mode = NULL,
};
struct dp_mon_ops *dp_mon_ops_get_2_0(void)
{
return &monitor_ops_2_0;
}
struct cdp_mon_ops *dp_mon_cdp_ops_get_2_0(void)
{
return &monitor_ops_2_0;
}

View File

@@ -17,4 +17,90 @@
#ifndef _DP_MON_2_0_H_
#define _DP_MON_2_0_H_
#if !defined(DISABLE_MON_CONFIG)
#include <qdf_lock.h>
#include <dp_types.h>
/**
* struct dp_mon_desc
*
* @buf_addr: virtual address
* @paddr: physical address
* @in_use: desc is in use
* @unmapped: used to mark desc an unmapped if the corresponding
* nbuf is already unmapped
* @cookie: unique desc identifier
*/
struct dp_mon_desc {
uint8_t *buf_addr;
qdf_dma_addr_t paddr;
uint8_t in_use:1,
unmapped:1;
uint32_t cookie;
};
/**
* struct dp_mon_desc_list_elem_t
* @next: Next pointer to form free list
* @mon_desc: DP mon descriptor
*/
union dp_mon_desc_list_elem_t {
union dp_mon_desc_list_elem_t *next;
struct dp_mon_desc mon_desc;
};
/**
* struct dp_mon_desc_pool - monitor desc pool
* @pool_size: number of descriptor in the pool
* @array: pointer to array of descriptor
* @freelist: pointer to free descriptor list
* @lock: Protection for the descriptor pool
* @owner: owner for nbuf
* @buf_size: Buffer size
* @buf_alignment: Buffer alignment
*/
struct dp_mon_desc_pool {
uint32_t pool_size;
union dp_mon_desc_list_elem_t *array;
union dp_mon_desc_list_elem_t *freelist;
qdf_spinlock_t lock;
uint8_t owner;
uint16_t buf_size;
uint8_t buf_alignment;
};
/**
* struct dp_mon_pdev_be - BE specific monitor pdev object
* @mon_pdev: monitor pdev structure
*/
struct dp_mon_pdev_be {
struct dp_mon_pdev mon_pdev;
};
/**
* struct dp_mon_soc_be - BE specific monitor soc
* @mon_soc: Monitor soc structure
* @tx_mon_buf_ring: TxMon replenish ring
* @tx_mon_dst_ring: TxMon Destination ring
* @tx_desc_mon: descriptor pool for tx mon src ring
* @rx_desc_mon: descriptor pool for rx mon src ring
* @rx_mon_ring_fill_level: rx mon ring refill level
* @tx_mon_ring_fill_level: tx mon ring refill level
*/
struct dp_mon_soc_be {
struct dp_mon_soc mon_soc;
/* Source ring for Tx monitor */
struct dp_srng tx_mon_buf_ring;
struct dp_srng tx_mon_dst_ring[MAX_NUM_LMAC_HW];
/* Sw descriptor pool for tx mon source ring */
struct dp_mon_desc_pool tx_desc_mon;
/* Sw descriptor pool for rx mon source ring */
struct dp_mon_desc_pool rx_desc_mon;
uint16_t rx_mon_ring_fill_level;
uint16_t tx_mon_ring_fill_level;
};
#endif
#endif /* _DP_MON_2_0_H_ */

View File

@@ -13,3 +13,93 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <hal_api.h>
#include <wlan_cfg.h>
#include "dp_types.h"
#include "dp_internal.h"
#include "dp_htt.h"
#include "dp_mon.h"
#include "dp_mon_filter.h"
#include <dp_mon_2.0.h>
#include <dp_rx_mon_2.0.h>
#include <dp_mon_filter_2.0.h>
#ifdef QCA_ENHANCED_STATS_SUPPORT
void dp_mon_filter_setup_enhanced_stats_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_enhanced_stats_2_0(struct dp_pdev *pdev)
{
}
#endif /* QCA_ENHANCED_STATS_SUPPORT */
#ifdef QCA_MCOPY_SUPPORT
void dp_mon_filter_setup_mcopy_mode_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_mcopy_mode_2_0(struct dp_pdev *pdev)
{
}
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
void dp_mon_filter_setup_smart_monitor_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_smart_monitor_2_0(struct dp_pdev *pdev)
{
}
#endif /* ATH_SUPPORT_NAC_RSSI || ATH_SUPPORT_NAC */
#ifdef WLAN_RX_PKT_CAPTURE_ENH
void dp_mon_filter_setup_rx_enh_capture_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_rx_enh_capture_2_0(struct dp_pdev *pdev)
{
}
#endif /* WLAN_RX_PKT_CAPTURE_ENH */
void dp_mon_filter_setup_mon_mode_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_mon_mode_2_0(struct dp_pdev *pdev)
{
}
#ifdef WDI_EVENT_ENABLE
void dp_mon_filter_setup_rx_pkt_log_full_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_rx_pkt_log_full_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_setup_rx_pkt_log_lite_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_rx_pkt_log_lite_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_setup_rx_pkt_log_cbf_2_0(struct dp_pdev *pdev)
{
}
void dp_mon_filter_reset_rx_pktlog_cbf_2_0(struct dp_pdev *pdev)
{
}
#endif /* WDI_EVENT_ENABLE */
QDF_STATUS dp_mon_filter_update_2_0(struct dp_pdev *pdev)
{
return status;
}

View File

@@ -17,4 +17,206 @@
#ifndef _DP_MON_FILTER_2_0_H_
#define _DP_MON_FILTER_2_0_H_
#include <dp_htt.h>
/**
* struct dp_mon_filter_be - Monitor TLV filter
* @rx_tlv_filter: Rx MON TLV filter
* @tx_tlv_filter: Tx MON TLV filter
* @tx_valid: enable/disable Tx Mon TLV filter
*/
struct dp_mon_filter_be {
struct dp_mon_filter rx_tlv_filter;
struct htt_tx_ring_tlv_filter tx_tlv_filter;
int tx_valid;
};
#ifdef QCA_ENHANCED_STATS_SUPPORT
/**
* dp_mon_filter_setup_enhanced_stats() - Setup the enhanced stats filter
* @pdev: Monitor DP pdev handle
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_enhanced_stats_2_0(struct dp_pdev *pdev);
/***
* dp_mon_filter_reset_enhanced_stats() - Reset the enhanced stats filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_enhanced_stats_2_0(struct dp_pdev *pdev);
#else
static inline void
dp_mon_filter_setup_enhanced_stats_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_enhanced_stats_2_0(struct dp_pdev *pdev)
{
}
#endif
#ifdef QCA_MCOPY_SUPPORT
/**
* dp_mon_filter_setup_mcopy_mode() - Setup the m_copy mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_mcopy_mode_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_mcopy_mode() - Reset the m_copy mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_mcopy_mode_2_0(struct dp_pdev *pdev);
#else
static inline void
dp_mon_filter_setup_mcopy_mode_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_mcopy_mode_2_0(struct dp_pdev *pdev)
{
}
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
/**
* dp_mon_filter_setup_smart_monitor() - Setup the smart monitor mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_smart_monitor_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_smart_monitor() - Reset the smart monitor mode filter
* @pdev: monitor pdev handle
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_smart_monitor_2_0(struct dp_pdev *pdev);
#else
static inline void
dp_mon_filter_setup_smart_monitor_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_smart_monitor_2_0(struct dp_pdev *pdev)
{
}
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
/**
* dp_mon_filter_setup_rx_enh_capture() - Setup the Rx capture mode filters
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_rx_enh_capture_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_rx_enh_capture() - Reset the Rx capture mode filters
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_rx_enh_capture_2_0(struct dp_pdev *pdev);
#else
static inline void
dp_mon_filter_setup_rx_enh_capture_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_rx_enh_capture_2_0(struct dp_pdev *pdev)
{
}
#endif
/**
* dp_mon_filter_setup_mon_mode() - Setup the Rx monitor mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_mon_mode_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_mon_mode() - Reset the Rx monitor mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_mon_mode_2_0(struct dp_pdev *pdev);
#ifdef WDI_EVENT_ENABLE
/**
* dp_mon_filter_setup_rx_pkt_log_full() - Setup the Rx pktlog full mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_rx_pkt_log_full_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_rx_pkt_log_full_2_0() - Reset pktlog full mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_rx_pkt_log_full_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_setup_rx_pkt_log_lite() - Setup the Rx pktlog lite mode filter
* in the radio object.
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_rx_pkt_log_lite_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_rx_pkt_log_lite() - Reset the Rx pktlog lite mode filter
* @pdev: Monitor pdev handle
*/
void dp_mon_filter_reset_rx_pkt_log_lite_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_setup_rx_pkt_log_cbf() - Setup the Rx pktlog cbf mode filter
* in the radio object.
* @pdev: DP pdev handle
*/
void dp_mon_filter_setup_rx_pkt_log_cbf_2_0(struct dp_pdev *pdev);
/**
* dp_mon_filter_reset_rx_pktlog_cbf() - Reset the Rx pktlog cbf mode filter
* @pdev: DP pdev handle
*/
void dp_mon_filter_reset_rx_pktlog_cbf_2_0(struct dp_pdev *pdev);
#else
static inline void
dp_mon_filter_setup_rx_pkt_log_full_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_rx_pkt_log_full_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_setup_rx_pkt_log_lite_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_rx_pkt_log_lite_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_setup_rx_pkt_log_cbf_2_0(struct dp_pdev *pdev)
{
}
static inline void
dp_mon_filter_reset_rx_pktlog_cbf_2_0(struct dp_pdev *pdev)
{
}
#endif
/**
* dp_mon_filter_update_2_0() - Update monitor filter configuration
* @pdev: physical device handle
*
* Return: non-zero for failure, zero for success
*/
QDF_STATUS dp_mon_filter_update_2_0(struct dp_pdev *pdev);
#endif /* _DP_MON_FILTER_2_0_H_ */

View File

@@ -13,3 +13,15 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
void
dp_rx_mon_buffers_free(struct dp_pdev *pdev)
{
}
QDF_STATUS
dp_rx_mon_buffers_alloc(struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}

View File

@@ -13,3 +13,15 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
void
dp_tx_mon_buffers_free(struct dp_pdev *pdev)
{
}
QDF_STATUS
dp_tx_mon_buffers_alloc(struct dp_pdev *pdev)
{
return QDF_STATUS_SUCCESS;
}

View File

@@ -2080,10 +2080,17 @@ QDF_STATUS dp_mon_pdev_attach(struct dp_pdev *pdev)
goto fail1;
}
if (mon_ops->mon_pdev_alloc) {
if (mon_ops->mon_rings_alloc(soc, pdev)) {
dp_mon_err("%pK: MONITOR pdev alloc failed", pdev);
goto fail1;
}
}
if (mon_ops->mon_rings_alloc) {
if (mon_ops->mon_rings_alloc(soc, pdev)) {
dp_mon_err("%pK: MONITOR rings setup failed", pdev);
goto fail1;
goto fail2;
}
}
@@ -2091,16 +2098,19 @@ QDF_STATUS dp_mon_pdev_attach(struct dp_pdev *pdev)
if (mon_ops->rx_pdev_mon_desc_pool_alloc) {
if (mon_ops->rx_pdev_mon_desc_pool_alloc(pdev)) {
dp_mon_err("%pK: dp_rx_pdev_mon_attach failed", pdev);
goto fail2;
goto fail3;
}
}
pdev->monitor_pdev = mon_pdev;
return QDF_STATUS_SUCCESS;
fail2:
fail3:
if (mon_ops->mon_rings_free)
mon_ops->mon_rings_free(pdev);
fail2:
if (mon_ops->mon_pdev_free)
mon_ops->mon_pdev_free(pdev);
fail1:
pdev->monitor_pdev = NULL;
qdf_mem_free(mon_pdev);
@@ -2128,6 +2138,9 @@ QDF_STATUS dp_mon_pdev_detach(struct dp_pdev *pdev)
mon_ops->rx_pdev_mon_desc_pool_free(pdev);
if (mon_ops->mon_rings_free)
mon_ops->mon_rings_free(pdev);
if (mon_ops->mon_pdev_free)
mon_ops->mon_pdev_free(pdev);
pdev->monitor_pdev = NULL;
qdf_mem_free(mon_pdev);
return QDF_STATUS_SUCCESS;

View File

@@ -341,6 +341,12 @@ dp_vdev_set_monitor_mode_rings(struct dp_pdev *pdev,
struct dp_mon_ops {
QDF_STATUS (*mon_soc_cfg_init)(struct dp_soc *soc);
QDF_STATUS (*mon_soc_attach)(struct dp_soc *soc);
QDF_STATUS (*mon_soc_detach)(struct dp_soc *soc);
QDF_STATUS (*mon_soc_init)(struct dp_soc *soc);
QDF_STATUS (*mon_soc_deinit)(struct dp_soc *soc);
QDF_STATUS (*mon_pdev_alloc)(struct dp_pdev *pdev);
QDF_STATUS (*mon_pdev_free)(struct dp_pdev *pdev);
QDF_STATUS (*mon_pdev_attach)(struct dp_pdev *pdev);
QDF_STATUS (*mon_pdev_detach)(struct dp_pdev *pdev);
QDF_STATUS (*mon_pdev_init)(struct dp_pdev *pdev);
@@ -370,6 +376,10 @@ struct dp_mon_ops {
struct dp_intr *int_ctx,
uint32_t mac_id,
uint32_t quota);
uint32_t (*mon_tx_process)(struct dp_soc *soc,
struct dp_intr *int_ctx,
uint32_t mac_id,
uint32_t quota);
#endif
void (*mon_peer_tx_init)(struct dp_pdev *pdev, struct dp_peer *peer);
void (*mon_peer_tx_cleanup)(struct dp_vdev *vdev,
@@ -491,14 +501,16 @@ struct dp_mon_ops {
QDF_STATUS (*mon_rings_init)(struct dp_soc* soc, struct dp_pdev *pdev);
void (*mon_rings_deinit)(struct dp_pdev *pdev);
QDF_STATUS (*rx_pdev_mon_buffers_alloc)(struct dp_pdev *pdev);
void (*rx_pdev_mon_buffers_free)(struct dp_pdev *pdev);
void (*rx_pdev_mon_desc_pool_init)(struct dp_pdev *pdev);
void (*rx_pdev_mon_desc_pool_deinit)(struct dp_pdev *pdev);
QDF_STATUS (*rx_pdev_mon_desc_pool_alloc)(struct dp_pdev *pdev);
void (*rx_pdev_mon_desc_pool_free)(struct dp_pdev *pdev);
QDF_STATUS (*mon_buffers_alloc)(struct dp_pdev *pdev);
QDF_STATUS (*mon_buffers_free)(struct dp_pdev *pdev);
QDF_STATUS (*rx_mon_buffers_alloc)(struct dp_pdev *pdev);
void (*rx_mon_buffers_free)(struct dp_pdev *pdev);
void (*rx_mon_desc_pool_init)(struct dp_pdev *pdev);
void (*rx_mon_desc_pool_deinit)(struct dp_pdev *pdev);
QDF_STATUS (*rx_mon_desc_pool_alloc)(struct dp_pdev *pdev);
void (*rx_mon_desc_pool_free)(struct dp_pdev *pdev);
void (*tx_mon_desc_pool_init)(struct dp_pdev *pdev);
void (*tx_mon_desc_pool_deinit)(struct dp_pdev *pdev);
QDF_STATUS (*tx_mon_desc_pool_alloc)(struct dp_pdev *pdev);
void (*tx_mon_desc_pool_free)(struct dp_pdev *pdev);
};
struct dp_mon_soc {

View File

@@ -90,12 +90,16 @@ enum dp_mon_filter_mode {
* @DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF: RXDMA srng type
* @DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS: RxDMA monitor status srng
* @DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF: RxDMA destination srng
* @DP_MON_FILTER_SRNG_TYPE_RXMON_DEST: RxMON destination srng
* @DP_MON_FILTER_SRNG_TYPE_TXMON_DEST: TxMON destination srng
* @DP_MON_FILTER_SRNG_TYPE_MAX: Srng max type
*/
enum dp_mon_filter_srng_type {
DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF,
DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS,
DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF,
DP_MON_FILTER_SRNG_TYPE_RXMON_DEST,
DP_MON_FILTER_SRNG_TYPE_TXMON_DEST,
DP_MON_FILTER_SRNG_TYPE_MAX
};