qcacmn: Datapath init-deinit changes

Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines

Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
This commit is contained in:
phadiman
2020-04-30 23:06:48 +05:30
committed by Gerrit - the friendly Code Review server
parent e4a31a803d
commit 1f3652debc
20 changed files with 2847 additions and 2377 deletions

View File

@@ -635,6 +635,18 @@ wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
return wlan_cfg_ctx;
}
void wlan_cfg_set_mon_delayed_replenish_entries(
struct wlan_cfg_dp_soc_ctxt *cfg,
uint32_t val)
{
cfg->delayed_replenish_entries = val;
}
int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->delayed_replenish_entries;
}
void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx)
{
if (wlan_cfg_ctx)
@@ -1226,6 +1238,17 @@ wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
}
}
void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val)
{
cfg->is_tso_desc_attach_defer = val;
}
bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->is_tso_desc_attach_defer;
}
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
/**
* wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold

View File

@@ -280,6 +280,8 @@ struct wlan_cfg_dp_soc_ctxt {
uint8_t *rx_toeplitz_hash_key;
uint8_t pktlog_buffer_size;
uint8_t is_rx_fisa_enabled;
bool is_tso_desc_attach_defer;
uint32_t delayed_replenish_entries;
};
/**
@@ -365,6 +367,28 @@ int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context, int mask);
int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context, int mask);
/**
* wlan_cfg_set_mon_delayed_replenish_entries() - number of buffers to replenish
* for monitor buffer ring at initialization
* @wlan_cfg_ctx - Configuration Handle
* @replenish_entries - number of entries to replenish at initialization
*
*/
void wlan_cfg_set_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
*wlan_cfg_ctx,
uint32_t replenish_entries);
/**
* wlan_cfg_get_mon_delayed_replenish_entries() - get num of buffer to replenish
* for monitor buffer ring at initialization
* @wlan_cfg_ctx - Configuration Handle
* @replenish_entries - number of entries to replenish at initialization
*
* Return: delayed_replenish_entries;
*/
int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
*wlan_cfg_ctx);
/**
* wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
* @wlan_cfg_ctx - Configuration Handle
@@ -1290,3 +1314,9 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
*/
bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
#endif
void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val);
bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);