qcacmn: Changes to Init TX Rings for BE
DP/CFG changes to initialize extra TX/TX Comp Rings in BE. CRs-Fixed: 2937302 Change-Id: Ia8a8ed717eb0e1bfa9d2e1ff917941a7ea91bc28
This commit is contained in:

committed by
Madan Koyyalamudi

parent
08c76c5170
commit
af887c113d
@@ -72,12 +72,9 @@
|
||||
#define WME_AC_VO 3 /* voice */
|
||||
#define WME_AC_MAX 4 /* MAX AC Value */
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#define CDP_MAX_RX_RINGS 8 /* max rx rings */
|
||||
#else
|
||||
#define CDP_MAX_RX_RINGS 4 /* max rx rings */
|
||||
#endif
|
||||
#define CDP_MAX_TX_COMP_RINGS 3 /* max tx completion rings */
|
||||
#define CDP_MAX_TX_COMP_RINGS 5 /* max tx/completion rings */
|
||||
|
||||
#define CDP_MAX_TX_TQM_STATUS 9 /* max tx tqm completion status */
|
||||
#define CDP_MAX_TX_HTT_STATUS 7 /* max tx htt completion status */
|
||||
|
||||
|
@@ -68,6 +68,35 @@ void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
|
||||
}
|
||||
#endif /* DP_FEATURE_HW_COOKIE_CONVERSION */
|
||||
|
||||
#ifdef QCA_OL_TX_MULTIQ_SUPPORT
|
||||
/*
|
||||
* dp_tx_get_rbm_id()- Get the RBM ID for data transmission completion.
|
||||
* @dp_soc - DP soc structure pointer
|
||||
* @ring_id - Transmit Queue/ring_id to be used when XPS is enabled
|
||||
*
|
||||
* Return - RBM ID corresponding to TCL ring_id
|
||||
*/
|
||||
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
||||
uint8_t ring_id)
|
||||
{
|
||||
return (ring_id ? soc->wbm_sw0_bm_id + (ring_id - 1) :
|
||||
HAL_WBM_SW2_BM_ID(soc->wbm_sw0_bm_id));
|
||||
}
|
||||
|
||||
#else
|
||||
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
||||
uint8_t ring_id)
|
||||
{
|
||||
uint8_t wbm_ring_id, rbm;
|
||||
|
||||
wbm_ring_id = wlan_cfg_get_wbm_ring_num_for_index(ring_id);
|
||||
rbm = wbm_ring_id + soc->wbm_sw0_bm_id;
|
||||
dp_debug("ring_id %u wbm ring num %u rbm %u",
|
||||
ring_id, wbm_ring_id, rbm);
|
||||
return rbm;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
|
||||
@@ -78,11 +107,11 @@ dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
uint32_t *hal_tx_desc_cached;
|
||||
int coalesce = 0;
|
||||
struct dp_tx_queue *tx_q = &msdu_info->tx_queue;
|
||||
uint8_t ring_id = tx_q->ring_id & DP_TX_QUEUE_MASK;
|
||||
uint8_t ring_id = tx_q->ring_id;
|
||||
uint8_t tid = msdu_info->tid;
|
||||
struct dp_vdev_be *be_vdev;
|
||||
uint8_t cached_desc[HAL_TX_DESC_LEN_BYTES] = { 0 };
|
||||
uint8_t bm_id = dp_tx_get_rbm_id(soc, ring_id);
|
||||
uint8_t bm_id = dp_tx_get_rbm_id_be(soc, ring_id);
|
||||
hal_ring_handle_t hal_ring_hdl = NULL;
|
||||
QDF_STATUS status = QDF_STATUS_E_RESOURCES;
|
||||
|
||||
|
@@ -22,6 +22,8 @@
|
||||
|
||||
#define DP_IPA_MAX_IFACE 3
|
||||
#define IPA_REO_DEST_RING_IDX 3
|
||||
#define IPA_REO_DEST_RING_IDX_2 7
|
||||
|
||||
#define IPA_RX_REFILL_BUF_RING_IDX 2
|
||||
|
||||
/* Adding delay before disabling ipa pipes if any Tx Completions are pending */
|
||||
|
@@ -105,6 +105,12 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc)
|
||||
#define SET_PEER_REF_CNT_ONE(_peer)
|
||||
#endif
|
||||
|
||||
QDF_COMPILE_TIME_ASSERT(max_rx_rings_check,
|
||||
MAX_REO_DEST_RINGS == CDP_MAX_RX_RINGS);
|
||||
|
||||
QDF_COMPILE_TIME_ASSERT(max_tx_rings_check,
|
||||
MAX_TCL_DATA_RINGS == CDP_MAX_TX_COMP_RINGS);
|
||||
|
||||
#define dp_init_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_DP_INIT, params)
|
||||
#define dp_init_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_DP_INIT, params)
|
||||
#define dp_init_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_DP_INIT, params)
|
||||
@@ -1291,7 +1297,7 @@ uint8_t *dp_srng_get_near_full_irq_mask(struct dp_soc *soc,
|
||||
|
||||
switch (ring_type) {
|
||||
case WBM2SW_RELEASE:
|
||||
if (ring_num < 3) {
|
||||
if (ring_num != WBM2SW_REL_ERR_RING_NUM) {
|
||||
nf_irq_mask = &soc->wlan_cfg_ctx->
|
||||
int_tx_ring_near_full_irq_mask[0];
|
||||
}
|
||||
@@ -1471,28 +1477,23 @@ static int dp_srng_calculate_msi_group(struct dp_soc *soc,
|
||||
bool nf_irq_support,
|
||||
int *nf_msi_grp_num)
|
||||
{
|
||||
struct wlan_cfg_dp_soc_ctxt *cfg_ctx = soc->wlan_cfg_ctx;
|
||||
uint8_t *grp_mask, *nf_irq_mask = NULL;
|
||||
bool nf_irq_enabled = false;
|
||||
|
||||
switch (ring_type) {
|
||||
case WBM2SW_RELEASE:
|
||||
/* dp_tx_comp_handler - soc->tx_comp_ring */
|
||||
if (ring_num < 3) {
|
||||
if (ring_num == WBM2SW_REL_ERR_RING_NUM) {
|
||||
/* dp_rx_wbm_err_process - soc->rx_rel_ring */
|
||||
grp_mask = &cfg_ctx->int_rx_wbm_rel_ring_mask[0];
|
||||
ring_num = 0;
|
||||
} else { /* dp_tx_comp_handler - soc->tx_comp_ring */
|
||||
grp_mask = &soc->wlan_cfg_ctx->int_tx_ring_mask[0];
|
||||
nf_irq_mask = dp_srng_get_near_full_irq_mask(soc,
|
||||
ring_type,
|
||||
ring_num);
|
||||
if (nf_irq_mask)
|
||||
nf_irq_enabled = true;
|
||||
/* dp_rx_wbm_err_process - soc->rx_rel_ring */
|
||||
} else if (ring_num == 3) {
|
||||
/* sw treats this as a separate ring type */
|
||||
grp_mask = &soc->wlan_cfg_ctx->
|
||||
int_rx_wbm_rel_ring_mask[0];
|
||||
ring_num = 0;
|
||||
} else {
|
||||
qdf_assert(0);
|
||||
return -QDF_STATUS_E_NOENT;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1676,6 +1677,10 @@ static void dp_srng_msi_setup(struct dp_soc *soc, struct hal_srng_params
|
||||
+ msi_data_start;
|
||||
ring_params->flags |= HAL_SRNG_MSI_INTR;
|
||||
|
||||
dp_debug("ring type %u ring_num %u msi->data %u msi_addr %llx",
|
||||
ring_type, ring_num, ring_params->msi_data,
|
||||
(uint64_t)ring_params->msi_addr);
|
||||
|
||||
configure_msi2:
|
||||
if (!nf_irq_support) {
|
||||
dp_srng_set_msi2_ring_params(soc, ring_params, 0, 0);
|
||||
@@ -3189,6 +3194,9 @@ static QDF_STATUS dp_soc_interrupt_attach(struct cdp_soc_t *txrx_soc)
|
||||
QCA_NAPI_DEF_SCALE_BIN_SHIFT);
|
||||
}
|
||||
|
||||
dp_debug(" int ctx %u num_irq %u irq_id_map %u %u",
|
||||
i, num_irq, irq_id_map[0], irq_id_map[1]);
|
||||
|
||||
if (ret) {
|
||||
dp_init_err("%pK: failed, ret = %d", soc, ret);
|
||||
|
||||
@@ -3677,15 +3685,6 @@ void dp_link_desc_ring_replenish(struct dp_soc *soc, uint32_t mac_id)
|
||||
#endif /* CONFIG_WIFI_EMULATION_WIFI_3_0 */
|
||||
|
||||
#ifdef IPA_WDI3_TX_TWO_PIPES
|
||||
static int dp_ipa_get_tx_alt_comp_ring_num(int ring_num)
|
||||
{
|
||||
/* IPA alternate TX comp ring for 2G is WBM2SW4 */
|
||||
if (ring_num == IPA_TX_ALT_COMP_RING_IDX)
|
||||
ring_num = 4;
|
||||
|
||||
return ring_num;
|
||||
}
|
||||
|
||||
#ifdef DP_MEMORY_OPT
|
||||
static int dp_ipa_init_alt_tx_ring(struct dp_soc *soc)
|
||||
{
|
||||
@@ -3734,11 +3733,6 @@ static void dp_ipa_hal_tx_init_alt_data_ring(struct dp_soc *soc)
|
||||
}
|
||||
|
||||
#else /* !IPA_WDI3_TX_TWO_PIPES */
|
||||
static int dp_ipa_get_tx_alt_comp_ring_num(int ring_num)
|
||||
{
|
||||
return ring_num;
|
||||
}
|
||||
|
||||
static int dp_ipa_init_alt_tx_ring(struct dp_soc *soc)
|
||||
{
|
||||
return 0;
|
||||
@@ -3792,11 +3786,6 @@ static void dp_ipa_free_alt_tx_ring(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
|
||||
static int dp_ipa_get_tx_alt_comp_ring_num(int ring_num)
|
||||
{
|
||||
return ring_num;
|
||||
}
|
||||
|
||||
static void dp_ipa_hal_tx_init_alt_data_ring(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
@@ -4376,31 +4365,66 @@ static inline void dp_create_ext_stats_event(struct dp_soc *soc)
|
||||
|
||||
static void dp_deinit_tx_pair_by_index(struct dp_soc *soc, int index)
|
||||
{
|
||||
int ring_num;
|
||||
int tcl_ring_num, wbm_ring_num;
|
||||
|
||||
wlan_cfg_get_tcl_wbm_ring_num_for_index(index,
|
||||
&tcl_ring_num,
|
||||
&wbm_ring_num);
|
||||
|
||||
if (tcl_ring_num == -1 || wbm_ring_num == -1) {
|
||||
dp_err("incorrect tcl/wbm ring num for index %u", index);
|
||||
return;
|
||||
}
|
||||
|
||||
wlan_minidump_remove(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");
|
||||
dp_srng_deinit(soc, &soc->tcl_data_ring[index], TCL_DATA, index);
|
||||
dp_info("index %u tcl %u wbm %u", index, tcl_ring_num, wbm_ring_num);
|
||||
dp_srng_deinit(soc, &soc->tcl_data_ring[index], TCL_DATA,
|
||||
tcl_ring_num);
|
||||
|
||||
wlan_minidump_remove(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");
|
||||
ring_num = dp_ipa_get_tx_alt_comp_ring_num(index);
|
||||
dp_srng_deinit(soc, &soc->tx_comp_ring[index], WBM2SW_RELEASE,
|
||||
ring_num);
|
||||
wbm_ring_num);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_init_tx_ring_pair_by_index() - The function inits tcl data/wbm completion
|
||||
* ring pair
|
||||
* @soc: DP soc pointer
|
||||
* @index: index of soc->tcl_data or soc->tx_comp to initialize
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error code otherwise.
|
||||
*/
|
||||
static QDF_STATUS dp_init_tx_ring_pair_by_index(struct dp_soc *soc,
|
||||
uint8_t index)
|
||||
{
|
||||
int ring_num;
|
||||
int tcl_ring_num, wbm_ring_num;
|
||||
|
||||
if (dp_srng_init(soc, &soc->tcl_data_ring[index], TCL_DATA, index, 0)) {
|
||||
if (index >= MAX_TCL_DATA_RINGS) {
|
||||
dp_err("unexpected index!");
|
||||
QDF_BUG(0);
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
wlan_cfg_get_tcl_wbm_ring_num_for_index(index,
|
||||
&tcl_ring_num,
|
||||
&wbm_ring_num);
|
||||
|
||||
if (tcl_ring_num == -1 || wbm_ring_num == -1) {
|
||||
dp_err("incorrect tcl/wbm ring num for index %u", index);
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
dp_info("index %u tcl %u wbm %u", index, tcl_ring_num, wbm_ring_num);
|
||||
if (dp_srng_init(soc, &soc->tcl_data_ring[index], TCL_DATA,
|
||||
tcl_ring_num, 0)) {
|
||||
dp_err("dp_srng_init failed for tcl_data_ring");
|
||||
goto fail1;
|
||||
}
|
||||
@@ -4410,9 +4434,8 @@ static QDF_STATUS dp_init_tx_ring_pair_by_index(struct dp_soc *soc,
|
||||
WLAN_MD_DP_SRNG_TCL_DATA,
|
||||
"tcl_data_ring");
|
||||
|
||||
ring_num = dp_ipa_get_tx_alt_comp_ring_num(index);
|
||||
if (dp_srng_init(soc, &soc->tx_comp_ring[index], WBM2SW_RELEASE,
|
||||
ring_num, 0)) {
|
||||
wbm_ring_num, 0)) {
|
||||
dp_err("dp_srng_init failed for tx_comp_ring");
|
||||
goto fail1;
|
||||
}
|
||||
@@ -4430,10 +4453,19 @@ fail1:
|
||||
|
||||
static void dp_free_tx_ring_pair_by_index(struct dp_soc *soc, uint8_t index)
|
||||
{
|
||||
dp_debug("index %u", index);
|
||||
dp_srng_free(soc, &soc->tcl_data_ring[index]);
|
||||
dp_srng_free(soc, &soc->tx_comp_ring[index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_alloc_tx_ring_pair_by_index() - The function allocs tcl data/wbm2sw
|
||||
* ring pair for the given "index"
|
||||
* @soc: DP soc pointer
|
||||
* @index: index of soc->tcl_data or soc->tx_comp to initialize
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error code otherwise.
|
||||
*/
|
||||
static QDF_STATUS dp_alloc_tx_ring_pair_by_index(struct dp_soc *soc,
|
||||
uint8_t index)
|
||||
{
|
||||
@@ -4442,6 +4474,13 @@ static QDF_STATUS dp_alloc_tx_ring_pair_by_index(struct dp_soc *soc,
|
||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
int cached = 0;
|
||||
|
||||
if (index >= MAX_TCL_DATA_RINGS) {
|
||||
dp_err("unexpected index!");
|
||||
QDF_BUG(0);
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
dp_debug("index %u", index);
|
||||
tx_ring_size = wlan_cfg_tx_ring_size(soc_cfg_ctx);
|
||||
dp_ipa_get_tx_ring_size(index, &tx_ring_size, soc_cfg_ctx);
|
||||
|
||||
@@ -13284,6 +13323,7 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
|
||||
dp_init_err("%pK: dp_interrupt assignment failed", soc);
|
||||
goto fail4;
|
||||
}
|
||||
|
||||
wlan_cfg_fill_interrupt_mask(soc->wlan_cfg_ctx, num_dp_msi,
|
||||
soc->intr_mode, is_monitor_mode);
|
||||
|
||||
@@ -14515,7 +14555,8 @@ static QDF_STATUS dp_soc_srng_init(struct dp_soc *soc)
|
||||
"reo_reinject_ring");
|
||||
|
||||
/* Rx release ring */
|
||||
if (dp_srng_init(soc, &soc->rx_rel_ring, WBM2SW_RELEASE, 3, 0)) {
|
||||
if (dp_srng_init(soc, &soc->rx_rel_ring, WBM2SW_RELEASE,
|
||||
WBM2SW_REL_ERR_RING_NUM, 0)) {
|
||||
dp_init_err("%pK: dp_srng_init failed for rx_rel_ring", soc);
|
||||
goto fail1;
|
||||
}
|
||||
|
@@ -6505,45 +6505,123 @@ dp_print_soc_tx_stats(struct dp_soc *soc)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
static
|
||||
int dp_fill_rx_interrupt_ctx_stats(struct dp_intr *intr_ctx,
|
||||
char *buf, int buf_len)
|
||||
{ int i;
|
||||
int pos = 0;
|
||||
|
||||
if (buf_len <= 0 || !buf) {
|
||||
dp_err("incorrect buf or buf_len(%d)!", buf_len);
|
||||
return pos;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_REO_DEST_RINGS; i++) {
|
||||
if (intr_ctx->intr_stats.num_rx_ring_masks[i])
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"reo[%u]:%u ", i,
|
||||
intr_ctx->intr_stats.num_rx_ring_masks[i]);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
static
|
||||
int dp_fill_tx_interrupt_ctx_stats(struct dp_intr *intr_ctx,
|
||||
char *buf, int buf_len)
|
||||
{ int i;
|
||||
int pos = 0;
|
||||
|
||||
if (buf_len <= 0 || !buf) {
|
||||
dp_err("incorrect buf or buf_len(%d)!", buf_len);
|
||||
return pos;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_TCL_DATA_RINGS; i++) {
|
||||
if (intr_ctx->intr_stats.num_tx_ring_masks[i])
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"tx_comps[%u]:%u ", i,
|
||||
intr_ctx->intr_stats.num_tx_ring_masks[i]);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
#define DP_INT_CTX_STATS_STRING_LEN 512
|
||||
void dp_print_soc_interrupt_stats(struct dp_soc *soc)
|
||||
{
|
||||
int i = 0;
|
||||
char *buf;
|
||||
char int_ctx_str[DP_INT_CTX_STATS_STRING_LEN] = {'\0'};
|
||||
int i, pos, buf_len;
|
||||
struct dp_intr_stats *intr_stats;
|
||||
|
||||
DP_PRINT_STATS(" INT: Total | txComps | reo[0] | reo[1] | reo[2] | reo[3] | reo[4] | reo[5] | reo[6] | reo[7] | mon | rx_err | wbm |reo_sta|rxdm2hst|hst2rxdm|");
|
||||
buf = int_ctx_str;
|
||||
buf_len = DP_INT_CTX_STATS_STRING_LEN;
|
||||
|
||||
for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
|
||||
pos = 0;
|
||||
qdf_mem_zero(int_ctx_str, sizeof(int_ctx_str));
|
||||
intr_stats = &soc->intr_ctx[i].intr_stats;
|
||||
DP_PRINT_STATS("%3u[%3d]: %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u %7u %7u %7u %8u %8u",
|
||||
i,
|
||||
hif_get_int_ctx_irq_num(soc->hif_handle, i),
|
||||
intr_stats->num_masks,
|
||||
intr_stats->num_near_full_masks,
|
||||
intr_stats->num_tx_ring_masks[0],
|
||||
intr_stats->num_tx_comp_ring_near_full_masks[0],
|
||||
intr_stats->num_rx_ring_masks[0],
|
||||
intr_stats->num_rx_ring_near_full_masks[0],
|
||||
intr_stats->num_rx_ring_masks[1],
|
||||
intr_stats->num_rx_ring_near_full_masks[1],
|
||||
intr_stats->num_rx_ring_masks[2],
|
||||
intr_stats->num_rx_ring_near_full_masks[2],
|
||||
intr_stats->num_rx_ring_masks[3],
|
||||
intr_stats->num_rx_ring_near_full_masks[3],
|
||||
intr_stats->num_rx_ring_masks[4],
|
||||
intr_stats->num_rx_ring_near_full_masks[4],
|
||||
intr_stats->num_rx_ring_masks[5],
|
||||
intr_stats->num_rx_ring_near_full_masks[5],
|
||||
intr_stats->num_rx_ring_masks[6],
|
||||
intr_stats->num_rx_ring_near_full_masks[6],
|
||||
intr_stats->num_rx_ring_masks[7],
|
||||
intr_stats->num_rx_ring_near_full_masks[7],
|
||||
intr_stats->num_rx_mon_ring_masks,
|
||||
intr_stats->num_rx_err_ring_masks,
|
||||
intr_stats->num_rx_wbm_rel_ring_masks,
|
||||
intr_stats->num_reo_status_ring_masks,
|
||||
intr_stats->num_rxdma2host_ring_masks,
|
||||
intr_stats->num_host2rxdma_ring_masks);
|
||||
}
|
||||
|
||||
if (!intr_stats->num_masks)
|
||||
continue;
|
||||
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"%2u[%3d] - Total:%u ",
|
||||
i,
|
||||
hif_get_int_ctx_irq_num(soc->hif_handle,
|
||||
i),
|
||||
intr_stats->num_masks);
|
||||
|
||||
if (soc->intr_ctx[i].tx_ring_mask)
|
||||
pos += dp_fill_tx_interrupt_ctx_stats(&soc->intr_ctx[i],
|
||||
buf + pos,
|
||||
buf_len - pos);
|
||||
|
||||
if (soc->intr_ctx[i].rx_ring_mask)
|
||||
pos += dp_fill_rx_interrupt_ctx_stats(&soc->intr_ctx[i],
|
||||
buf + pos,
|
||||
buf_len - pos);
|
||||
if (soc->intr_ctx[i].rx_err_ring_mask)
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"reo_err:%u ",
|
||||
intr_stats->num_rx_err_ring_masks);
|
||||
|
||||
if (soc->intr_ctx[i].rx_wbm_rel_ring_mask)
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"wbm_rx_err:%u ",
|
||||
intr_stats->num_rx_wbm_rel_ring_masks);
|
||||
|
||||
if (soc->intr_ctx[i].rxdma2host_ring_mask)
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"rxdma2_host_err:%u ",
|
||||
intr_stats->num_rxdma2host_ring_masks);
|
||||
|
||||
if (soc->intr_ctx[i].rx_near_full_grp_1_mask)
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"rx_near_full_grp_1:%u ",
|
||||
intr_stats->num_near_full_masks);
|
||||
|
||||
if (soc->intr_ctx[i].rx_near_full_grp_2_mask)
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"rx_near_full_grp_2:%u ",
|
||||
intr_stats->num_near_full_masks);
|
||||
if (soc->intr_ctx[i].tx_ring_near_full_mask)
|
||||
pos += qdf_scnprintf(buf + pos,
|
||||
buf_len - pos,
|
||||
"tx_near_full:%u ",
|
||||
intr_stats->num_near_full_masks);
|
||||
|
||||
dp_info("%s", int_ctx_str);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
void dp_print_soc_interrupt_stats(struct dp_soc *soc)
|
||||
{
|
||||
|
@@ -4145,6 +4145,7 @@ dp_tx_comp_process_desc_list(struct dp_soc *soc,
|
||||
peer = dp_peer_get_ref_by_id(soc, peer_id,
|
||||
DP_MOD_ID_TX_COMP);
|
||||
}
|
||||
|
||||
if (qdf_likely(desc->flags & DP_TX_DESC_FLAG_SIMPLE)) {
|
||||
struct dp_pdev *pdev = desc->pdev;
|
||||
|
||||
|
@@ -433,6 +433,7 @@ static inline void dp_tx_get_queue(struct dp_vdev *vdev,
|
||||
|
||||
dp_tx_debug("pool_id:%d ring_id: %d",
|
||||
queue->desc_pool_id, queue->ring_id);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -451,21 +452,8 @@ static inline hal_ring_handle_t dp_tx_get_hal_ring_hdl(struct dp_soc *soc,
|
||||
return soc->tcl_data_ring[ring_id].hal_srng;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_tx_get_rbm_id()- Get the RBM ID for data transmission completion.
|
||||
* @dp_soc - DP soc structure pointer
|
||||
* @ring_id - Transmit Queue/ring_id to be used when XPS is enabled
|
||||
*
|
||||
* Return - HAL ring handle
|
||||
*/
|
||||
static inline uint8_t dp_tx_get_rbm_id(struct dp_soc *soc,
|
||||
uint8_t ring_id)
|
||||
{
|
||||
return (ring_id ? soc->wbm_sw0_bm_id + (ring_id - 1) :
|
||||
HAL_WBM_SW2_BM_ID(soc->wbm_sw0_bm_id));
|
||||
}
|
||||
|
||||
#else /* QCA_OL_TX_MULTIQ_SUPPORT */
|
||||
|
||||
static inline void dp_tx_get_queue(struct dp_vdev *vdev,
|
||||
qdf_nbuf_t nbuf, struct dp_tx_queue *queue)
|
||||
{
|
||||
@@ -473,8 +461,8 @@ static inline void dp_tx_get_queue(struct dp_vdev *vdev,
|
||||
queue->desc_pool_id = DP_TX_GET_DESC_POOL_ID(vdev);
|
||||
queue->ring_id = DP_TX_GET_RING_ID(vdev);
|
||||
|
||||
dp_tx_debug("pool_id:%d ring_id: %d",
|
||||
queue->desc_pool_id, queue->ring_id);
|
||||
dp_tx_debug("pool_id:%d ring_id: %d skb %pK ",
|
||||
queue->desc_pool_id, queue->ring_id, nbuf);
|
||||
}
|
||||
|
||||
static inline hal_ring_handle_t dp_tx_get_hal_ring_hdl(struct dp_soc *soc,
|
||||
@@ -482,12 +470,6 @@ static inline hal_ring_handle_t dp_tx_get_hal_ring_hdl(struct dp_soc *soc,
|
||||
{
|
||||
return soc->tcl_data_ring[ring_id].hal_srng;
|
||||
}
|
||||
|
||||
static inline uint8_t dp_tx_get_rbm_id(struct dp_soc *soc,
|
||||
uint8_t ring_id)
|
||||
{
|
||||
return (ring_id + soc->wbm_sw0_bm_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QCA_OL_TX_LOCK_LESS_ACCESS
|
||||
|
@@ -97,13 +97,8 @@
|
||||
|
||||
#define MAX_TXDESC_POOLS 4
|
||||
#define MAX_RXDESC_POOLS 4
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#define MAX_REO_DEST_RINGS 8
|
||||
#else
|
||||
#define MAX_REO_DEST_RINGS 4
|
||||
#endif
|
||||
|
||||
#define EXCEPTION_DEST_RING_ID 0
|
||||
#define MAX_TCL_DATA_RINGS 4
|
||||
#define MAX_IDLE_SCATTER_BUFS 16
|
||||
#define DP_MAX_IRQ_PER_CONTEXT 12
|
||||
#define DEFAULT_HW_PEER_ID 0xffff
|
||||
@@ -829,8 +824,8 @@ struct dp_intr_stats {
|
||||
uint32_t num_tx_comp_ring_near_full_masks[MAX_TCL_DATA_RINGS];
|
||||
uint32_t num_rx_wbm_rel_ring_near_full_masks;
|
||||
uint32_t num_reo_status_ring_near_full_masks;
|
||||
uint32_t num_masks;
|
||||
uint32_t num_near_full_masks;
|
||||
uint32_t num_masks;
|
||||
};
|
||||
|
||||
/* per interrupt context */
|
||||
|
@@ -66,6 +66,29 @@ void dp_tx_comp_get_params_from_hal_desc_li(struct dp_soc *soc,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QCA_OL_TX_MULTIQ_SUPPORT
|
||||
/*
|
||||
* dp_tx_get_rbm_id()- Get the RBM ID for data transmission completion.
|
||||
* @dp_soc - DP soc structure pointer
|
||||
* @ring_id - Transmit Queue/ring_id to be used when XPS is enabled
|
||||
*
|
||||
* Return - HAL ring handle
|
||||
*/
|
||||
static inline uint8_t dp_tx_get_rbm_id_li(struct dp_soc *soc,
|
||||
uint8_t ring_id)
|
||||
{
|
||||
return (ring_id ? soc->wbm_sw0_bm_id + (ring_id - 1) :
|
||||
HAL_WBM_SW2_BM_ID(soc->wbm_sw0_bm_id));
|
||||
}
|
||||
|
||||
#else
|
||||
static inline uint8_t dp_tx_get_rbm_id_li(struct dp_soc *soc,
|
||||
uint8_t ring_id)
|
||||
{
|
||||
return (ring_id + soc->wbm_sw0_bm_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
|
||||
@@ -90,7 +113,7 @@ dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
tx_exc_metadata->sec_type : vdev->sec_type);
|
||||
|
||||
/* Return Buffer Manager ID */
|
||||
uint8_t bm_id = dp_tx_get_rbm_id(soc, ring_id);
|
||||
uint8_t bm_id = dp_tx_get_rbm_id_li(soc, ring_id);
|
||||
|
||||
hal_ring_handle_t hal_ring_hdl = NULL;
|
||||
|
||||
|
@@ -1619,7 +1619,7 @@ struct hal_hw_srng_config hw_srng_table_7850[] = {
|
||||
},
|
||||
{ /* TCL_DATA */
|
||||
.start_ring_id = HAL_SRNG_SW2TCL1,
|
||||
.max_rings = 3,
|
||||
.max_rings = 5,
|
||||
.entry_size = sizeof(struct tcl_data_cmd) >> 2,
|
||||
.lmac_ring = FALSE,
|
||||
.ring_dir = HAL_SRNG_SRC_RING,
|
||||
@@ -1782,7 +1782,7 @@ struct hal_hw_srng_config hw_srng_table_7850[] = {
|
||||
},
|
||||
{ /* WBM2SW_RELEASE */
|
||||
.start_ring_id = HAL_SRNG_WBM2SW0_RELEASE,
|
||||
.max_rings = 4,
|
||||
.max_rings = 7,
|
||||
.entry_size = sizeof(struct wbm_release_ring) >> 2,
|
||||
.lmac_ring = FALSE,
|
||||
.ring_dir = HAL_SRNG_DST_RING,
|
||||
|
@@ -40,6 +40,8 @@ extern "C" {
|
||||
#endif
|
||||
#include "cfg_ucfg_api.h"
|
||||
#include "qdf_dev.h"
|
||||
#include <wlan_init_cfg.h>
|
||||
|
||||
#define ENABLE_MBOX_DUMMY_SPACE_FEATURE 1
|
||||
|
||||
typedef void __iomem *A_target_id_t;
|
||||
@@ -133,13 +135,13 @@ struct CE_state;
|
||||
#endif
|
||||
|
||||
#ifndef HIF_MAX_GROUP
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#define HIF_MAX_GROUP 14
|
||||
#define HIF_MAX_GRP_IRQ 23
|
||||
#else
|
||||
#define HIF_MAX_GROUP 7
|
||||
#define HIF_MAX_GRP_IRQ 16
|
||||
#define HIF_MAX_GROUP WLAN_CFG_INT_NUM_CONTEXTS
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#define HIF_MAX_GRP_IRQ 25
|
||||
#else
|
||||
#define HIF_MAX_GRP_IRQ 16
|
||||
#endif
|
||||
|
||||
#ifndef NAPI_YIELD_BUDGET_BASED
|
||||
@@ -365,11 +367,12 @@ enum hif_system_pm_state {
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_DP_EVENT_HISTORY
|
||||
#define HIF_NUM_INT_CONTEXTS HIF_MAX_GROUP
|
||||
|
||||
#if defined(HIF_CONFIG_SLUB_DEBUG_ON) || defined(HIF_CE_DEBUG_DATA_BUF)
|
||||
/* HIF_EVENT_HIST_MAX should always be power of 2 */
|
||||
#define HIF_EVENT_HIST_MAX 512
|
||||
#define HIF_NUM_INT_CONTEXTS HIF_MAX_GROUP
|
||||
|
||||
#define HIF_EVENT_HIST_ENABLE_MASK 0x3F
|
||||
|
||||
static inline uint64_t hif_get_log_timestamp(void)
|
||||
@@ -380,7 +383,6 @@ static inline uint64_t hif_get_log_timestamp(void)
|
||||
#else
|
||||
|
||||
#define HIF_EVENT_HIST_MAX 32
|
||||
#define HIF_NUM_INT_CONTEXTS HIF_MAX_GROUP
|
||||
/* Enable IRQ TRIGGER, NAPI SCHEDULE, SRNG ACCESS START */
|
||||
#define HIF_EVENT_HIST_ENABLE_MASK 0x19
|
||||
|
||||
|
@@ -1458,8 +1458,12 @@ static struct CE_attr host_ce_config_wlan_wcn7850[] = {
|
||||
/* host->target HTT */
|
||||
{ /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
|
||||
256, 256, 0, NULL,},
|
||||
#ifdef FEATURE_PKTLOG
|
||||
/* target -> host PKTLOG */
|
||||
{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
|
||||
#else
|
||||
{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 0, NULL,},
|
||||
#endif
|
||||
/* Target autonomous HIF_memcpy */
|
||||
{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
|
||||
/* ce_diag, the Diagnostic Window */
|
||||
|
@@ -405,7 +405,7 @@ void hif_print_napi_stats(struct hif_opaque_softc *hif_ctx)
|
||||
*/
|
||||
char hist_str[(QCA_NAPI_NUM_BUCKETS * 11) + 1] = {'\0'};
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_ERROR,
|
||||
QDF_TRACE(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"NAPI[#]CPU[#] |scheds |polls |comps |dones |t-lim |max(us)|hist(500us buckets)");
|
||||
|
||||
for (i = 0;
|
||||
@@ -421,7 +421,7 @@ void hif_print_napi_stats(struct hif_opaque_softc *hif_ctx)
|
||||
hist_str,
|
||||
sizeof(hist_str));
|
||||
QDF_TRACE(QDF_MODULE_ID_HIF,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"NAPI[%d]CPU[%d]: %7u %7u %7u %7u %7u %7llu %s",
|
||||
i, j,
|
||||
napi_stats->napi_schedules,
|
||||
|
@@ -653,8 +653,6 @@ int hif_configure_irq(struct hif_softc *scn)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
hif_info("E");
|
||||
|
||||
if (hif_is_polled_mode_enabled(GET_HIF_OPAQUE_HDL(scn))) {
|
||||
scn->request_irq_done = false;
|
||||
return 0;
|
||||
|
@@ -77,88 +77,9 @@
|
||||
#else
|
||||
#define WLAN_CFG_MAX_CE_COUNT 12
|
||||
#endif
|
||||
|
||||
const char *dp_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
{
|
||||
"pci0_wlan_grp_dp_0",
|
||||
"pci0_wlan_grp_dp_1",
|
||||
"pci0_wlan_grp_dp_2",
|
||||
"pci0_wlan_grp_dp_3",
|
||||
"pci0_wlan_grp_dp_4",
|
||||
"pci0_wlan_grp_dp_5",
|
||||
"pci0_wlan_grp_dp_6",
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
"pci0_wlan_grp_dp_7",
|
||||
"pci0_wlan_grp_dp_8",
|
||||
"pci0_wlan_grp_dp_9",
|
||||
"pci0_wlan_grp_dp_10",
|
||||
#endif
|
||||
#if !defined(WLAN_MAX_PDEVS)
|
||||
"pci0_wlan_grp_dp_7",
|
||||
"pci0_wlan_grp_dp_8",
|
||||
"pci0_wlan_grp_dp_9",
|
||||
"pci0_wlan_grp_dp_10",
|
||||
#endif
|
||||
},
|
||||
{
|
||||
"pci1_wlan_grp_dp_0",
|
||||
"pci1_wlan_grp_dp_1",
|
||||
"pci1_wlan_grp_dp_2",
|
||||
"pci1_wlan_grp_dp_3",
|
||||
"pci1_wlan_grp_dp_4",
|
||||
"pci1_wlan_grp_dp_5",
|
||||
"pci1_wlan_grp_dp_6",
|
||||
#if !defined(WLAN_MAX_PDEVS)
|
||||
"pci1_wlan_grp_dp_7",
|
||||
"pci1_wlan_grp_dp_8",
|
||||
"pci1_wlan_grp_dp_9",
|
||||
"pci1_wlan_grp_dp_10",
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
const char *ce_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_MAX_CE_COUNT] = {
|
||||
{
|
||||
"pci0_wlan_ce_0",
|
||||
"pci0_wlan_ce_1",
|
||||
"pci0_wlan_ce_2",
|
||||
"pci0_wlan_ce_3",
|
||||
"pci0_wlan_ce_4",
|
||||
"pci0_wlan_ce_5",
|
||||
"pci0_wlan_ce_6",
|
||||
"pci0_wlan_ce_7",
|
||||
"pci0_wlan_ce_8",
|
||||
"pci0_wlan_ce_9",
|
||||
"pci0_wlan_ce_10",
|
||||
"pci0_wlan_ce_11",
|
||||
#ifdef QCA_WIFI_QCN9224
|
||||
"pci0_wlan_ce_12",
|
||||
"pci0_wlan_ce_13",
|
||||
"pci0_wlan_ce_14",
|
||||
"pci0_wlan_ce_15",
|
||||
#endif
|
||||
},
|
||||
{
|
||||
"pci1_wlan_ce_0",
|
||||
"pci1_wlan_ce_1",
|
||||
"pci1_wlan_ce_2",
|
||||
"pci1_wlan_ce_3",
|
||||
"pci1_wlan_ce_4",
|
||||
"pci1_wlan_ce_5",
|
||||
"pci1_wlan_ce_6",
|
||||
"pci1_wlan_ce_7",
|
||||
"pci1_wlan_ce_8",
|
||||
"pci1_wlan_ce_9",
|
||||
"pci1_wlan_ce_10",
|
||||
"pci1_wlan_ce_11",
|
||||
#ifdef QCA_WIFI_QCN9224
|
||||
"pci0_wlan_ce_12",
|
||||
"pci0_wlan_ce_13",
|
||||
"pci0_wlan_ce_14",
|
||||
"pci0_wlan_ce_15",
|
||||
#endif
|
||||
}
|
||||
};
|
||||
#define DP_IRQ_NAME_LEN 25
|
||||
char dp_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_INT_NUM_CONTEXTS][DP_IRQ_NAME_LEN] = {};
|
||||
char ce_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_MAX_CE_COUNT][DP_IRQ_NAME_LEN] = {};
|
||||
|
||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||
static inline int hif_get_pci_slot(struct hif_softc *scn)
|
||||
@@ -2898,6 +2819,11 @@ int hif_ce_msi_configure_irq_by_ceid(struct hif_softc *scn, int ce_id)
|
||||
goto skip;
|
||||
|
||||
pci_sc->ce_msi_irq_num[ce_id] = irq;
|
||||
|
||||
qdf_scnprintf(ce_irqname[pci_slot][ce_id],
|
||||
DP_IRQ_NAME_LEN, "pci%u_wlan_ce_%u",
|
||||
pci_slot, ce_id);
|
||||
|
||||
ret = pfrm_request_irq(scn->qdf_dev->dev,
|
||||
irq, hif_ce_interrupt_handler, IRQF_SHARED,
|
||||
ce_irqname[pci_slot][ce_id],
|
||||
@@ -3172,6 +3098,10 @@ int hif_pci_configure_grp_irq(struct hif_softc *scn,
|
||||
|
||||
hif_debug("request_irq = %d for grp %d",
|
||||
irq, hif_ext_group->grp_id);
|
||||
|
||||
qdf_scnprintf(dp_irqname[pci_slot][hif_ext_group->grp_id],
|
||||
DP_IRQ_NAME_LEN, "pci%u_wlan_grp_dp_%u",
|
||||
pci_slot, hif_ext_group->grp_id);
|
||||
ret = pfrm_request_irq(
|
||||
scn->qdf_dev->dev, irq,
|
||||
hif_ext_group_interrupt_handler,
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#define _CFG_DP_H_
|
||||
|
||||
#include "cfg_define.h"
|
||||
#include "wlan_init_cfg.h"
|
||||
|
||||
#define WLAN_CFG_MAX_CLIENTS 64
|
||||
#define WLAN_CFG_MAX_CLIENTS_MIN 8
|
||||
@@ -225,7 +226,7 @@
|
||||
|
||||
#define WLAN_CFG_NUM_TCL_DATA_RINGS 3
|
||||
#define WLAN_CFG_NUM_TCL_DATA_RINGS_MIN 3
|
||||
#define WLAN_CFG_NUM_TCL_DATA_RINGS_MAX 5
|
||||
#define WLAN_CFG_NUM_TCL_DATA_RINGS_MAX MAX_TCL_DATA_RINGS
|
||||
|
||||
#if defined(CONFIG_BERYLLIUM)
|
||||
#define WLAN_CFG_NUM_REO_DEST_RING 8
|
||||
@@ -233,7 +234,7 @@
|
||||
#define WLAN_CFG_NUM_REO_DEST_RING 4
|
||||
#endif
|
||||
#define WLAN_CFG_NUM_REO_DEST_RING_MIN 4
|
||||
#define WLAN_CFG_NUM_REO_DEST_RING_MAX 8
|
||||
#define WLAN_CFG_NUM_REO_DEST_RING_MAX MAX_REO_DEST_RINGS
|
||||
|
||||
#define WLAN_CFG_NSS_NUM_TCL_DATA_RINGS 2
|
||||
#define WLAN_CFG_NSS_NUM_TCL_DATA_RINGS_MIN 1
|
||||
|
@@ -30,24 +30,21 @@
|
||||
#include "hal_api.h"
|
||||
#include "dp_types.h"
|
||||
|
||||
/*
|
||||
* FIX THIS -
|
||||
* For now, all these configuration parameters are hardcoded.
|
||||
* Many of these should actually be coming from dts file/ini file
|
||||
*/
|
||||
|
||||
/*
|
||||
* The max allowed size for tx comp ring is 8191.
|
||||
* This is limitted by h/w ring max size.
|
||||
* This is limited by h/w ring max size.
|
||||
* As this is not a power of 2 it does not work with nss offload so the
|
||||
* nearest available size which is power of 2 is 4096 chosen for nss
|
||||
*/
|
||||
|
||||
#define WLAN_CFG_TX_RING_MASK_0 0x1
|
||||
#define WLAN_CFG_TX_RING_MASK_1 0x2
|
||||
#define WLAN_CFG_TX_RING_MASK_2 0x4
|
||||
#define WLAN_CFG_TX_RING_MASK_3 0x0
|
||||
|
||||
#define WLAN_CFG_TX_RING_MASK_0 BIT(0)
|
||||
#define WLAN_CFG_TX_RING_MASK_1 BIT(1)
|
||||
#define WLAN_CFG_TX_RING_MASK_2 BIT(2)
|
||||
#define WLAN_CFG_TX_RING_MASK_3 0
|
||||
#define WLAN_CFG_TX_RING_MASK_4 BIT(4)
|
||||
#define WLAN_CFG_TX_RING_MASK_5 BIT(5)
|
||||
#define WLAN_CFG_TX_RING_MASK_6 BIT(6)
|
||||
|
||||
#define WLAN_CFG_RX_MON_RING_MASK_0 0x1
|
||||
#define WLAN_CFG_RX_MON_RING_MASK_1 0x2
|
||||
@@ -104,105 +101,143 @@ struct dp_int_mask_assignment {
|
||||
};
|
||||
|
||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||
#define NUM_INTERRUPT_COMBINATIONS 1
|
||||
/*
|
||||
* This structure contains the best possible mask assignment for a given
|
||||
* number of MSIs available in the system.
|
||||
* For BE, there are 18 available MSI interrupts, assigned in the manner
|
||||
* below.
|
||||
* TX(5) + RX(8) + (REO ERR + WBM ERR)(1) +
|
||||
* (REO status + RXDMA[0] + RXDMA[1])(1) + NEAR_Full_RX(2) + NEAR_Full_TX(1)
|
||||
* For IPA_OFFLOAD enabled case, 2 TX/RX rings would be assigned to IPA.
|
||||
*/
|
||||
static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = {
|
||||
/*Default configuration */
|
||||
{
|
||||
/* tx ring masks */
|
||||
{ WLAN_CFG_TX_RING_MASK_0,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
/* rx ring masks */
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#ifdef IPA_OFFLOAD
|
||||
{ 0,
|
||||
WLAN_CFG_RX_RING_MASK_0,
|
||||
WLAN_CFG_RX_RING_MASK_1,
|
||||
WLAN_CFG_RX_RING_MASK_2, 0, 0, 0,
|
||||
WLAN_CFG_RX_RING_MASK_4,
|
||||
WLAN_CFG_RX_RING_MASK_5,
|
||||
WLAN_CFG_RX_RING_MASK_6,
|
||||
0},
|
||||
#else /* IPA_OFFLOAD */
|
||||
{ 0,
|
||||
WLAN_CFG_RX_RING_MASK_0,
|
||||
WLAN_CFG_RX_RING_MASK_1,
|
||||
WLAN_CFG_RX_RING_MASK_2,
|
||||
WLAN_CFG_RX_RING_MASK_3,
|
||||
0, 0,
|
||||
WLAN_CFG_RX_RING_MASK_4,
|
||||
WLAN_CFG_RX_RING_MASK_5,
|
||||
WLAN_CFG_RX_RING_MASK_6,
|
||||
0},
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#else /* CONFIG_BERYLLIUM */
|
||||
#ifdef IPA_OFFLOAD
|
||||
{ 0,
|
||||
WLAN_CFG_RX_RING_MASK_0,
|
||||
WLAN_CFG_RX_RING_MASK_1,
|
||||
WLAN_CFG_RX_RING_MASK_2,
|
||||
0, 0, 0},
|
||||
#else /* IPA_OFFLOAD */
|
||||
{ 0,
|
||||
WLAN_CFG_RX_RING_MASK_0,
|
||||
WLAN_CFG_RX_RING_MASK_1,
|
||||
WLAN_CFG_RX_RING_MASK_2,
|
||||
WLAN_CFG_RX_RING_MASK_3,
|
||||
0, 0},
|
||||
#endif /* IPA_OFFLOAD */
|
||||
static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_5,
|
||||
[2] = WLAN_CFG_TX_RING_MASK_6};
|
||||
#else
|
||||
static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
|
||||
[2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_5,
|
||||
[4] = WLAN_CFG_TX_RING_MASK_6};
|
||||
#endif
|
||||
#else
|
||||
static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
WLAN_CFG_TX_RING_MASK_0, 0, 0, 0, 0, 0, 0};
|
||||
#endif /* CONFIG_BERYLLIUM */
|
||||
|
||||
/* rx mon ring masks */
|
||||
{ 0,
|
||||
WLAN_CFG_RX_MON_RING_MASK_0,
|
||||
WLAN_CFG_RX_MON_RING_MASK_1,
|
||||
0, 0, 0, 0},
|
||||
/* host2rxdma ring masks */
|
||||
{ 0, 0, 0, 0, 0, 0, 0},
|
||||
/* rxdma2host ring masks */
|
||||
{ 0, 0, 0, 0, 0,
|
||||
WLAN_CFG_RXDMA2HOST_RING_MASK_0,
|
||||
WLAN_CFG_RXDMA2HOST_RING_MASK_1 },
|
||||
/* host2rxdma mon ring masks */
|
||||
{ 0, 0, 0, 0, 0, 0, 0},
|
||||
/* rxdma2host mon ring masks */
|
||||
{ 0, 0, 0, 0, 0, 0, 0},
|
||||
/* rx err ring masks */
|
||||
{ 0, 0, 0, 0, 0, 0,
|
||||
WLAN_CFG_RX_ERR_RING_MASK_0},
|
||||
/* rx wbm rel ring masks */
|
||||
{ 0, 0, 0, 0, 0, 0,
|
||||
WLAN_CFG_RX_WBM_REL_RING_MASK_0},
|
||||
/* reo status ring masks */
|
||||
{ 0, 0, 0, 0, 0, 0,
|
||||
WLAN_CFG_REO_STATUS_RING_MASK_0},
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
/* rx near full irq1 mask */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1,
|
||||
0, 0},
|
||||
/* rx near full irq2 mask */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,
|
||||
WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2,
|
||||
0},
|
||||
/* tx near full irq mask */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK},
|
||||
#else /* CONFIG_BERYLLIUM */
|
||||
/* rx near full irq1 mask */
|
||||
{ 0, 0, 0, 0, 0, 0, 0},
|
||||
/* rx near full irq2 mask */
|
||||
{ 0, 0, 0, 0, 0, 0, 0},
|
||||
/* tx near full irq mask */
|
||||
{ 0, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef IPA_OFFLOAD
|
||||
static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1,
|
||||
[7] = WLAN_CFG_RX_RING_MASK_2, [9] = WLAN_CFG_RX_RING_MASK_4,
|
||||
[10] = WLAN_CFG_RX_RING_MASK_5, [11] = WLAN_CFG_RX_RING_MASK_6};
|
||||
#else
|
||||
static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1,
|
||||
[7] = WLAN_CFG_RX_RING_MASK_2, [8] = WLAN_CFG_RX_RING_MASK_3,
|
||||
[9] = WLAN_CFG_RX_RING_MASK_4, [10] = WLAN_CFG_RX_RING_MASK_5,
|
||||
[11] = WLAN_CFG_RX_RING_MASK_6, [12] = WLAN_CFG_RX_RING_MASK_7};
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#else /* !defined(CONFIG_BERYLLIUM) */
|
||||
#ifdef IPA_OFFLOAD
|
||||
static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0, WLAN_CFG_RX_RING_MASK_0, WLAN_CFG_RX_RING_MASK_1,
|
||||
WLAN_CFG_RX_RING_MASK_2, 0, 0, 0};
|
||||
#else
|
||||
static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0, WLAN_CFG_RX_RING_MASK_0, WLAN_CFG_RX_RING_MASK_1,
|
||||
WLAN_CFG_RX_RING_MASK_2, WLAN_CFG_RX_RING_MASK_3, 0, 0};
|
||||
#endif
|
||||
#endif /* CONFIG_BERYLLIUM */
|
||||
},
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[13] = WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
|
||||
WLAN_CFG_RXDMA2HOST_RING_MASK_1};
|
||||
#else
|
||||
static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0, 0, 0, 0, 0, WLAN_CFG_RXDMA2HOST_RING_MASK_0,
|
||||
WLAN_CFG_RXDMA2HOST_RING_MASK_1};
|
||||
#endif /* CONFIG_BERYLLIUM */
|
||||
|
||||
static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[1] = WLAN_CFG_RX_MON_RING_MASK_0,
|
||||
[2] = WLAN_CFG_RX_MON_RING_MASK_1};
|
||||
|
||||
static const uint8_t host2rxdma_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
|
||||
|
||||
static const uint8_t host2rxdma_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
|
||||
|
||||
static const uint8_t rxdma2host_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[14] = WLAN_CFG_RX_ERR_RING_MASK_0};
|
||||
|
||||
static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[14] = WLAN_CFG_RX_WBM_REL_RING_MASK_0};
|
||||
|
||||
static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[13] = WLAN_CFG_REO_STATUS_RING_MASK_0};
|
||||
#else
|
||||
static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0, 0, 0, 0, 0, 0, WLAN_CFG_RX_ERR_RING_MASK_0};
|
||||
static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0, 0, 0, 0, 0, 0, WLAN_CFG_RX_WBM_REL_RING_MASK_0};
|
||||
static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0, 0, 0, 0, 0, 0, WLAN_CFG_REO_STATUS_RING_MASK_0};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#ifdef WLAN_FEATURE_NEAR_FULL_IRQ
|
||||
static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[15] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1};
|
||||
static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[16] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1};
|
||||
static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
[17] = WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK};
|
||||
#else
|
||||
static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0 };
|
||||
static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0 };
|
||||
static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0 };
|
||||
#endif
|
||||
#else
|
||||
static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0 };
|
||||
static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0 };
|
||||
static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
|
||||
0 };
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#ifdef IPA_OFFLOAD
|
||||
struct wlan_cfg_tcl_wbm_ring_num_map tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
|
||||
{.tcl_ring_num = 0, .wbm_ring_num = 0, .for_ipa = 0},
|
||||
{1, 4, 1}, /* For IPA */
|
||||
{2, 2, 1}, /* For IPA */
|
||||
{3, 5, 0},
|
||||
{4, 6, 0},
|
||||
};
|
||||
#else
|
||||
struct wlan_cfg_tcl_wbm_ring_num_map tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
|
||||
{.tcl_ring_num = 0, .wbm_ring_num = 0, .for_ipa = 0},
|
||||
{1, 4, 0},
|
||||
{2, 2, 0},
|
||||
{3, 5, 0},
|
||||
{4, 6, 0},
|
||||
};
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#else
|
||||
struct wlan_cfg_tcl_wbm_ring_num_map tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
|
||||
{.tcl_ring_num = 0, .wbm_ring_num = 0, .for_ipa = 0},
|
||||
{1, 4, 1}, /* For IPA */
|
||||
{2, 2, 1}, /* For IPA */
|
||||
};
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* Integrated configuration + 8 possible MSI configurations */
|
||||
@@ -791,6 +826,14 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
|
||||
0, 0, 0, 0},
|
||||
},
|
||||
};
|
||||
|
||||
struct wlan_cfg_tcl_wbm_ring_num_map tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
|
||||
{0, 0, 0},
|
||||
{1, 1, 0},
|
||||
{2, 2, 0},
|
||||
{3, 3, 0},
|
||||
{4, 4, 0},
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -877,20 +920,54 @@ static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
|
||||
0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_cfg_fill_interrupt_mask() - set interrupt mask
|
||||
*
|
||||
* @wlan_cfg_dp_soc_ctxt: soc configuration context
|
||||
* @num_dp_msi: Number of DP interrupts available (0 for integrated)
|
||||
* @interrupt_mode: Type of interrupt
|
||||
* @is_monitor_mode: is monitor mode enabled
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||
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)
|
||||
{ int i = 0;
|
||||
|
||||
for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
|
||||
wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
|
||||
rx_mon_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rx_err_ring_mask[i] =
|
||||
rx_err_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
|
||||
rx_wbm_rel_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_reo_status_ring_mask[i] =
|
||||
reo_status_ring_mask_msi[i];
|
||||
if (is_monitor_mode) {
|
||||
wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
|
||||
wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
|
||||
} else {
|
||||
wlan_cfg_ctx->int_rx_ring_mask[i] =
|
||||
rx_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
|
||||
rxdma2host_ring_mask_msi[i];
|
||||
}
|
||||
wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
|
||||
host2rxdma_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
|
||||
host2rxdma_mon_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
|
||||
rxdma2host_mon_ring_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
|
||||
rx_ring_near_full_irq_1_mask_msi[i];
|
||||
wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
|
||||
rx_ring_near_full_irq_2_mask_msi[i];
|
||||
wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
|
||||
tx_ring_near_full_irq_mask_msi[i];
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
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)
|
||||
{
|
||||
int i = 0;
|
||||
int interrupt_index = 0;
|
||||
|
||||
@@ -903,7 +980,6 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
qdf_err("Interrupt mode %d", interrupt_mode);
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
|
||||
wlan_cfg_ctx->int_tx_ring_mask[i] =
|
||||
dp_mask_assignment[interrupt_index].tx_ring_mask[i];
|
||||
@@ -938,6 +1014,7 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
dp_mask_assignment[interrupt_index].tx_ring_near_full_irq_mask[i];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
/**
|
||||
@@ -1401,6 +1478,12 @@ int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
|
||||
return cfg->int_tx_ring_mask[context];
|
||||
}
|
||||
|
||||
void wlan_cfg_get_tcl_wbm_ring_num_for_index(int index, int *tcl, int *wbm)
|
||||
{
|
||||
*tcl = tcl_wbm_map_array[index].tcl_ring_num;
|
||||
*wbm = tcl_wbm_map_array[index].wbm_ring_num;
|
||||
}
|
||||
|
||||
int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
|
||||
{
|
||||
return cfg->int_rx_ring_mask[context];
|
||||
|
@@ -19,56 +19,7 @@
|
||||
#ifndef __WLAN_CFG_H
|
||||
#define __WLAN_CFG_H
|
||||
|
||||
/*
|
||||
* Temporary place holders. These should come either from target config
|
||||
* or platform configuration
|
||||
*/
|
||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||
#define WLAN_CFG_DST_RING_CACHED_DESC 0
|
||||
#define MAX_PDEV_CNT 1
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS 14
|
||||
#else
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS 7
|
||||
#endif
|
||||
#define WLAN_CFG_RXDMA1_ENABLE 1
|
||||
/*
|
||||
* This mask defines how many transmit frames account for 1 NAPI work unit
|
||||
* 0 means each tx completion is 1 unit
|
||||
*/
|
||||
#define DP_TX_NAPI_BUDGET_DIV_MASK 0
|
||||
|
||||
/* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */
|
||||
#define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0x3FFF
|
||||
|
||||
#define NUM_RXDMA_RINGS_PER_PDEV 2
|
||||
|
||||
/*Maximum Number of LMAC instances*/
|
||||
#define MAX_NUM_LMAC_HW 2
|
||||
#else
|
||||
#define WLAN_CFG_DST_RING_CACHED_DESC 1
|
||||
#define MAX_PDEV_CNT 3
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS 11
|
||||
#define NUM_RXDMA_RINGS_PER_PDEV 1
|
||||
#define MAX_NUM_LMAC_HW 3
|
||||
|
||||
#endif
|
||||
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS_MAX 14
|
||||
|
||||
/* Tx configuration */
|
||||
#define MAX_LINK_DESC_BANKS 8
|
||||
#define MAX_TXDESC_POOLS 4
|
||||
#define MAX_TCL_DATA_RINGS 4
|
||||
|
||||
/* Rx configuration */
|
||||
#define MAX_RXDESC_POOLS 4
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
#define MAX_REO_DEST_RINGS 8
|
||||
#else
|
||||
#define MAX_REO_DEST_RINGS 4
|
||||
#endif
|
||||
#define MAX_RX_MAC_RINGS 2
|
||||
#include <wlan_init_cfg.h>
|
||||
|
||||
/* DP process status */
|
||||
#if defined(MAX_PDEV_CNT) && (MAX_PDEV_CNT == 1)
|
||||
@@ -111,7 +62,10 @@
|
||||
WLAN_CFG_RX_RING_MASK_5 | \
|
||||
WLAN_CFG_RX_RING_MASK_6)
|
||||
|
||||
#define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0)
|
||||
#define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
|
||||
WLAN_CFG_TX_RING_MASK_5 | \
|
||||
WLAN_CFG_TX_RING_MASK_6)
|
||||
|
||||
#else
|
||||
#define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 | \
|
||||
WLAN_CFG_RX_RING_MASK_1 | \
|
||||
@@ -123,7 +77,12 @@
|
||||
WLAN_CFG_RX_RING_MASK_6 | \
|
||||
WLAN_CFG_RX_RING_MASK_7)
|
||||
|
||||
#define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0)
|
||||
#define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
|
||||
WLAN_CFG_TX_RING_MASK_4 | \
|
||||
WLAN_CFG_TX_RING_MASK_2 | \
|
||||
WLAN_CFG_TX_RING_MASK_5 | \
|
||||
WLAN_CFG_TX_RING_MASK_6)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -398,6 +357,18 @@ struct wlan_cfg_dp_pdev_ctxt {
|
||||
int nss_enabled;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_cfg_tcl_wbm_ring_num_map - TCL WBM Ring number mapping
|
||||
* @tcl_ring_num - TCL Ring number
|
||||
* @wbm_ring_num - WBM Ring number
|
||||
* @for_ipa - whether this TCL/WBM for IPA use or not
|
||||
*/
|
||||
struct wlan_cfg_tcl_wbm_ring_num_map {
|
||||
uint8_t tcl_ring_num;
|
||||
uint8_t wbm_ring_num;
|
||||
uint8_t for_ipa;
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_cfg_soc_attach() - Attach configuration interface for SoC
|
||||
* @ctrl_obj - PSOC object
|
||||
@@ -508,6 +479,34 @@ int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
||||
*/
|
||||
int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||
int context);
|
||||
/**
|
||||
* wlan_cfg_get_tcl_wbm_ring_num_for_index() - Get TCL/WBM ring number for index
|
||||
* @index: index for which TCL/WBM ring numbers are needed
|
||||
* @tcl: pointer to TCL ring number, to be filled
|
||||
* @wbm: pointer to WBM ring number to be filled
|
||||
*
|
||||
* The function fills in tcl/wbm input pointers with TCL/WBM ring numbers for a
|
||||
* given index corresponding to soc->tcl_data_ring or soc->tx_comp_ring. This
|
||||
* is needed since WBM/TCL rings may not be sequentially available for HOST
|
||||
* to use. The function returns values as stored in tcl_wbm_map_array global
|
||||
* array.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_cfg_get_tcl_wbm_ring_num_for_index(int index, int *tcl, int *wbm);
|
||||
|
||||
/**
|
||||
* wlan_cfg_get_wbm_ring_num_for_index() - Get WBM ring number for index
|
||||
* @index: index for which WBM ring numbers is needed
|
||||
*
|
||||
* Return: WBM Ring number for the index
|
||||
*/
|
||||
static inline
|
||||
int wlan_cfg_get_wbm_ring_num_for_index(int index)
|
||||
{
|
||||
extern struct wlan_cfg_tcl_wbm_ring_num_map tcl_wbm_map_array[MAX_TCL_DATA_RINGS];
|
||||
return tcl_wbm_map_array[index].wbm_ring_num;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
|
||||
@@ -1647,13 +1646,12 @@ uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_cfg_radio0_default_reo_get - Get Radio0 default REO
|
||||
* @cfg: soc configuration context
|
||||
*
|
||||
* Return: .
|
||||
* Return: None
|
||||
*/
|
||||
uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
@@ -1661,7 +1659,7 @@ uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
* wlan_cfg_radio1_default_reo_get - Get Radio1 default REO
|
||||
* @cfg: soc configuration context
|
||||
*
|
||||
* Return: .
|
||||
* Return: None
|
||||
*/
|
||||
uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
@@ -1669,7 +1667,7 @@ uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
* wlan_cfg_radio2_default_reo_get() - Get Radio2 default REO
|
||||
* @cfg: soc configuration context
|
||||
*
|
||||
* Return: .
|
||||
* Return: None
|
||||
*/
|
||||
uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
@@ -1677,7 +1675,7 @@ uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
* wlan_cfg_set_rxdma1_enable() - Enable rxdma1
|
||||
* @cfg: soc configuration context
|
||||
*
|
||||
* Return: .
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
||||
|
||||
@@ -1696,7 +1694,7 @@ wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
* @cfg: soc configuration context
|
||||
* @val: val to set
|
||||
*
|
||||
* Return: .
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
|
||||
@@ -1708,3 +1706,4 @@ wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
|
||||
* Return:
|
||||
*/
|
||||
void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
#endif
|
||||
|
76
wlan_cfg/wlan_init_cfg.h
Normal file
76
wlan_cfg/wlan_init_cfg.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (c) 2021 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 copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __WLAN_INIT_CFG_H
|
||||
#define __WLAN_INIT_CFG_H
|
||||
|
||||
/*
|
||||
* Temporary place holders. These should come either from target config
|
||||
* or platform configuration
|
||||
*/
|
||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||
#define WLAN_CFG_DST_RING_CACHED_DESC 0
|
||||
#define MAX_PDEV_CNT 1
|
||||
|
||||
#ifdef CONFIG_BERYLLIUM
|
||||
/* (8 REOs + 5 WBMs + 2 Near Full + 1 Error handling) */
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS 18
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS_MAX 18
|
||||
#else
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS 7
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS_MAX 14
|
||||
#endif
|
||||
#define WLAN_CFG_RXDMA1_ENABLE 1
|
||||
/*
|
||||
* This mask defines how many transmit frames account for 1 NAPI work unit
|
||||
* 0 means each tx completion is 1 unit
|
||||
*/
|
||||
#define DP_TX_NAPI_BUDGET_DIV_MASK 0
|
||||
|
||||
/* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */
|
||||
#define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0x3FFF
|
||||
|
||||
#define NUM_RXDMA_RINGS_PER_PDEV 2
|
||||
|
||||
/*Maximum Number of LMAC instances*/
|
||||
#define MAX_NUM_LMAC_HW 2
|
||||
#else
|
||||
#define WLAN_CFG_DST_RING_CACHED_DESC 1
|
||||
#define MAX_PDEV_CNT 3
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS 11
|
||||
#define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11
|
||||
#define NUM_RXDMA_RINGS_PER_PDEV 1
|
||||
#define MAX_NUM_LMAC_HW 3
|
||||
|
||||
#endif
|
||||
|
||||
/* Tx configuration */
|
||||
#define MAX_LINK_DESC_BANKS 8
|
||||
#define MAX_TXDESC_POOLS 4
|
||||
|
||||
/* Rx configuration */
|
||||
#define MAX_RXDESC_POOLS 4
|
||||
|
||||
#define MAX_REO_DEST_RINGS 8
|
||||
#define MAX_TCL_DATA_RINGS 5
|
||||
|
||||
#define WBM2SW_REL_ERR_RING_NUM 3
|
||||
|
||||
#define MAX_RX_MAC_RINGS 2
|
||||
|
||||
#endif /* __WLAN_INIT_CFG_H */
|
Reference in New Issue
Block a user