qcacmn: handle ppeds init/deinit
based on ppeds_handle allocate and free the ppeds resources. Change-Id: I70fc4bfa879fcd62c0e8a80c5b57938a2063bccc CRs-Fixed: 3462725
Esse commit está contido em:

commit de
Madan Koyyalamudi

pai
c7c3c49381
commit
7045ccc728
@@ -1434,7 +1434,6 @@ enum cdp_pdev_param_type {
|
||||
*
|
||||
* @cdp_psoc_param_en_rate_stats: set rate stats enable/disable
|
||||
* @cdp_psoc_param_en_nss_cfg: set nss cfg
|
||||
* @cdp_psoc_param_ppeds_enabled: PPE-DS feature enable
|
||||
* @cdp_ipa_enabled : set ipa mode
|
||||
* @cdp_psoc_param_vdev_stats_hw_offload: Configure HW vdev stats offload
|
||||
* @cdp_pdev_param_undecoded_metadata_enable: Undecoded metadata capture enable
|
||||
@@ -1522,7 +1521,6 @@ typedef union cdp_config_param_t {
|
||||
int cdp_psoc_param_en_nss_cfg;
|
||||
int cdp_psoc_param_preferred_hw_mode;
|
||||
bool cdp_psoc_param_pext_stats;
|
||||
bool cdp_psoc_param_ppeds_enabled;
|
||||
|
||||
bool cdp_skip_bar_update;
|
||||
bool cdp_ipa_enabled;
|
||||
@@ -1688,7 +1686,6 @@ enum cdp_vdev_param_type {
|
||||
* @CDP_CFG_VDEV_STATS_HW_OFFLOAD: HW Vdev stats config
|
||||
* @CDP_SAWF_ENABLE:
|
||||
* @CDP_UMAC_RST_SKEL_ENABLE: Enable Umac reset skeleton code for debug
|
||||
* @CDP_PPEDS_ENABLE: PPEDS is enabled or not
|
||||
* @CDP_SAWF_STATS: set SAWF stats config
|
||||
* @CDP_UMAC_RESET_STATS: UMAC reset stats
|
||||
*/
|
||||
@@ -1701,7 +1698,6 @@ enum cdp_psoc_param_type {
|
||||
CDP_CFG_VDEV_STATS_HW_OFFLOAD,
|
||||
CDP_SAWF_ENABLE,
|
||||
CDP_UMAC_RST_SKEL_ENABLE,
|
||||
CDP_PPEDS_ENABLE,
|
||||
CDP_SAWF_STATS,
|
||||
CDP_UMAC_RESET_STATS,
|
||||
};
|
||||
|
@@ -125,6 +125,21 @@ void cdp_ppesds_entry_detach(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
vp_params);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_ppeds_attached() - Check whether ppeds attached
|
||||
* @soc: data path soc handle
|
||||
*
|
||||
* return: true for ppeds attached otherwise false.
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS cdp_ppeds_attached(struct cdp_soc_t *soc)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->ppeds_ops)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_ppesds_set_int_pri2tid() - Set the INT_PRI to TID
|
||||
* @soc: data path soc handle
|
||||
|
@@ -507,12 +507,14 @@ dp_hw_cookie_conversion_deinit(struct dp_soc_be *be_soc,
|
||||
static QDF_STATUS dp_soc_ppeds_attach_be(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
int target_type = hal_get_target_type(soc->hal_soc);
|
||||
struct cdp_ops *cdp_ops = soc->cdp_soc.ops;
|
||||
|
||||
/*
|
||||
* Check if PPE DS is enabled.
|
||||
* Check if PPE DS is enabled and wlan soc supports it.
|
||||
*/
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(soc->wlan_cfg_ctx))
|
||||
if (!wlan_cfg_get_dp_soc_ppeds_enable(soc->wlan_cfg_ctx) ||
|
||||
!dp_ppeds_target_supported(target_type))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (dp_ppeds_attach_soc_be(be_soc) != QDF_STATUS_SUCCESS)
|
||||
@@ -528,7 +530,7 @@ static QDF_STATUS dp_soc_ppeds_detach_be(struct dp_soc *soc)
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
struct cdp_ops *cdp_ops = soc->cdp_soc.ops;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(soc->wlan_cfg_ctx))
|
||||
if (!be_soc->ppeds_handle)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
dp_ppeds_detach_soc_be(be_soc);
|
||||
@@ -1751,7 +1753,7 @@ static void dp_soc_ppeds_srng_deinit(struct dp_soc *soc)
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(soc_cfg_ctx))
|
||||
if (!be_soc->ppeds_handle)
|
||||
return;
|
||||
|
||||
dp_srng_deinit(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0);
|
||||
@@ -1785,9 +1787,6 @@ static void dp_soc_ppeds_srng_free(struct dp_soc *soc)
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(soc_cfg_ctx))
|
||||
return;
|
||||
|
||||
dp_srng_free(soc, &be_soc->ppeds_wbm_release_ring);
|
||||
|
||||
dp_srng_free(soc, &be_soc->ppe2tcl_ring);
|
||||
@@ -1803,7 +1802,7 @@ static QDF_STATUS dp_soc_ppeds_srng_alloc(struct dp_soc *soc)
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(soc_cfg_ctx))
|
||||
if (!be_soc->ppeds_handle)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
entries = wlan_cfg_get_dp_soc_reo2ppe_ring_size(soc_cfg_ctx);
|
||||
@@ -1845,7 +1844,7 @@ static QDF_STATUS dp_soc_ppeds_srng_init(struct dp_soc *soc)
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(soc_cfg_ctx))
|
||||
if (!be_soc->ppeds_handle)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (dp_ppeds_register_soc_be(be_soc, &idx)) {
|
||||
@@ -2857,6 +2856,7 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
arch_ops->ppeds_handle_attached = dp_ppeds_handle_attached;
|
||||
arch_ops->dp_txrx_ppeds_rings_status = dp_ppeds_rings_status;
|
||||
arch_ops->txrx_soc_ppeds_start = dp_ppeds_start_soc_be;
|
||||
arch_ops->txrx_soc_ppeds_stop = dp_ppeds_stop_soc_be;
|
||||
|
@@ -7441,10 +7441,6 @@ static QDF_STATUS dp_get_psoc_param(struct cdp_soc_t *cdp_soc,
|
||||
case CDP_UMAC_RST_SKEL_ENABLE:
|
||||
val->cdp_umac_rst_skel = dp_umac_rst_skel_enable_get(soc);
|
||||
break;
|
||||
case CDP_PPEDS_ENABLE:
|
||||
val->cdp_psoc_param_ppeds_enabled =
|
||||
wlan_cfg_get_dp_soc_is_ppeds_enabled(soc->wlan_cfg_ctx);
|
||||
break;
|
||||
default:
|
||||
dp_warn("Invalid param");
|
||||
break;
|
||||
|
@@ -4384,6 +4384,7 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
|
||||
bool is_monitor_mode = false;
|
||||
uint8_t i;
|
||||
int num_dp_msi;
|
||||
bool ppeds_attached = false;
|
||||
|
||||
htt_soc = htt_soc_attach(soc, htc_handle);
|
||||
if (!htt_soc)
|
||||
@@ -4422,8 +4423,12 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
|
||||
goto fail3;
|
||||
}
|
||||
|
||||
if (soc->arch_ops.ppeds_handle_attached)
|
||||
ppeds_attached = soc->arch_ops.ppeds_handle_attached(soc);
|
||||
|
||||
wlan_cfg_fill_interrupt_mask(soc->wlan_cfg_ctx, num_dp_msi,
|
||||
soc->intr_mode, is_monitor_mode);
|
||||
soc->intr_mode, is_monitor_mode,
|
||||
ppeds_attached);
|
||||
|
||||
/* initialize WBM_IDLE_LINK ring */
|
||||
if (dp_hw_link_desc_ring_init(soc)) {
|
||||
|
@@ -2231,6 +2231,7 @@ enum dp_context_type {
|
||||
* @dp_tx_desc_pool_alloc: Allocate arch specific TX descriptor pool
|
||||
* @dp_tx_desc_pool_free: Free arch specific TX descriptor pool
|
||||
* @txrx_srng_init: Init txrx srng
|
||||
* @ppeds_handle_attached:
|
||||
* @txrx_soc_ppeds_interrupt_stop:
|
||||
* @txrx_soc_ppeds_interrupt_start:
|
||||
* @txrx_soc_ppeds_service_status_update:
|
||||
@@ -2446,6 +2447,7 @@ struct dp_arch_ops {
|
||||
struct dp_vdev *vdev,
|
||||
bool peer_map);
|
||||
#endif
|
||||
bool (*ppeds_handle_attached)(struct dp_soc *soc);
|
||||
QDF_STATUS (*txrx_soc_ppeds_start)(struct dp_soc *soc);
|
||||
void (*txrx_soc_ppeds_stop)(struct dp_soc *soc);
|
||||
int (*dp_register_ppeds_interrupts)(struct dp_soc *soc,
|
||||
|
@@ -3313,7 +3313,8 @@ static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
|
||||
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
int num_dp_msi,
|
||||
int interrupt_mode,
|
||||
bool is_monitor_mode)
|
||||
bool is_monitor_mode,
|
||||
bool ppeds_attached)
|
||||
{ int i = 0;
|
||||
|
||||
for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
|
||||
@@ -3343,7 +3344,8 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
int num_dp_msi,
|
||||
int interrupt_mode,
|
||||
bool is_monitor_mode)
|
||||
bool is_monitor_mode,
|
||||
bool ppeds_attached)
|
||||
{ int i = 0;
|
||||
const uint8_t *tx_ring_intr_mask =
|
||||
wlan_cfg_get_tx_ring_int_mask(wlan_cfg_ctx);
|
||||
@@ -3466,7 +3468,8 @@ wlan_cfg_mask_assignment(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
int num_dp_msi,
|
||||
int interrupt_mode,
|
||||
bool is_monitor_mode)
|
||||
bool is_monitor_mode,
|
||||
bool ppeds_attached)
|
||||
{
|
||||
int i = 0;
|
||||
int interrupt_index = 0;
|
||||
@@ -3482,7 +3485,7 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
}
|
||||
|
||||
for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
|
||||
if (!wlan_cfg_get_dp_soc_is_ppeds_enabled(wlan_cfg_ctx))
|
||||
if (!ppeds_attached)
|
||||
mask_assignment = &dp_mask_assignment[interrupt_index];
|
||||
else if (interrupt_index == 8)
|
||||
mask_assignment = &dp_ds_mask_assignment_8msi;
|
||||
@@ -5380,7 +5383,7 @@ int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
bool
|
||||
wlan_cfg_get_dp_soc_is_ppeds_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return cfg->ppeds_enable;
|
||||
}
|
||||
|
@@ -1868,12 +1868,13 @@ wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
* @num_dp_msi: Number of DP interrupts available (0 for integrated)
|
||||
* @interrupt_mode: Type of interrupt
|
||||
* @is_monitor_mode: is monitor mode enabled
|
||||
* @ppeds_attached: is ppeds attached
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
int num_dp_msi, int interrupt_mode,
|
||||
bool is_monitor_mode);
|
||||
bool is_monitor_mode, bool ppeds_attached);
|
||||
|
||||
/**
|
||||
* wlan_cfg_is_rx_fisa_enabled() - Get Rx FISA enabled flag
|
||||
@@ -2143,13 +2144,13 @@ void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
/**
|
||||
* wlan_cfg_get_dp_soc_is_ppeds_enabled() - API to get ppe enable flag
|
||||
* wlan_cfg_get_dp_soc_ppeds_enable() - API to get ppe enable flag
|
||||
* @cfg: Configuration Handle
|
||||
*
|
||||
* Return: true if ppe is enabled else return false
|
||||
* Return: true if ppeds support is enabled else return false
|
||||
*/
|
||||
bool
|
||||
wlan_cfg_get_dp_soc_is_ppeds_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
/**
|
||||
* wlan_cfg_get_dp_soc_reo2ppe_ring_size() - get ppe rx ring size
|
||||
@@ -2196,7 +2197,7 @@ int
|
||||
wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
#else
|
||||
static inline bool
|
||||
wlan_cfg_get_dp_soc_is_ppeds_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Referência em uma nova issue
Block a user