qcacmn: Enable timer based low threshold interrupt

Enable timer based low threshold interrupt for waikiki monitor
tx/rx source rings

Change-Id: I8c422b4157d0077cfa211d1b754fecbb2b98fad6
This commit is contained in:
Naga
2021-12-07 14:54:30 +05:30
gecommit door Madan Koyyalamudi
bovenliggende 6219f3d454
commit 984bfae507
8 gewijzigde bestanden met toevoegingen van 394 en 25 verwijderingen

Bestand weergeven

@@ -350,10 +350,6 @@
#define WLAN_CFG_TX_MONITOR_DST_RING_SIZE_MIN 48
#define WLAN_CFG_TX_MONITOR_DST_RING_SIZE_MAX 4096
#define WLAN_CFG_TX_MONITOR_BUF_SIZE 2048
#define WLAN_CFG_TX_MONITOR_BUF_SIZE_MIN 48
#define WLAN_CFG_TX_MONITOR_BUF_SIZE_MAX 8192
#define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE 1024
#define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN 16
#define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MAX 8192

Bestand weergeven

@@ -61,6 +61,8 @@
#define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 0x2
#define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2 0x4
#define WLAN_CFG_HOST2TXMON_RING_MASK_0 0x1
#define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 0x1
#define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 0x2
#define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2 0x4
@@ -94,7 +96,6 @@ struct dp_int_mask_assignment {
uint8_t tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
@@ -105,6 +106,8 @@ struct dp_int_mask_assignment {
uint8_t rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
};
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
@@ -875,6 +878,16 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2,
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 1 MSI combination */
{
@@ -935,6 +948,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2 |
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0 |
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 2 MSI combination */
{
@@ -995,6 +1021,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2 |
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 3 MSI combination */
{
@@ -1063,6 +1102,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2 |
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 4 MSI combination */
{
@@ -1123,6 +1175,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2,
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 5 MSI combination */
{
@@ -1191,6 +1256,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2 |
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 6 MSI combination */
{
@@ -1252,6 +1330,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2,
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 7 MSI combination */
{
@@ -1321,6 +1412,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2,
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
/* Interrupt assignment for 8 MSI combination */
{
@@ -1343,10 +1447,6 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_RX_MON_RING_MASK_1,
WLAN_CFG_RX_MON_RING_MASK_2,
0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
/* host2rxdma ring masks */
{ 0, 0, 0,
WLAN_CFG_HOST2RXDMA_RING_MASK_0,
@@ -1394,6 +1494,19 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
WLAN_CFG_REO_STATUS_RING_MASK_2,
WLAN_CFG_REO_STATUS_RING_MASK_3,
0, 0, 0, 0},
/* rx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* rx_ring_near_full_irq_2 mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx_ring_near_full_irq mask */
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* host2txmon ring masks */
{ WLAN_CFG_HOST2TXMON_RING_MASK_0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
/* tx mon ring masks */
{ WLAN_CFG_TX_MON_RING_MASK_0,
WLAN_CFG_TX_MON_RING_MASK_1,
0, 0, 0, 0, 0, 0},
},
};
#endif
@@ -1444,7 +1557,7 @@ struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_TX,
.batch_count_threshold = 0,
.low_threshold = WLAN_CFG_TX_MONITOR_BUF_SIZE_MAX >> 3,
.low_threshold = WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX >> 3,
};
/* DEFAULT_CONFIG ring configuration */
@@ -1551,6 +1664,9 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
{
int i = 0;
int interrupt_index = 0;
int int_host2rxdma_mon_ring_mask;
bool host2rxmon_mask_set = false;
bool txmon_hw_support = false;
if(interrupt_mode == DP_INTR_INTEGRATED) {
interrupt_index = 0;
@@ -1566,8 +1682,6 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
dp_mask_assignment[interrupt_index].tx_ring_mask[i];
wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
dp_mask_assignment[interrupt_index].rx_mon_ring_mask[i];
wlan_cfg_ctx->int_tx_mon_ring_mask[i] =
dp_mask_assignment[interrupt_index].tx_mon_ring_mask[i];
wlan_cfg_ctx->int_rx_err_ring_mask[i] =
dp_mask_assignment[interrupt_index].rx_err_ring_mask[i];
wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
@@ -1595,6 +1709,26 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_2_mask[i];
wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
dp_mask_assignment[interrupt_index].tx_ring_near_full_irq_mask[i];
txmon_hw_support = wlan_cfg_get_txmon_hw_support(wlan_cfg_ctx);
if (txmon_hw_support) {
wlan_cfg_ctx->int_tx_mon_ring_mask[i] =
dp_mask_assignment[interrupt_index].tx_mon_ring_mask[i];
wlan_cfg_ctx->int_host2txmon_ring_mask[i] =
dp_mask_assignment[interrupt_index].host2txmon_ring_mask[i];
int_host2rxdma_mon_ring_mask =
dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
if (int_host2rxdma_mon_ring_mask && !host2rxmon_mask_set) {
wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[interrupt_index] =
dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
host2rxmon_mask_set = true;
}
} else {
wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
wlan_cfg_ctx->int_host2txmon_ring_mask[i] = 0;
wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
}
}
}
#endif
@@ -2292,10 +2426,17 @@ int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
return cfg->int_rx_mon_ring_mask[context];
}
#ifdef CONFIG_BERYLLIUM
int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
{
return cfg->int_tx_mon_ring_mask[context];
}
#else
int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
{
return 0;
}
#endif
int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
{
@@ -3170,3 +3311,43 @@ wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val)
{}
#endif
#ifdef CONFIG_BERYLLIUM
int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context)
{
return cfg->int_host2txmon_ring_mask[context];
}
qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask);
void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context, int mask)
{
cfg->int_host2txmon_ring_mask[context] = mask;
}
#else
int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context)
{
return 0;
}
void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context, int mask)
{
}
#endif
qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask);
void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
bool txmon_hw_support)
{
cfg->txmon_hw_support = txmon_hw_support;
}
bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->txmon_hw_support;
}

