qcacmn: Enhancement in Minidump feature
Handle minidump logging using dynamic configurablity options. Data structures to be logged in minidump can be configured using internal INI file. Change-Id: I99f12b3f98c4a9c0e15c3e5d611019e6b8d0909a
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#endif
|
||||
#include <cdp_txrx_handle.h>
|
||||
#include <wlan_cfg.h>
|
||||
#include <wlan_utility.h>
|
||||
#include "cdp_txrx_cmn_struct.h"
|
||||
#include "cdp_txrx_stats_struct.h"
|
||||
#include "cdp_txrx_cmn_reg.h"
|
||||
@@ -2167,11 +2168,11 @@ static int dp_hw_link_desc_pool_setup(struct dp_soc *soc)
|
||||
dp_err("Multi page alloc fail for hw link desc pool");
|
||||
goto fail_page_alloc;
|
||||
}
|
||||
qdf_minidump_log(
|
||||
(void *)(pages->dma_pages->page_v_addr_start),
|
||||
pages->num_pages *
|
||||
sizeof(struct qdf_mem_dma_page_t),
|
||||
"hw_link_desc_bank");
|
||||
wlan_minidump_log(pages->dma_pages->page_v_addr_start,
|
||||
pages->num_pages * pages->page_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_WBM_IDLE_LINK,
|
||||
"hw_link_desc_bank");
|
||||
}
|
||||
|
||||
/* Allocate and setup link descriptor idle list for HW internal use */
|
||||
@@ -2188,9 +2189,11 @@ static int dp_hw_link_desc_pool_setup(struct dp_soc *soc)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
qdf_minidump_log(soc->wbm_idle_link_ring.base_vaddr_unaligned,
|
||||
soc->wbm_idle_link_ring.alloc_size,
|
||||
"wbm_idle_link_ring");
|
||||
wlan_minidump_log(soc->wbm_idle_link_ring.base_vaddr_unaligned,
|
||||
soc->wbm_idle_link_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_WBM_IDLE_LINK,
|
||||
"wbm_idle_link_ring");
|
||||
|
||||
hal_srng_access_start_unlocked(soc->hal_soc,
|
||||
soc->wbm_idle_link_ring.hal_srng);
|
||||
@@ -2312,6 +2315,8 @@ static int dp_hw_link_desc_pool_setup(struct dp_soc *soc)
|
||||
|
||||
fail:
|
||||
if (soc->wbm_idle_link_ring.hal_srng) {
|
||||
wlan_minidump_remove(
|
||||
soc->wbm_idle_link_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->wbm_idle_link_ring,
|
||||
WBM_IDLE_LINK, 0);
|
||||
}
|
||||
@@ -2346,7 +2351,7 @@ static void dp_hw_link_desc_pool_cleanup(struct dp_soc *soc)
|
||||
struct qdf_mem_multi_page_t *pages;
|
||||
|
||||
if (soc->wbm_idle_link_ring.hal_srng) {
|
||||
qdf_minidump_remove(
|
||||
wlan_minidump_remove(
|
||||
soc->wbm_idle_link_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->wbm_idle_link_ring,
|
||||
WBM_IDLE_LINK, 0);
|
||||
@@ -2363,7 +2368,7 @@ static void dp_hw_link_desc_pool_cleanup(struct dp_soc *soc)
|
||||
}
|
||||
|
||||
pages = &soc->link_desc_pages;
|
||||
qdf_minidump_remove(
|
||||
wlan_minidump_remove(
|
||||
(void *)pages->dma_pages->page_v_addr_start);
|
||||
qdf_mem_multi_pages_free(soc->osdev,
|
||||
pages, 0, false);
|
||||
@@ -2837,6 +2842,11 @@ QDF_STATUS dp_setup_tx_ring_pair_by_index(struct dp_soc *soc, uint8_t index)
|
||||
dp_err("dp_srng_setup failed for tcl_data_ring");
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->tcl_data_ring[index].base_vaddr_unaligned,
|
||||
soc->tcl_data_ring[index].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_TCL_DATA,
|
||||
"tcl_data_ring");
|
||||
|
||||
tx_comp_ring_size = wlan_cfg_tx_comp_ring_size(soc_cfg_ctx);
|
||||
/* Disable cached desc if NSS offload is enabled */
|
||||
@@ -2850,6 +2860,11 @@ QDF_STATUS dp_setup_tx_ring_pair_by_index(struct dp_soc *soc, uint8_t index)
|
||||
dp_err("dp_srng_setup failed for tx_comp_ring");
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->tx_comp_ring[index].base_vaddr_unaligned,
|
||||
soc->tx_comp_ring[index].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_TX_COMP,
|
||||
"tcl_comp_ring");
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
@@ -2896,9 +2911,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
qdf_minidump_log(soc->wbm_desc_rel_ring.base_vaddr_unaligned,
|
||||
soc->wbm_desc_rel_ring.alloc_size,
|
||||
"wbm_desc_rel_ring");
|
||||
wlan_minidump_log(soc->wbm_desc_rel_ring.base_vaddr_unaligned,
|
||||
soc->wbm_desc_rel_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_WBM_DESC_REL,
|
||||
"wbm_desc_rel_ring");
|
||||
|
||||
soc->num_tcl_data_rings = 0;
|
||||
/* Tx data rings */
|
||||
@@ -2939,6 +2956,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL("dp_srng_setup failed for tcl_cmd_credit_ring."));
|
||||
goto fail2;
|
||||
}
|
||||
wlan_minidump_log(soc->tcl_cmd_credit_ring.base_vaddr_unaligned,
|
||||
soc->tcl_cmd_credit_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_TCL_CMD,
|
||||
"tcl_cmd_credit_ring");
|
||||
|
||||
entries = wlan_cfg_get_dp_soc_tcl_status_ring_size(soc_cfg_ctx);
|
||||
if (dp_srng_setup(soc, &soc->tcl_status_ring, TCL_STATUS, 0, 0,
|
||||
@@ -2947,6 +2969,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL("dp_srng_setup failed for tcl_status_ring"));
|
||||
goto fail2;
|
||||
}
|
||||
wlan_minidump_log(soc->tcl_status_ring.base_vaddr_unaligned,
|
||||
soc->tcl_status_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_TCL_STATUS,
|
||||
"tcl_status_ring");
|
||||
|
||||
reo_dst_ring_size = wlan_cfg_get_reo_dst_ring_size(soc->wlan_cfg_ctx);
|
||||
|
||||
@@ -2975,6 +3002,12 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL(RNG_ERR "reo_dest_ring [%d]"), i);
|
||||
goto fail2;
|
||||
}
|
||||
wlan_minidump_log(soc->reo_dest_ring[i].base_vaddr_unaligned,
|
||||
soc->reo_dest_ring[i].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO_DEST,
|
||||
"reo_dest_ring");
|
||||
|
||||
}
|
||||
} else {
|
||||
/* This will be incremented during per pdev ring setup */
|
||||
@@ -2993,6 +3026,12 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL(RNG_ERR "rxdma_err_dst_ring"));
|
||||
goto fail2;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_err_dst_ring[i].base_vaddr_unaligned,
|
||||
soc->rxdma_err_dst_ring[i].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_ERR_DST,
|
||||
"rxdma_err_dst");
|
||||
|
||||
}
|
||||
}
|
||||
/* TBD: call dp_rx_init to setup Rx SW descriptors */
|
||||
@@ -3005,7 +3044,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL("dp_srng_setup failed for reo_reinject_ring"));
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
wlan_minidump_log(soc->reo_reinject_ring.base_vaddr_unaligned,
|
||||
soc->reo_reinject_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO_REINJECT,
|
||||
"reo_reinject_ring");
|
||||
|
||||
/* Rx release ring */
|
||||
if (dp_srng_setup(soc, &soc->rx_rel_ring, WBM2SW_RELEASE, 3, 0,
|
||||
@@ -3016,6 +3059,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
wlan_minidump_log(soc->rx_rel_ring.base_vaddr_unaligned,
|
||||
soc->rx_rel_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RX_REL,
|
||||
"reo_release_ring");
|
||||
|
||||
/* Rx exception ring */
|
||||
entries = wlan_cfg_get_dp_soc_reo_exception_ring_size(soc_cfg_ctx);
|
||||
@@ -3026,6 +3074,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
wlan_minidump_log(soc->reo_exception_ring.base_vaddr_unaligned,
|
||||
soc->reo_exception_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO_EXCEPTION,
|
||||
"reo_exception_ring");
|
||||
|
||||
/* REO command and status rings */
|
||||
if (dp_srng_setup(soc, &soc->reo_cmd_ring, REO_CMD, 0, 0,
|
||||
@@ -3035,6 +3088,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL("dp_srng_setup failed for reo_cmd_ring"));
|
||||
goto fail2;
|
||||
}
|
||||
wlan_minidump_log(soc->reo_cmd_ring.base_vaddr_unaligned,
|
||||
soc->reo_cmd_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO_CMD,
|
||||
"reo_cmd_ring");
|
||||
|
||||
hal_reo_init_cmd_ring(soc->hal_soc, soc->reo_cmd_ring.hal_srng);
|
||||
TAILQ_INIT(&soc->rx.reo_cmd_list);
|
||||
@@ -3047,6 +3105,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
||||
FL("dp_srng_setup failed for reo_status_ring"));
|
||||
goto fail2;
|
||||
}
|
||||
wlan_minidump_log(soc->reo_status_ring.base_vaddr_unaligned,
|
||||
soc->reo_status_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO_STATUS,
|
||||
"reo_status_ring");
|
||||
|
||||
/*
|
||||
* Skip registering hw ring interrupts for WMAC2 on IPQ6018
|
||||
@@ -3381,6 +3444,11 @@ QDF_STATUS dp_mon_rings_setup(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
FL(RNG_ERR "rxdma_mon_buf_ring "));
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_mon_buf_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_mon_buf_ring[lmac_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_BUF,
|
||||
"rxdma_mon_buf_ring");
|
||||
|
||||
entries =
|
||||
wlan_cfg_get_dma_mon_dest_ring_size(pdev_cfg_ctx);
|
||||
@@ -3393,6 +3461,11 @@ QDF_STATUS dp_mon_rings_setup(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
FL(RNG_ERR "rxdma_mon_dst_ring"));
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_mon_dst_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_mon_dst_ring[lmac_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_DST,
|
||||
"rxdma_mon_dst");
|
||||
|
||||
entries =
|
||||
wlan_cfg_get_dma_mon_stat_ring_size(pdev_cfg_ctx);
|
||||
@@ -3405,6 +3478,11 @@ QDF_STATUS dp_mon_rings_setup(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
FL(RNG_ERR "rxdma_mon_status_ring"));
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_mon_status_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_mon_status_ring[lmac_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_STATUS,
|
||||
"rxdma_mon_status");
|
||||
|
||||
entries =
|
||||
wlan_cfg_get_dma_mon_desc_ring_size(pdev_cfg_ctx);
|
||||
@@ -3417,6 +3495,12 @@ QDF_STATUS dp_mon_rings_setup(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
FL(RNG_ERR "rxdma_mon_desc_ring"));
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_mon_desc_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_mon_desc_ring[lmac_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_DESC,
|
||||
"rxdma_mon_desc");
|
||||
|
||||
} else {
|
||||
entries =
|
||||
wlan_cfg_get_dma_mon_stat_ring_size(pdev_cfg_ctx);
|
||||
@@ -3429,6 +3513,11 @@ QDF_STATUS dp_mon_rings_setup(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
FL(RNG_ERR "rxdma_mon_status_ring"));
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_mon_status_ring[lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_mon_status_ring[lmac_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_STATUS,
|
||||
"rxdma_mon_status_ring");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3515,7 +3604,10 @@ static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
||||
pdev = soc->pdev_list[pdev_id];
|
||||
} else {
|
||||
pdev = qdf_mem_malloc(sizeof(*pdev));
|
||||
qdf_minidump_log(pdev, sizeof(*pdev), "dp_pdev");
|
||||
wlan_minidump_log(pdev, sizeof(*pdev),
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_PDEV,
|
||||
"dp_pdev");
|
||||
}
|
||||
|
||||
if (!pdev) {
|
||||
@@ -3607,6 +3699,10 @@ static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
||||
ret = QDF_STATUS_E_FAILURE;
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->tcl_data_ring[pdev_id].base_vaddr_unaligned,
|
||||
soc->tcl_data_ring[pdev_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_TCL_DATA, "tcl_data");
|
||||
|
||||
ring_size =
|
||||
wlan_cfg_tx_comp_ring_size(soc_cfg_ctx);
|
||||
@@ -3619,6 +3715,12 @@ static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
||||
ret = QDF_STATUS_E_FAILURE;
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->tcl_data_ring[pdev_id].base_vaddr_unaligned,
|
||||
soc->tcl_data_ring[pdev_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_TX_COMP,
|
||||
"tcl_comp_ring");
|
||||
|
||||
soc->num_tcl_data_rings++;
|
||||
}
|
||||
|
||||
@@ -3640,6 +3742,12 @@ static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
||||
ret = QDF_STATUS_E_FAILURE;
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->reo_dest_ring[pdev_id].base_vaddr_unaligned,
|
||||
soc->reo_dest_ring[pdev_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO_DEST,
|
||||
"reo_dest_ring");
|
||||
|
||||
soc->num_reo_dest_rings++;
|
||||
}
|
||||
|
||||
@@ -3679,6 +3787,12 @@ static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
||||
ret = QDF_STATUS_E_FAILURE;
|
||||
goto fail1;
|
||||
}
|
||||
wlan_minidump_log(soc->rxdma_err_dst_ring[pdev->lmac_id].base_vaddr_unaligned,
|
||||
soc->rxdma_err_dst_ring[pdev->lmac_id].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_RXDMA_ERR_DST,
|
||||
"rxdma_err_dst_ring");
|
||||
|
||||
}
|
||||
|
||||
if (dp_setup_ipa_rx_refill_buf_ring(soc, pdev)) {
|
||||
@@ -3886,30 +4000,37 @@ void dp_mon_ring_cleanup(struct dp_soc *soc, struct dp_pdev *pdev,
|
||||
int mac_id)
|
||||
{
|
||||
if (soc->wlan_cfg_ctx->rxdma1_enable) {
|
||||
wlan_minidump_remove(soc->rxdma_mon_buf_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_mon_buf_ring[mac_id],
|
||||
RXDMA_MONITOR_BUF, 0);
|
||||
|
||||
wlan_minidump_remove(soc->rxdma_mon_dst_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_mon_dst_ring[mac_id],
|
||||
RXDMA_MONITOR_DST, 0);
|
||||
|
||||
wlan_minidump_remove(soc->rxdma_mon_status_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_mon_status_ring[mac_id],
|
||||
RXDMA_MONITOR_STATUS, 0);
|
||||
|
||||
wlan_minidump_remove(soc->rxdma_mon_desc_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_mon_desc_ring[mac_id],
|
||||
RXDMA_MONITOR_DESC, 0);
|
||||
|
||||
wlan_minidump_remove(soc->rxdma_err_dst_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_err_dst_ring[mac_id],
|
||||
RXDMA_DST, 0);
|
||||
} else {
|
||||
wlan_minidump_remove(soc->rxdma_mon_status_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_mon_status_ring[mac_id],
|
||||
RXDMA_MONITOR_STATUS, 0);
|
||||
|
||||
wlan_minidump_remove(soc->rxdma_err_dst_ring[mac_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc,
|
||||
&soc->rxdma_err_dst_ring[mac_id],
|
||||
RXDMA_DST, 0);
|
||||
@@ -4149,8 +4270,12 @@ static void dp_pdev_detach(struct cdp_pdev *txrx_pdev, int force)
|
||||
int lmac_id;
|
||||
|
||||
if (wlan_cfg_per_pdev_tx_ring(soc->wlan_cfg_ctx)) {
|
||||
wlan_minidump_remove(
|
||||
soc->tcl_data_ring[pdev->pdev_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->tcl_data_ring[pdev->pdev_id],
|
||||
TCL_DATA, pdev->pdev_id);
|
||||
wlan_minidump_remove(
|
||||
soc->tx_comp_ring[pdev->pdev_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->tx_comp_ring[pdev->pdev_id],
|
||||
WBM2SW_RELEASE, pdev->pdev_id);
|
||||
}
|
||||
@@ -4159,6 +4284,8 @@ static void dp_pdev_detach(struct cdp_pdev *txrx_pdev, int force)
|
||||
|
||||
/* Cleanup per PDEV REO rings if configured */
|
||||
if (wlan_cfg_per_pdev_rx_ring(soc->wlan_cfg_ctx)) {
|
||||
wlan_minidump_remove(
|
||||
soc->reo_dest_ring[pdev->pdev_id].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->reo_dest_ring[pdev->pdev_id],
|
||||
REO_DST, pdev->pdev_id);
|
||||
}
|
||||
@@ -4173,6 +4300,7 @@ static void dp_pdev_detach(struct cdp_pdev *txrx_pdev, int force)
|
||||
lmac_id =
|
||||
dp_get_lmac_id_for_pdev_id(soc, mac_id, pdev->pdev_id);
|
||||
dp_mon_ring_cleanup(soc, pdev, lmac_id);
|
||||
|
||||
dp_srng_cleanup(soc, &soc->rxdma_err_dst_ring[lmac_id],
|
||||
RXDMA_DST, 0);
|
||||
|
||||
@@ -4193,7 +4321,7 @@ static void dp_pdev_detach(struct cdp_pdev *txrx_pdev, int force)
|
||||
}
|
||||
|
||||
soc->pdev_list[pdev->pdev_id] = NULL;
|
||||
qdf_minidump_remove(pdev);
|
||||
wlan_minidump_remove(pdev);
|
||||
qdf_mem_free(pdev);
|
||||
}
|
||||
|
||||
@@ -4408,7 +4536,7 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
|
||||
/* Free the ring memories */
|
||||
/* Common rings */
|
||||
qdf_minidump_remove(soc->wbm_desc_rel_ring.base_vaddr_unaligned);
|
||||
wlan_minidump_remove(soc->wbm_desc_rel_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->wbm_desc_rel_ring, SW2WBM_RELEASE, 0);
|
||||
|
||||
if (dp_is_soc_reinit(soc)) {
|
||||
@@ -4418,8 +4546,10 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
/* Tx data rings */
|
||||
if (!wlan_cfg_per_pdev_tx_ring(soc->wlan_cfg_ctx)) {
|
||||
for (i = 0; i < soc->num_tcl_data_rings; i++) {
|
||||
wlan_minidump_remove(soc->tcl_data_ring[i].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->tcl_data_ring[i],
|
||||
TCL_DATA, i);
|
||||
TCL_DATA, i);
|
||||
wlan_minidump_remove(soc->tx_comp_ring[i].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->tx_comp_ring[i],
|
||||
WBM2SW_RELEASE, i);
|
||||
}
|
||||
@@ -4432,8 +4562,10 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
}
|
||||
|
||||
/* TCL command/credit ring */
|
||||
wlan_minidump_remove(soc->tcl_cmd_credit_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->tcl_cmd_credit_ring, TCL_CMD_CREDIT, 0);
|
||||
/* TCL status rings */
|
||||
wlan_minidump_remove(soc->tcl_status_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->tcl_status_ring, TCL_STATUS, 0);
|
||||
|
||||
/* Rx data rings */
|
||||
@@ -4444,14 +4576,17 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
/* TODO: Get number of rings and ring sizes
|
||||
* from wlan_cfg
|
||||
*/
|
||||
wlan_minidump_remove(soc->reo_dest_ring[i].base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->reo_dest_ring[i],
|
||||
REO_DST, i);
|
||||
}
|
||||
}
|
||||
/* REO reinjection ring */
|
||||
wlan_minidump_remove(soc->reo_reinject_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->reo_reinject_ring, REO_REINJECT, 0);
|
||||
|
||||
/* Rx release ring */
|
||||
wlan_minidump_remove(soc->rx_rel_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->rx_rel_ring, WBM2SW_RELEASE, 0);
|
||||
dp_srng_cleanup(soc, &soc->rx_rel_ring, WBM2SW_RELEASE, 3);
|
||||
|
||||
@@ -4459,10 +4594,13 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
/* TODO: Better to store ring_type and ring_num in
|
||||
* dp_srng during setup
|
||||
*/
|
||||
wlan_minidump_remove(soc->reo_exception_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->reo_exception_ring, REO_EXCEPTION, 0);
|
||||
|
||||
/* REO command and status rings */
|
||||
wlan_minidump_remove(soc->reo_cmd_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->reo_cmd_ring, REO_CMD, 0);
|
||||
wlan_minidump_remove(soc->reo_status_ring.base_vaddr_unaligned);
|
||||
dp_srng_cleanup(soc, &soc->reo_status_ring, REO_STATUS, 0);
|
||||
dp_hw_link_desc_pool_cleanup(soc);
|
||||
|
||||
@@ -4471,7 +4609,7 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
|
||||
wlan_cfg_soc_detach(soc->wlan_cfg_ctx);
|
||||
|
||||
qdf_minidump_remove(soc);
|
||||
wlan_minidump_remove(soc);
|
||||
qdf_mem_free(soc);
|
||||
}
|
||||
|
||||
@@ -4957,7 +5095,11 @@ dp_soc_attach_target_wifi3(struct cdp_soc_t *cdp_soc)
|
||||
/* initialize work queue for stats processing */
|
||||
qdf_create_work(0, &soc->htt_stats.work, htt_t2h_stats_handler, soc);
|
||||
|
||||
qdf_minidump_log(soc, sizeof(*soc), "dp_soc");
|
||||
wlan_minidump_log(soc,
|
||||
sizeof(*soc),
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SOC,
|
||||
"dp_soc");
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -4991,7 +5133,11 @@ static QDF_STATUS dp_vdev_attach_wifi3(struct cdp_soc_t *cdp_soc,
|
||||
qdf_mem_free(vdev);
|
||||
goto fail0;
|
||||
}
|
||||
|
||||
wlan_minidump_log(vdev,
|
||||
sizeof(*vdev),
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_VDEV,
|
||||
"dp_vdev");
|
||||
if (!vdev) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("DP VDEV memory allocation failed"));
|
||||
@@ -5556,7 +5702,10 @@ dp_peer_create_wifi3(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
#else
|
||||
peer = (struct dp_peer *)qdf_mem_malloc(sizeof(*peer));
|
||||
#endif
|
||||
|
||||
wlan_minidump_log(peer,
|
||||
sizeof(*peer),
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_PEER, "dp_peer");
|
||||
if (!peer)
|
||||
return QDF_STATUS_E_FAILURE; /* failure */
|
||||
|
||||
@@ -6403,6 +6552,7 @@ void dp_peer_unref_delete(struct dp_peer *peer)
|
||||
*/
|
||||
qdf_spin_unlock_bh(&soc->peer_ref_mutex);
|
||||
|
||||
wlan_minidump_remove(peer);
|
||||
/*
|
||||
* Invoke soc.ol_ops->peer_unref_delete out of
|
||||
* peer_ref_mutex in case deadlock issue.
|
||||
|
@@ -364,7 +364,6 @@ void *hal_attach(struct hif_opaque_softc *hif_handle, qdf_device_t qdf_dev)
|
||||
"%s: hal_soc allocation failed", __func__);
|
||||
goto fail0;
|
||||
}
|
||||
qdf_minidump_log(hal, sizeof(*hal), "hal_soc");
|
||||
hal->hif_handle = hif_handle;
|
||||
hal->dev_base_addr = hif_get_dev_ba(hif_handle);
|
||||
hal->qdf_dev = qdf_dev;
|
||||
@@ -410,6 +409,8 @@ void *hal_attach(struct hif_opaque_softc *hif_handle, qdf_device_t qdf_dev)
|
||||
*/
|
||||
hal->init_phase = true;
|
||||
|
||||
qdf_minidump_log(hal, sizeof(*hal), "hal_soc");
|
||||
|
||||
return (void *)hal;
|
||||
|
||||
fail2:
|
||||
|
@@ -83,6 +83,7 @@
|
||||
#ifdef FEATURE_COEX
|
||||
#include <target_if_coex.h>
|
||||
#endif
|
||||
#include <wlan_utility.h>
|
||||
|
||||
#ifdef DCS_INTERFERENCE_DETECTION
|
||||
#include <target_if_dcs.h>
|
||||
@@ -585,6 +586,9 @@ QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info);
|
||||
target_psoc_set_preferred_hw_mode(tgt_psoc_info, WMI_HOST_HW_MODE_MAX);
|
||||
wlan_minidump_log(tgt_psoc_info,
|
||||
sizeof(*tgt_psoc_info), psoc,
|
||||
WLAN_MD_OBJMGR_PSOC_TGT_INFO, "target_psoc_info");
|
||||
|
||||
qdf_event_create(&tgt_psoc_info->info.event);
|
||||
|
||||
@@ -616,6 +620,7 @@ QDF_STATUS target_if_free_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
wlan_psoc_set_tgt_if_handle(psoc, NULL);
|
||||
|
||||
wlan_minidump_remove(tgt_psoc_info);
|
||||
qdf_mem_free(tgt_psoc_info);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "wlan_objmgr_global_obj_i.h"
|
||||
#include "wlan_objmgr_psoc_obj_i.h"
|
||||
#include "wlan_objmgr_pdev_obj_i.h"
|
||||
|
||||
#include <wlan_utility.h>
|
||||
|
||||
/**
|
||||
** APIs to Create/Delete Global object APIs
|
||||
@@ -121,6 +121,8 @@ struct wlan_objmgr_pdev *wlan_objmgr_pdev_obj_create(
|
||||
qdf_mem_free(pdev);
|
||||
return NULL;
|
||||
}
|
||||
wlan_minidump_log(pdev, sizeof(*pdev), psoc,
|
||||
WLAN_MD_OBJMGR_PDEV, "wlan_objmgr_pdev");
|
||||
/* Save PSOC object pointer in PDEV */
|
||||
wlan_pdev_set_psoc(pdev, psoc);
|
||||
/* Initialize PDEV's VDEV list, assign default values */
|
||||
@@ -231,6 +233,7 @@ static QDF_STATUS wlan_objmgr_pdev_obj_destroy(struct wlan_objmgr_pdev *pdev)
|
||||
return QDF_STATUS_COMP_ASYNC;
|
||||
}
|
||||
|
||||
wlan_minidump_remove(pdev);
|
||||
/* Free PDEV object */
|
||||
return wlan_objmgr_pdev_obj_free(pdev);
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "wlan_objmgr_psoc_obj_i.h"
|
||||
#include "wlan_objmgr_pdev_obj_i.h"
|
||||
#include "wlan_objmgr_vdev_obj_i.h"
|
||||
#include <wlan_utility.h>
|
||||
|
||||
/**
|
||||
** APIs to Create/Delete Global object APIs
|
||||
@@ -102,6 +103,7 @@ static QDF_STATUS wlan_objmgr_psoc_obj_free(struct wlan_objmgr_psoc *psoc)
|
||||
wlan_objmgr_psoc_peer_list_deinit(&psoc->soc_objmgr.peer_list);
|
||||
|
||||
qdf_spinlock_destroy(&psoc->psoc_lock);
|
||||
wlan_minidump_remove(psoc);
|
||||
qdf_mem_free(psoc);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -182,7 +184,8 @@ struct wlan_objmgr_psoc *wlan_objmgr_psoc_obj_create(uint32_t phy_version,
|
||||
wlan_objmgr_psoc_obj_delete(psoc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wlan_minidump_log(psoc, sizeof(*psoc), psoc,
|
||||
WLAN_MD_OBJMGR_PSOC, "wlan_objmgr_psoc");
|
||||
obj_mgr_info("Created psoc %d", psoc->soc_objmgr.psoc_id);
|
||||
|
||||
return psoc;
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "wlan_objmgr_psoc_obj_i.h"
|
||||
#include "wlan_objmgr_pdev_obj_i.h"
|
||||
#include "wlan_objmgr_vdev_obj_i.h"
|
||||
#include <wlan_utility.h>
|
||||
|
||||
/**
|
||||
** APIs to Create/Delete Global object APIs
|
||||
@@ -110,6 +111,7 @@ static QDF_STATUS wlan_objmgr_vdev_obj_free(struct wlan_objmgr_vdev *vdev)
|
||||
qdf_mem_free(vdev->vdev_mlme.bss_chan);
|
||||
qdf_mem_free(vdev->vdev_mlme.des_chan);
|
||||
qdf_mem_free(vdev->vdev_nif.osdev);
|
||||
wlan_minidump_remove(vdev);
|
||||
qdf_mem_free(vdev);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -143,7 +145,6 @@ struct wlan_objmgr_vdev *wlan_objmgr_vdev_obj_create(
|
||||
vdev = qdf_mem_malloc(sizeof(*vdev));
|
||||
if (!vdev)
|
||||
return NULL;
|
||||
|
||||
vdev->obj_state = WLAN_OBJ_STATE_ALLOCATED;
|
||||
|
||||
vdev->vdev_mlme.bss_chan = qdf_mem_malloc(sizeof(struct wlan_channel));
|
||||
@@ -262,6 +263,9 @@ struct wlan_objmgr_vdev *wlan_objmgr_vdev_obj_create(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wlan_minidump_log(vdev, sizeof(*vdev), psoc,
|
||||
WLAN_MD_OBJMGR_VDEV, "wlan_objmgr_vdev");
|
||||
|
||||
obj_mgr_debug("Created vdev %d", vdev->vdev_objmgr.vdev_id);
|
||||
|
||||
return vdev;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -317,4 +317,86 @@ QDF_STATUS wlan_util_is_pdev_scan_allowed(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t wlan_util_get_peer_count_for_mode(struct wlan_objmgr_pdev *pdev,
|
||||
enum QDF_OPMODE mode);
|
||||
|
||||
/**
|
||||
* wlan_minidump_host_data - Data structure type logged in Minidump
|
||||
* @WLAN_MD_CP_EXT_PDEV - ol_ath_softc_net80211
|
||||
* @WLAN_MD_CP_EXT_PSOC - ol_ath_soc_softc
|
||||
* @WLAN_MD_CP_EXT_VDEV - ieee80211vap
|
||||
* @WLAN_MD_CP_EXT_PEER - ieee80211_node
|
||||
* @WLAN_MD_DP_SOC - dp_soc
|
||||
* @WLAN_MD_DP_PDEV - dp_pdev
|
||||
* @WLAN_MD_DP_VDEV - dp_vdev
|
||||
* @WLAN_MD_DP_PEER - dp_peer
|
||||
* @WLAN_MD_DP_SRNG_REO_DEST - dp_srng type for reo dest
|
||||
* @WLAN_MD_DP_SRNG_REO_EXCEPTION - dp_srng type for reo exception
|
||||
* @WLAN_MD_DP_SRNG_REO_CMD - dp_srng type for reo cmd
|
||||
* @WLAN_MD_DP_SRNG_RX_REL - dp_srng type for reo release
|
||||
* @WLAN_MD_DP_SRNG_REO_REINJECT - dp_srng type for reo reinject
|
||||
* @WLAN_MD_DP_SRNG_REO_STATUS - dp_srng type for reo status
|
||||
* @WLAN_MD_DP_SRNG_TCL_DATA - dp_srng type for tcl data
|
||||
* @WLAN_MD_DP_SRNG_TCL_STATUS - dp_srng type for tcl status
|
||||
* @WLAN_MD_DP_SRNG_TX_COMP - dp_srng type for tcl comp
|
||||
* @WLAN_MD_DP_SRNG_WBM_DESC_REL - dp_srng_type for wbm desc rel
|
||||
* @WLAN_MD_DP_SRNG_WBM_IDLE_LINK - dp_srng type for wbm idle link
|
||||
* @WLAN_MD_DP_LINK_DESC_BANK - Wbm link_desc_bank
|
||||
* @WLAN_MD_DP_SRNG_RXDMA_MON_STATUS - dp_srng type for rxdma mon status
|
||||
* @WLAN_MD_DP_SRNG_RXDMA_MON_BUF - dp_srng type for rxdma mon buf
|
||||
* @WLAN_MD_DP_SRNG_RXDMA_MON_DST - dp_srng type for rxdma mon dest
|
||||
* @WLAN_MD_DP_SRNG_RXDMA_MON_DESC - dp_srng type for rxdma mon desc
|
||||
* @WLAN_MD_DP_SRNG_RXDMA_ERR_DST - dp_srng type for rxdma err dst
|
||||
* @WLAN_MD_DP_HAL_SOC - hal_soc
|
||||
* @WLAN_MD_OBJMGR_PSOC - wlan_objmgr_psoc
|
||||
* @WLAN_MD_OBJMGR_PSOC_TGT_INFO - wlan_objmgr_tgt_psoc_info
|
||||
* @WLAN_MD_OBJMGR_PDEV - wlan_objmgr_pdev
|
||||
* @WLAN_MD_OBJMGR_PDEV_MLME - pdev_mlme
|
||||
* @WLAN_MD_OBJMGR_VDEV - wlan_objmgr_vdev
|
||||
* @WLAN_MD_OBJMGR_VDEV_MLME -vdev mlme
|
||||
* @WLAN_MD_OBJMGR_VDEV_SM - wlan_sm
|
||||
* @WLAN_MD_MAX - Max value
|
||||
*/
|
||||
enum wlan_minidump_host_data {
|
||||
WLAN_MD_CP_EXT_PDEV,
|
||||
WLAN_MD_CP_EXT_PSOC,
|
||||
WLAN_MD_CP_EXT_VDEV,
|
||||
WLAN_MD_CP_EXT_PEER,
|
||||
WLAN_MD_DP_SOC,
|
||||
WLAN_MD_DP_PDEV,
|
||||
WLAN_MD_DP_VDEV,
|
||||
WLAN_MD_DP_PEER,
|
||||
WLAN_MD_DP_SRNG_REO_DEST,
|
||||
WLAN_MD_DP_SRNG_REO_EXCEPTION,
|
||||
WLAN_MD_DP_SRNG_REO_CMD,
|
||||
WLAN_MD_DP_SRNG_RX_REL,
|
||||
WLAN_MD_DP_SRNG_REO_REINJECT,
|
||||
WLAN_MD_DP_SRNG_REO_STATUS,
|
||||
WLAN_MD_DP_SRNG_TCL_DATA,
|
||||
WLAN_MD_DP_SRNG_TCL_CMD,
|
||||
WLAN_MD_DP_SRNG_TCL_STATUS,
|
||||
WLAN_MD_DP_SRNG_TX_COMP,
|
||||
WLAN_MD_DP_SRNG_WBM_DESC_REL,
|
||||
WLAN_MD_DP_SRNG_WBM_IDLE_LINK,
|
||||
WLAN_MD_DP_LINK_DESC_BANK,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_STATUS,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_BUF,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_DST,
|
||||
WLAN_MD_DP_SRNG_RXDMA_MON_DESC,
|
||||
WLAN_MD_DP_SRNG_RXDMA_ERR_DST,
|
||||
WLAN_MD_DP_HAL_SOC,
|
||||
WLAN_MD_OBJMGR_PSOC,
|
||||
WLAN_MD_OBJMGR_PSOC_TGT_INFO,
|
||||
WLAN_MD_OBJMGR_PDEV,
|
||||
WLAN_MD_OBJMGR_PDEV_MLME,
|
||||
WLAN_MD_OBJMGR_VDEV,
|
||||
WLAN_MD_OBJMGR_VDEV_MLME,
|
||||
WLAN_MD_OBJMGR_VDEV_SM,
|
||||
WLAN_MD_MAX
|
||||
};
|
||||
|
||||
void wlan_minidump_log(void *start_addr, size_t size,
|
||||
void *psoc,
|
||||
enum wlan_minidump_host_data type,
|
||||
const char *name);
|
||||
|
||||
void wlan_minidump_remove(void *addr);
|
||||
|
||||
#endif /* _WLAN_UTILITY_H_ */
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
#include <qdf_module.h>
|
||||
#include <wlan_vdev_mlme_api.h>
|
||||
#include "cfg_ucfg_api.h"
|
||||
|
||||
uint32_t wlan_chan_to_freq(uint8_t chan)
|
||||
{
|
||||
@@ -518,3 +519,125 @@ uint16_t wlan_util_get_peer_count_for_mode(struct wlan_objmgr_pdev *pdev,
|
||||
return count.peer_count;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QCA_MINIDUMP
|
||||
void wlan_minidump_log(void *start_addr, size_t size,
|
||||
void *psoc_obj,
|
||||
enum wlan_minidump_host_data type,
|
||||
const char *name)
|
||||
{
|
||||
int setval = 0;
|
||||
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
if (!psoc_obj) {
|
||||
qdf_debug("Minidump: Psoc is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
psoc = (struct wlan_objmgr_psoc *)psoc_obj;
|
||||
|
||||
switch (type) {
|
||||
case WLAN_MD_CP_EXT_PDEV:
|
||||
if (cfg_get(psoc, CFG_OL_MD_CP_EXT_PDEV))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_CP_EXT_PSOC:
|
||||
if (cfg_get(psoc, CFG_OL_MD_CP_EXT_PSOC))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_CP_EXT_VDEV:
|
||||
if (cfg_get(psoc, CFG_OL_MD_CP_EXT_VDEV))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_CP_EXT_PEER:
|
||||
if (cfg_get(psoc, CFG_OL_MD_CP_EXT_PEER))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_SOC:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_SOC))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_PDEV:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_PDEV))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_PEER:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_PEER))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_SRNG_REO_DEST:
|
||||
case WLAN_MD_DP_SRNG_REO_EXCEPTION:
|
||||
case WLAN_MD_DP_SRNG_RX_REL:
|
||||
case WLAN_MD_DP_SRNG_REO_REINJECT:
|
||||
case WLAN_MD_DP_SRNG_REO_CMD:
|
||||
case WLAN_MD_DP_SRNG_REO_STATUS:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_SRNG_REO))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_SRNG_TCL_DATA:
|
||||
case WLAN_MD_DP_SRNG_TCL_CMD:
|
||||
case WLAN_MD_DP_SRNG_TCL_STATUS:
|
||||
case WLAN_MD_DP_SRNG_TX_COMP:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_SRNG_TCL))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_SRNG_WBM_DESC_REL:
|
||||
case WLAN_MD_DP_SRNG_WBM_IDLE_LINK:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_SRNG_WBM))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_LINK_DESC_BANK:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_LINK_DESC_BANK))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_SRNG_RXDMA_MON_BUF:
|
||||
case WLAN_MD_DP_SRNG_RXDMA_MON_DST:
|
||||
case WLAN_MD_DP_SRNG_RXDMA_MON_DESC:
|
||||
case WLAN_MD_DP_SRNG_RXDMA_ERR_DST:
|
||||
case WLAN_MD_DP_SRNG_RXDMA_MON_STATUS:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_SRNG_RXDMA))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_DP_HAL_SOC:
|
||||
if (cfg_get(psoc, CFG_OL_MD_DP_HAL_SOC))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_OBJMGR_PSOC:
|
||||
case WLAN_MD_OBJMGR_PSOC_TGT_INFO:
|
||||
if (cfg_get(psoc, CFG_OL_MD_OBJMGR_PSOC))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_OBJMGR_PDEV:
|
||||
case WLAN_MD_OBJMGR_PDEV_MLME:
|
||||
if (cfg_get(psoc, CFG_OL_MD_OBJMGR_PDEV))
|
||||
setval = 1;
|
||||
break;
|
||||
case WLAN_MD_OBJMGR_VDEV_MLME:
|
||||
case WLAN_MD_OBJMGR_VDEV_SM:
|
||||
case WLAN_MD_OBJMGR_VDEV:
|
||||
if (cfg_get(psoc, CFG_OL_MD_OBJMGR_VDEV))
|
||||
setval = 1;
|
||||
break;
|
||||
default:
|
||||
qdf_debug("Minidump: Type not implemented");
|
||||
}
|
||||
if (setval)
|
||||
qdf_minidump_log(start_addr, size, name);
|
||||
}
|
||||
qdf_export_symbol(wlan_minidump_log);
|
||||
|
||||
void wlan_minidump_remove(void *addr)
|
||||
{
|
||||
qdf_minidump_remove(addr);
|
||||
}
|
||||
qdf_export_symbol(wlan_minidump_remove);
|
||||
#else
|
||||
void wlan_minidump_log(void *start_addr, size_t size,
|
||||
void *psoc_obj,
|
||||
enum wlan_minidump_host_data type,
|
||||
const char *name) {}
|
||||
qdf_export_symbol(wlan_minidump_log);
|
||||
|
||||
void wlan_minidump_remove(void *addr) {}
|
||||
qdf_export_symbol(wlan_minidump_remove);
|
||||
#endif /* CONFIG_QCA_MINIDUMP */
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -26,23 +26,32 @@
|
||||
#include "include/wlan_pdev_mlme.h"
|
||||
#include "wlan_pdev_mlme_main.h"
|
||||
#include "wlan_pdev_mlme_api.h"
|
||||
#include <wlan_utility.h>
|
||||
|
||||
static QDF_STATUS mlme_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev,
|
||||
void *arg)
|
||||
{
|
||||
struct pdev_mlme_obj *pdev_mlme;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
if (!pdev) {
|
||||
mlme_err(" PDEV is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc) {
|
||||
mlme_err("PSOC is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pdev_mlme = qdf_mem_malloc(sizeof(*pdev_mlme));
|
||||
if (!pdev_mlme) {
|
||||
mlme_err(" MLME component object alloc failed");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
wlan_minidump_log(pdev_mlme, sizeof(*pdev_mlme), psoc,
|
||||
WLAN_MD_OBJMGR_PDEV_MLME, "pdev_mlme");
|
||||
pdev_mlme->pdev = pdev;
|
||||
|
||||
if (mlme_pdev_ops_ext_hdl_create(pdev_mlme) != QDF_STATUS_SUCCESS)
|
||||
@@ -55,6 +64,7 @@ static QDF_STATUS mlme_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
init_failed:
|
||||
wlan_minidump_remove(pdev_mlme);
|
||||
qdf_mem_free(pdev_mlme);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -75,6 +85,7 @@ static QDF_STATUS mlme_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
wlan_objmgr_pdev_component_obj_detach(pdev, WLAN_UMAC_COMP_MLME,
|
||||
(void *)pdev_mlme);
|
||||
wlan_minidump_remove(pdev_mlme);
|
||||
qdf_mem_free(pdev_mlme);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@@ -88,6 +88,8 @@ static QDF_STATUS mlme_vdev_obj_create_handler(struct wlan_objmgr_vdev *vdev,
|
||||
vdev_mlme = qdf_mem_malloc(sizeof(*vdev_mlme));
|
||||
if (!vdev_mlme)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
wlan_minidump_log(vdev_mlme, sizeof(*vdev_mlme), psoc,
|
||||
WLAN_MD_OBJMGR_VDEV_MLME, "vdev_mlme");
|
||||
|
||||
vdev_mlme->vdev = vdev;
|
||||
|
||||
@@ -127,8 +129,8 @@ ext_hdl_post_create_failed:
|
||||
ext_hdl_create_failed:
|
||||
mlme_vdev_sm_destroy(vdev_mlme);
|
||||
init_failed:
|
||||
wlan_minidump_remove(vdev_mlme);
|
||||
qdf_mem_free(vdev_mlme);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -154,6 +156,7 @@ static QDF_STATUS mlme_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
wlan_objmgr_vdev_component_obj_detach(vdev, WLAN_UMAC_COMP_MLME,
|
||||
vdev_mlme);
|
||||
wlan_minidump_remove(vdev_mlme);
|
||||
qdf_mem_free(vdev_mlme);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <wlan_sm_engine.h>
|
||||
#include "include/wlan_vdev_mlme.h"
|
||||
#include "vdev_mlme_sm.h"
|
||||
#include <wlan_utility.h>
|
||||
|
||||
/**
|
||||
* mlme_vdev_set_state() - set mlme state
|
||||
@@ -1900,6 +1901,7 @@ QDF_STATUS mlme_vdev_sm_create(struct vdev_mlme_obj *vdev_mlme)
|
||||
{
|
||||
struct wlan_sm *sm;
|
||||
uint8_t name[WLAN_SM_ENGINE_MAX_NAME];
|
||||
struct wlan_objmgr_vdev *vdev = vdev_mlme->vdev;
|
||||
|
||||
qdf_snprintf(name, sizeof(name), "VDEV%d-MLME",
|
||||
wlan_vdev_get_id(vdev_mlme->vdev));
|
||||
@@ -1914,6 +1916,9 @@ QDF_STATUS mlme_vdev_sm_create(struct vdev_mlme_obj *vdev_mlme)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
vdev_mlme->sm_hdl = sm;
|
||||
wlan_minidump_log((void *)sm, sizeof(*sm),
|
||||
wlan_vdev_get_psoc(vdev),
|
||||
WLAN_MD_OBJMGR_VDEV_SM, "wlan_sm");
|
||||
|
||||
mlme_vdev_sm_spinlock_create(vdev_mlme);
|
||||
|
||||
@@ -1928,6 +1933,7 @@ QDF_STATUS mlme_vdev_sm_destroy(struct vdev_mlme_obj *vdev_mlme)
|
||||
|
||||
mlme_vdev_sm_spinlock_destroy(vdev_mlme);
|
||||
|
||||
wlan_minidump_remove(vdev_mlme->sm_hdl);
|
||||
wlan_sm_delete(vdev_mlme->sm_hdl);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
Reference in New Issue
Block a user