qcacmn: Enable hybrid mode for QCN9224
Enable hybrid mode specific handlers Change-Id: I764c56c217b951424d699d6861ef8771496dd592 CRs-Fixed: 3339154
此提交包含在:
@@ -1271,6 +1271,7 @@ struct dp_mon_ops monitor_ops_1_0 = {
|
||||
.mon_filter_reset_tx_mon_mode = NULL,
|
||||
.rx_mon_filter_update = dp_mon_filter_update_1_0,
|
||||
.tx_mon_filter_update = NULL,
|
||||
.set_mon_mode_buf_rings_tx = 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,
|
||||
|
@@ -1497,6 +1497,7 @@ struct dp_mon_ops monitor_ops_2_0 = {
|
||||
.mon_filter_reset_tx_mon_mode = dp_mon_filter_reset_tx_mon_mode_2_0,
|
||||
.tx_mon_filter_update = dp_tx_mon_filter_update_2_0,
|
||||
.rx_mon_filter_update = dp_rx_mon_filter_update_2_0,
|
||||
.set_mon_mode_buf_rings_tx = dp_vdev_set_monitor_mode_buf_rings_tx_2_0,
|
||||
.tx_mon_filter_alloc = dp_mon_filter_alloc_2_0,
|
||||
.tx_mon_filter_dealloc = dp_mon_filter_dealloc_2_0,
|
||||
.mon_rings_alloc = dp_pdev_mon_rings_alloc_2_0,
|
||||
|
@@ -1601,6 +1601,7 @@ static void dp_rx_mon_filter_show_filter(struct dp_mon_filter_be *filter)
|
||||
struct htt_rx_ring_tlv_filter *rx_tlv_filter =
|
||||
&filter->rx_tlv_filter.tlv_filter;
|
||||
|
||||
DP_MON_FILTER_PRINT("Enable: %d", rx_tlv_filter->enable);
|
||||
DP_MON_FILTER_PRINT("mpdu_start: %d", rx_tlv_filter->mpdu_start);
|
||||
DP_MON_FILTER_PRINT("msdu_start: %d", rx_tlv_filter->msdu_start);
|
||||
DP_MON_FILTER_PRINT("packet: %d", rx_tlv_filter->packet);
|
||||
@@ -2081,6 +2082,8 @@ dp_mon_filter_set_reset_rx_pkt_log_cbf_dest_2_0(struct dp_pdev_be *pdev_be,
|
||||
struct dp_mon_pdev *mon_pdev = pdev_be->pdev.monitor_pdev;
|
||||
struct dp_mon_pdev_be *mon_pdev_be =
|
||||
dp_get_be_mon_pdev_from_dp_mon_pdev(mon_pdev);
|
||||
struct htt_rx_ring_tlv_filter *rx_tlv_filter =
|
||||
&filter->rx_tlv_filter.tlv_filter;
|
||||
|
||||
srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ?
|
||||
DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF :
|
||||
@@ -2091,6 +2094,7 @@ dp_mon_filter_set_reset_rx_pkt_log_cbf_dest_2_0(struct dp_pdev_be *pdev_be,
|
||||
dp_mon_filter_set_cbf_cmn(&pdev_be->pdev,
|
||||
&filter->rx_tlv_filter);
|
||||
|
||||
rx_tlv_filter->attention = 0;
|
||||
dp_mon_filter_show_rx_filter_be(mode, filter);
|
||||
mon_pdev_be->filter_be[mode][srng_type] = *filter;
|
||||
} else /* reset the filter */
|
||||
@@ -2107,7 +2111,6 @@ dp_mon_filter_set_reset_rx_pkt_log_cbf_dest_2_0(struct dp_pdev_be *pdev,
|
||||
void dp_mon_filter_setup_rx_pkt_log_cbf_2_0(struct dp_pdev *pdev)
|
||||
{
|
||||
struct dp_mon_filter_be filter = {0};
|
||||
struct dp_soc *soc;
|
||||
enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_CBF_MODE;
|
||||
enum dp_mon_filter_srng_type srng_type =
|
||||
DP_MON_FILTER_SRNG_TYPE_RXMON_DEST;
|
||||
@@ -2120,12 +2123,6 @@ void dp_mon_filter_setup_rx_pkt_log_cbf_2_0(struct dp_pdev *pdev)
|
||||
return;
|
||||
}
|
||||
|
||||
soc = pdev->soc;
|
||||
if (!soc) {
|
||||
dp_mon_filter_err("Soc Context is null");
|
||||
return;
|
||||
}
|
||||
|
||||
mon_pdev = pdev->monitor_pdev;
|
||||
if (!mon_pdev) {
|
||||
dp_mon_filter_err("Monitor pdev context is null");
|
||||
@@ -2155,7 +2152,6 @@ 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)
|
||||
{
|
||||
struct dp_mon_filter_be filter = {0};
|
||||
struct dp_soc *soc;
|
||||
enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_CBF_MODE;
|
||||
enum dp_mon_filter_srng_type srng_type =
|
||||
DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF;
|
||||
@@ -2169,12 +2165,6 @@ void dp_mon_filter_reset_rx_pktlog_cbf_2_0(struct dp_pdev *pdev)
|
||||
return;
|
||||
}
|
||||
|
||||
soc = pdev->soc;
|
||||
if (!soc) {
|
||||
dp_mon_filter_err("Soc Context is null");
|
||||
return;
|
||||
}
|
||||
|
||||
mon_pdev = pdev->monitor_pdev;
|
||||
if (!mon_pdev) {
|
||||
dp_mon_filter_err("Monitor pdev context is null");
|
||||
@@ -2235,6 +2225,29 @@ void dp_mon_filter_setup_pktlog_hybrid_2_0(struct dp_pdev *pdev)
|
||||
tlv_filter->utlvs.received_response_info_p2 = 1;
|
||||
tlv_filter->utlvs.response_end_status = 1;
|
||||
|
||||
tlv_filter->mgmt_filter = 0x1;
|
||||
tlv_filter->data_filter = 0x1;
|
||||
tlv_filter->ctrl_filter = 0x1;
|
||||
|
||||
tlv_filter->mgmt_mpdu_end = 1;
|
||||
tlv_filter->mgmt_msdu_end = 1;
|
||||
tlv_filter->mgmt_msdu_start = 1;
|
||||
tlv_filter->mgmt_mpdu_start = 1;
|
||||
tlv_filter->ctrl_mpdu_end = 1;
|
||||
tlv_filter->ctrl_msdu_end = 1;
|
||||
tlv_filter->ctrl_msdu_start = 1;
|
||||
tlv_filter->ctrl_mpdu_start = 1;
|
||||
tlv_filter->data_mpdu_end = 1;
|
||||
tlv_filter->data_msdu_end = 1;
|
||||
tlv_filter->data_msdu_start = 1;
|
||||
tlv_filter->data_mpdu_start = 1;
|
||||
tlv_filter->mgmt_mpdu_log = 1;
|
||||
tlv_filter->ctrl_mpdu_log = 1;
|
||||
tlv_filter->data_mpdu_log = 1;
|
||||
|
||||
tlv_filter->mgmt_dma_length = mon_pdev_be->tx_mon_filter_length;
|
||||
tlv_filter->ctrl_dma_length = mon_pdev_be->tx_mon_filter_length;
|
||||
tlv_filter->data_dma_length = mon_pdev_be->tx_mon_filter_length;
|
||||
dp_mon_filter_show_tx_filter_be(mode, &filter);
|
||||
mon_pdev_be->filter_be[mode][srng_type] = filter;
|
||||
}
|
||||
|
@@ -519,6 +519,9 @@ dp_rx_mon_process_ppdu_info(struct dp_pdev *pdev,
|
||||
pdev->soc,
|
||||
ppdu_info);
|
||||
|
||||
dp_rx_mon_process_dest_pktlog(pdev->soc,
|
||||
pdev->pdev_id,
|
||||
mpdu);
|
||||
/* Deliver MPDU to osif layer */
|
||||
status = dp_rx_mon_deliver_mpdu(mon_pdev,
|
||||
mpdu,
|
||||
|
@@ -258,6 +258,10 @@ dp_tx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
|
||||
continue;
|
||||
}
|
||||
|
||||
dp_tx_process_pktlog_be(soc, pdev,
|
||||
status_frag,
|
||||
end_offset);
|
||||
|
||||
dp_tx_mon_process_status_tlv(soc, pdev,
|
||||
&hal_mon_tx_desc,
|
||||
status_frag,
|
||||
|
@@ -115,6 +115,21 @@ dp_tx_mon_status_free_packet_buf(struct dp_pdev *pdev,
|
||||
uint32_t end_offset,
|
||||
struct dp_tx_mon_desc_list *mon_desc_list_ref);
|
||||
|
||||
/**
|
||||
* dp_tx_process_pktlog_be() - process pktlog
|
||||
* @soc: dp soc handle
|
||||
* @pdev: dp pdev handle
|
||||
* @status_frag: frag pointer which needs to be added to nbuf
|
||||
* @end_offset: Offset in frag to be added to nbuf_frags
|
||||
*
|
||||
* Return:
|
||||
* * 0 - OK to runtime suspend the device
|
||||
* * -EINVAL - invalid argument
|
||||
* * -ENOMEM - out of memory
|
||||
*/
|
||||
QDF_STATUS
|
||||
dp_tx_process_pktlog_be(struct dp_soc *soc, struct dp_pdev *pdev,
|
||||
void *status_frag, uint32_t end_offset);
|
||||
/*
|
||||
* dp_tx_mon_process_status_tlv() - API to processed TLV
|
||||
* invoked from interrupt handler
|
||||
|
@@ -1399,6 +1399,40 @@ dp_tx_mon_update_ppdu_info_status(struct dp_pdev *pdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
dp_tx_process_pktlog_be(struct dp_soc *soc, struct dp_pdev *pdev,
|
||||
qdf_frag_t status_frag, uint32_t end_offset)
|
||||
{
|
||||
struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;
|
||||
qdf_nbuf_t nbuf = NULL;
|
||||
enum WDI_EVENT pktlog_mode = WDI_NO_VAL;
|
||||
int frag_bytes;
|
||||
|
||||
if (!mon_pdev->pktlog_hybrid_mode)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
nbuf = qdf_nbuf_alloc(soc->osdev, MAX_DUMMY_FRM_BODY, 0, 4, FALSE);
|
||||
if (!nbuf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
qdf_nbuf_add_rx_frag(status_frag, nbuf, 0,
|
||||
(end_offset + 1),
|
||||
0, true);
|
||||
|
||||
if (mon_pdev->pktlog_hybrid_mode)
|
||||
pktlog_mode = WDI_EVENT_HYBRID_TX;
|
||||
|
||||
frag_bytes = qdf_nbuf_get_frag_len(nbuf, 0);
|
||||
if (pktlog_mode != WDI_NO_VAL) {
|
||||
dp_wdi_event_handler(pktlog_mode, soc,
|
||||
nbuf, HTT_INVALID_PEER,
|
||||
WDI_NO_VAL, pdev->pdev_id);
|
||||
}
|
||||
qdf_nbuf_free(nbuf);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_tx_mon_process_tlv_2_0() - API to parse PPDU worth information
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
|
@@ -1101,6 +1101,10 @@ dp_set_hybrid_pktlog_enable(struct dp_pdev *pdev,
|
||||
struct dp_mon_pdev *mon_pdev,
|
||||
struct dp_soc *soc)
|
||||
{
|
||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
||||
struct dp_mon_ops *mon_ops = NULL;
|
||||
uint16_t num_buffers;
|
||||
|
||||
if (mon_pdev->mvdev) {
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
@@ -1109,10 +1113,23 @@ dp_set_hybrid_pktlog_enable(struct dp_pdev *pdev,
|
||||
return false;
|
||||
}
|
||||
|
||||
mon_ops = dp_mon_ops_get(pdev->soc);
|
||||
if (!mon_ops) {
|
||||
dp_mon_filter_err("Mon ops uninitialized");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!mon_pdev->pktlog_hybrid_mode) {
|
||||
mon_pdev->pktlog_hybrid_mode = true;
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
num_buffers =
|
||||
wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(soc_cfg_ctx);
|
||||
|
||||
if (mon_ops && mon_ops->set_mon_mode_buf_rings_tx)
|
||||
mon_ops->set_mon_mode_buf_rings_tx(pdev, num_buffers);
|
||||
|
||||
dp_mon_filter_setup_pktlog_hybrid(pdev);
|
||||
if (dp_mon_filter_update(pdev) !=
|
||||
if (dp_tx_mon_filter_update(pdev) !=
|
||||
QDF_STATUS_SUCCESS) {
|
||||
dp_cdp_err("Set hybrid filters failed");
|
||||
dp_mon_filter_reset_pktlog_hybrid(pdev);
|
||||
@@ -1174,13 +1191,11 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event,
|
||||
if (enable) {
|
||||
switch (event) {
|
||||
case WDI_EVENT_RX_DESC:
|
||||
if (mon_pdev->mvdev) {
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
mon_pdev->rx_pktlog_mode = DP_RX_PKTLOG_FULL;
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
if (mon_pdev->mvdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mon_pdev->rx_pktlog_mode == DP_RX_PKTLOG_FULL)
|
||||
break;
|
||||
@@ -1201,13 +1216,11 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event,
|
||||
break;
|
||||
|
||||
case WDI_EVENT_LITE_RX:
|
||||
if (mon_pdev->mvdev) {
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
mon_pdev->rx_pktlog_mode = DP_RX_PKTLOG_LITE;
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
if (mon_pdev->mvdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mon_pdev->rx_pktlog_mode == DP_RX_PKTLOG_LITE)
|
||||
break;
|
||||
@@ -1243,14 +1256,11 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event,
|
||||
break;
|
||||
|
||||
case WDI_EVENT_RX_CBF:
|
||||
if (mon_pdev->mvdev) {
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
dp_mon_info("Mon mode, CBF setting filters");
|
||||
mon_pdev->rx_pktlog_cbf = true;
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
if (mon_pdev->mvdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mon_pdev->rx_pktlog_cbf)
|
||||
break;
|
||||
@@ -1292,14 +1302,11 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event,
|
||||
switch (event) {
|
||||
case WDI_EVENT_RX_DESC:
|
||||
case WDI_EVENT_LITE_RX:
|
||||
if (mon_pdev->mvdev) {
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
mon_pdev->rx_pktlog_mode =
|
||||
DP_RX_PKTLOG_DISABLED;
|
||||
/* Nothing needs to be done if monitor mode is
|
||||
* enabled
|
||||
*/
|
||||
if (mon_pdev->mvdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mon_pdev->rx_pktlog_mode == DP_RX_PKTLOG_DISABLED)
|
||||
break;
|
||||
|
@@ -763,6 +763,8 @@ struct dp_mon_ops {
|
||||
#endif
|
||||
QDF_STATUS (*rx_mon_filter_update)(struct dp_pdev *pdev);
|
||||
QDF_STATUS (*tx_mon_filter_update)(struct dp_pdev *pdev);
|
||||
QDF_STATUS (*set_mon_mode_buf_rings_tx)(struct dp_pdev *pdev,
|
||||
uint16_t num_buf);
|
||||
|
||||
QDF_STATUS (*tx_mon_filter_alloc)(struct dp_pdev *pdev);
|
||||
void (*tx_mon_filter_dealloc)(struct dp_pdev *pdev);
|
||||
|
新增問題並參考
封鎖使用者