Bestand weergeven

@@ -162,6 +162,8 @@ struct wlan_srng_cfg {
* mapped to each NAPI/INTR context
* @int_tx_ring_near_full_irq_mask: Bitmap of Tx completion ring near full
* interrupt mapped to each NAPI/INTR context
* @int_host2txmon_ring_mask: Bitmap of Tx monitor source ring interrupt
* mapped to each NAPI/INTR context
* @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
* @lro_enabled: enable/disable lro feature
* @rx_hash: Enable hash based steering of rx packets
@@ -247,6 +249,7 @@ struct wlan_srng_cfg {
* @lmac_peer_id_msb: value used for hash based routing
* @vdev_stats_hw_offload_config: HW vdev stats config
* @vdev_stats_hw_offload_timer: HW vdev stats timer duration
* @txmon_hw_support: TxMON HW support
*/
struct wlan_cfg_dp_soc_ctxt {
int num_int_ctxts;
@@ -291,6 +294,7 @@ struct wlan_cfg_dp_soc_ctxt {
uint8_t int_rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t int_rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t int_tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
uint8_t int_host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
int hw_macid[MAX_PDEV_CNT];
int hw_macid_pdev_id_map[MAX_NUM_LMAC_HW];
int base_hw_macid;
@@ -405,6 +409,7 @@ struct wlan_cfg_dp_soc_ctxt {
int vdev_stats_hw_offload_timer;
#endif
uint8_t num_rxdma_dst_rings_per_pdev;
bool txmon_hw_support;
};
/**
@@ -2019,5 +2024,43 @@ wlan_cfg_mlo_default_rx_ring_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
uint8_t
wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
uint8_t chip_id);
#endif
/*
* wlan_cfg_set_host2txmon_ring_mask() - Set host2txmon ring
* interrupt mask mapped to an interrupt context
* @wlan_cfg_ctx - Configuration Handle
*
* Return: None
*/
void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context, int mask);
/**
* wlan_cfg_get_host2txmon_ring_mask() - Return host2txmon ring
* interrupt mask mapped to an interrupt context
* @wlan_cfg_ctx - Configuration Handle
* @context - Numerical ID identifying the Interrupt/NAPI context
*
* Return: int_host2txmon_ring_mask[context]
*/
int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
int context);
/**
* wlan_cfg_set_txmon_hw_support () - Set txmon hw support
* @cfg: Configuration Handle
* @txmon_hw_support: value to set
*
* Return: None
*/
void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
bool txmon_hw_support);
/**
* wlan_cfg_get_txmon_hw_support () - Get txmon hw support
* @cfg: Configuration Handle
*
* Return: txmon_hw_support
*/
bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg);
#endif /*__WLAN_CFG_H*/