diff --git a/dp/wifi3.0/be/dp_be.c b/dp/wifi3.0/be/dp_be.c index b9bde84f75..804e31fe51 100644 --- a/dp/wifi3.0/be/dp_be.c +++ b/dp/wifi3.0/be/dp_be.c @@ -1189,6 +1189,7 @@ static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc) { struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc); struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx; + hal_soc_handle_t hal_soc = soc->hal_soc; soc_cfg_ctx = soc->wlan_cfg_ctx; @@ -1206,6 +1207,8 @@ static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc) WLAN_MD_DP_SRNG_REO2PPE, "reo2ppe_ring"); + hal_reo_config_reo2ppe_dest_info(hal_soc); + if (dp_srng_init(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0, 0)) { dp_err("%pK: dp_srng_init failed for ppe2tcl_ring", soc); goto fail; diff --git a/hal/wifi3.0/be/hal_be_tx.h b/hal/wifi3.0/be/hal_be_tx.h index c237712802..c8365201ff 100644 --- a/hal/wifi3.0/be/hal_be_tx.h +++ b/hal/wifi3.0/be/hal_be_tx.h @@ -803,6 +803,21 @@ hal_tx_mcast_mlo_reinject_routing_set( } #endif +/* + * hal_reo_config_reo2ppe_dest_info() - Configure reo2ppe dest info + * @hal_soc_hdl: HAL SoC Context + * + * Return: None. + */ +static inline +void hal_reo_config_reo2ppe_dest_info(hal_soc_handle_t hal_soc_hdl) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (hal_soc->ops->hal_reo_config_reo2ppe_dest_info) + hal_soc->ops->hal_reo_config_reo2ppe_dest_info(hal_soc_hdl); +} + /* * hal_tx_get_num_ppe_vp_tbl_entries() - Get the total number of VP table * @hal_soc: HAL SoC Context diff --git a/hal/wifi3.0/hal_internal.h b/hal/wifi3.0/hal_internal.h index 59f298c23c..fca5d3512a 100644 --- a/hal/wifi3.0/hal_internal.h +++ b/hal/wifi3.0/hal_internal.h @@ -877,6 +877,9 @@ struct hal_hw_txrx_ops { uint32_t (*hal_tx_comp_get_buffer_source)(void *hal_desc); uint32_t (*hal_tx_get_num_ppe_vp_tbl_entries)( hal_soc_handle_t hal_soc_hdl); + + void (*hal_reo_config_reo2ppe_dest_info)(hal_soc_handle_t hal_soc_hdl); + void (*hal_tx_set_ppe_cmn_cfg)(hal_soc_handle_t hal_soc_hdl, union hal_tx_cmn_config_ppe *cmn_cfg); void (*hal_tx_set_ppe_vp_entry)(hal_soc_handle_t hal_soc_hdl, @@ -1442,6 +1445,7 @@ struct hal_srng *hal_ring_handle_to_hal_srng(hal_ring_handle_t hal_ring) * REO2PPE destination indication */ #define REO2PPE_DST_IND 11 +#define REO2PPE_RULE_FAIL_FB 0x2000 /** * enum hal_pkt_type - Type of packet type reported by HW diff --git a/hal/wifi3.0/qcn9224/hal_9224.h b/hal/wifi3.0/qcn9224/hal_9224.h index dd6c3eb044..cbaff1a9c0 100644 --- a/hal/wifi3.0/qcn9224/hal_9224.h +++ b/hal/wifi3.0/qcn9224/hal_9224.h @@ -1413,6 +1413,25 @@ void hal_compute_reo_remap_ix2_ix3_9224(uint32_t *ring, uint32_t num_rings, } } +static +void hal_compute_reo_remap_ix0_9224(struct hal_soc *soc) +{ + uint32_t remap0; + + remap0 = HAL_REG_READ(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR + (REO_REG_REG_BASE)); + + remap0 &= ~(HAL_REO_REMAP_IX0(0xF, 6)); + remap0 |= HAL_REO_REMAP_IX0(REO2PPE_DST_IND, 6); + + HAL_REG_WRITE(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR + (REO_REG_REG_BASE), remap0); + + hal_debug("HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR 0x%x", + HAL_REG_READ(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR + (REO_REG_REG_BASE))); +} + /** * hal_rx_flow_setup_fse_9224() - Setup a flow search entry in HW FST * @fst: Pointer to the Rx Flow Search Table @@ -1700,6 +1719,8 @@ static void hal_reo_setup_9224(struct hal_soc *soc, void *reoparams, * 7: NOT_USED. */ if (reo_params->rx_hash_enabled) { + hal_compute_reo_remap_ix0_9224(soc); + HAL_REG_WRITE(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_1_ADDR (REO_REG_REG_BASE), reo_params->remap0); @@ -2032,6 +2053,7 @@ static void hal_hw_txrx_ops_attach_qcn9224(struct hal_soc *hal_soc) hal_rx_priv_info_get_from_tlv_be; hal_soc->ops->hal_rx_pkt_hdr_get = hal_rx_pkt_hdr_get_be; hal_soc->ops->hal_reo_setup = hal_reo_setup_9224; + hal_soc->ops->hal_reo_config_reo2ppe_dest_info = NULL; #ifdef REO_SHARED_QREF_TABLE_EN hal_soc->ops->hal_reo_shared_qaddr_setup = hal_reo_shared_qaddr_setup_be; hal_soc->ops->hal_reo_shared_qaddr_init = hal_reo_shared_qaddr_init_be; diff --git a/hal/wifi3.0/qcn9224/v2/hal_9224v2.c b/hal/wifi3.0/qcn9224/v2/hal_9224v2.c index 229a24437a..0a30c451c5 100644 --- a/hal/wifi3.0/qcn9224/v2/hal_9224v2.c +++ b/hal/wifi3.0/qcn9224/v2/hal_9224v2.c @@ -546,6 +546,25 @@ struct hal_hw_srng_config hw_srng_table_9224v2[] = { }, }; +/* + * hal_reo_config_reo2ppe_dest_info() - Configure reo2ppe dest info + * @hal_soc_hdl: HAL SoC Context + * + * Return: None. + */ +static inline +void hal_reo_config_reo2ppe_dest_info_9224(hal_soc_handle_t hal_soc_hdl) +{ + HAL_REG_WRITE((struct hal_soc *)hal_soc_hdl, + HWIO_REO_R0_REO2PPE_DEST_INFO_ADDR(REO_REG_REG_BASE), + REO2PPE_RULE_FAIL_FB); +} + +static void hal_hw_txrx_ops_override_qcn9224_v2(struct hal_soc *hal_soc) +{ + hal_soc->ops->hal_reo_config_reo2ppe_dest_info = + hal_reo_config_reo2ppe_dest_info_9224; +} /** * hal_qcn9224_attach()- Attach 9224 target specific hal_soc ops, * offset and srng table @@ -563,4 +582,6 @@ void hal_qcn9224v2_attach(struct hal_soc *hal_soc) if (hal_soc->static_window_map) hal_write_window_register(hal_soc); hal_soc->dmac_cmn_src_rxbuf_ring = true; + + hal_hw_txrx_ops_override_qcn9224_v2(hal_soc); }