diff --git a/hal/wifi3.0/hal_hw_headers.h b/hal/wifi3.0/hal_hw_headers.h index aaed61ffa812..2907a47a5dc4 100644 --- a/hal/wifi3.0/hal_hw_headers.h +++ b/hal/wifi3.0/hal_hw_headers.h @@ -78,7 +78,11 @@ #define HAL_SRNG_REO_ALTERNATE_SELECT 0x7 /* calculate the register address offset from bar0 of shadow register x */ +#ifdef QCA_WIFI_QCA6390 +#define SHADOW_REGISTER(x) (0x000008FC + (4 * (x))) +#else #define SHADOW_REGISTER(x) (0x00003024 + (4 * (x))) +#endif /* TODO: Check if the following can be provided directly by HW headers */ #define SRNG_LOOP_CNT_MASK REO_DESTINATION_RING_15_LOOPING_COUNT_MASK diff --git a/hal/wifi3.0/hal_srng.c b/hal/wifi3.0/hal_srng.c index a47df7730dfc..52c502907da8 100644 --- a/hal/wifi3.0/hal_srng.c +++ b/hal/wifi3.0/hal_srng.c @@ -84,6 +84,8 @@ static void hal_update_srng_hp_tp_address(void *hal_soc, struct hal_srng *srng; struct hal_soc *hal = (struct hal_soc *)hal_soc; int ring_id; + struct hal_hw_srng_config *ring_config = + HAL_SRNG_CONFIG(hal, ring_type); ring_id = hal_get_srng_ring_id(hal_soc, ring_type, ring_num, 0); if (ring_id < 0) @@ -91,7 +93,7 @@ static void hal_update_srng_hp_tp_address(void *hal_soc, srng = hal_get_srng(hal_soc, ring_id); - if (srng->ring_dir == HAL_SRNG_DST_RING) + if (ring_config->ring_dir == HAL_SRNG_DST_RING) srng->u.dst_ring.tp_addr = SHADOW_REGISTER(shadow_config_index) + hal->dev_base_addr; else