diff --git a/dp/wifi3.0/dp_ipa.c b/dp/wifi3.0/dp_ipa.c index bd34e19662a0..a74194383be7 100644 --- a/dp/wifi3.0/dp_ipa.c +++ b/dp/wifi3.0/dp_ipa.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -701,7 +702,7 @@ int dp_ipa_ring_resource_setup(struct dp_soc *soc, * Set DEST_RING_MAPPING_4 to SW2 as default value for * DESTINATION_RING_CTRL_IX_0. */ - ix0 = HAL_REO_REMAP_IX0(REO_REMAP_TCL, 0) | + ix0 = HAL_REO_REMAP_IX0(REO_REMAP_SW1, 0) | HAL_REO_REMAP_IX0(REO_REMAP_SW1, 1) | HAL_REO_REMAP_IX0(REO_REMAP_SW2, 2) | HAL_REO_REMAP_IX0(REO_REMAP_SW3, 3) | @@ -988,7 +989,7 @@ QDF_STATUS dp_ipa_enable_autonomy(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) return QDF_STATUS_E_AGAIN; /* Call HAL API to remap REO rings to REO2IPA ring */ - ix0 = HAL_REO_REMAP_IX0(REO_REMAP_TCL, 0) | + ix0 = HAL_REO_REMAP_IX0(REO_REMAP_SW1, 0) | HAL_REO_REMAP_IX0(REO_REMAP_SW4, 1) | HAL_REO_REMAP_IX0(REO_REMAP_SW1, 2) | HAL_REO_REMAP_IX0(REO_REMAP_SW4, 3) | @@ -1025,6 +1026,7 @@ QDF_STATUS dp_ipa_disable_autonomy(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) struct dp_pdev *pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id); uint32_t ix0; + uint32_t ix1; uint32_t ix2; uint32_t ix3; @@ -1040,7 +1042,7 @@ QDF_STATUS dp_ipa_disable_autonomy(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) return QDF_STATUS_E_AGAIN; /* Call HAL API to remap REO rings to REO2IPA ring */ - ix0 = HAL_REO_REMAP_IX0(REO_REMAP_TCL, 0) | + ix0 = HAL_REO_REMAP_IX0(REO_REMAP_SW1, 0) | HAL_REO_REMAP_IX0(REO_REMAP_SW1, 1) | HAL_REO_REMAP_IX0(REO_REMAP_SW2, 2) | HAL_REO_REMAP_IX0(REO_REMAP_SW3, 3) | @@ -1050,7 +1052,7 @@ QDF_STATUS dp_ipa_disable_autonomy(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) HAL_REO_REMAP_IX0(REO_REMAP_FW, 7); if (wlan_cfg_is_rx_hash_enabled(soc->wlan_cfg_ctx)) { - dp_reo_remap_config(soc, &ix2, &ix3); + dp_reo_remap_config(soc, &ix1, &ix2, &ix3); hal_reo_read_write_ctrl_ix(soc->hal_soc, false, &ix0, NULL, &ix2, &ix3); diff --git a/dp/wifi3.0/dp_ipa.h b/dp/wifi3.0/dp_ipa.h index aba3bc176c78..71769469ca9c 100644 --- a/dp/wifi3.0/dp_ipa.h +++ b/dp/wifi3.0/dp_ipa.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -255,7 +256,7 @@ QDF_STATUS dp_ipa_handle_rx_buf_smmu_mapping(struct dp_soc *soc, uint32_t size, bool create); -bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap1, +bool dp_reo_remap_config(struct dp_soc *soc,uint32_t *remap0, uint32_t *remap1, uint32_t *remap2); bool dp_ipa_is_mdm_platform(void); diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 2ec38f9eb9ae..ac151461c99f 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -3398,12 +3399,14 @@ static void dp_soc_reset_intr_mask(struct dp_soc *soc) * @remap2: output parameter indicates reo remap 2 register value * Return: bool type, true if remap is configured else false. */ -bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap1, uint32_t *remap2) +bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap0, + uint32_t *remap1, uint32_t *remap2) { uint32_t ring[4] = {REO_REMAP_SW1, REO_REMAP_SW2, REO_REMAP_SW3}; hal_compute_reo_remap_ix2_ix3(soc->hal_soc, ring, 3, remap1, remap2); + hal_compute_reo_remap_ix0(soc->hal_soc, remap0); dp_debug("remap1 %x remap2 %x", *remap1, *remap2); return true; @@ -3529,7 +3532,7 @@ static uint8_t dp_reo_ring_selection(uint32_t value, uint32_t *ring) return num; } -static bool dp_reo_remap_config(struct dp_soc *soc, +static bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap0, uint32_t *remap1, uint32_t *remap2) { @@ -3547,6 +3550,7 @@ static bool dp_reo_remap_config(struct dp_soc *soc, num = dp_reo_ring_selection(value, ring); hal_compute_reo_remap_ix2_ix3(soc->hal_soc, ring, num, remap1, remap2); + hal_compute_reo_remap_ix0(soc->hal_soc, remap0); break; case dp_nss_cfg_first_radio: @@ -12537,6 +12541,7 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle, * are offloaded to NSS */ if (dp_reo_remap_config(soc, + &reo_params.remap0, &reo_params.remap1, &reo_params.remap2)) reo_params.rx_hash_enabled = true; diff --git a/hal/wifi3.0/hal_api.h b/hal/wifi3.0/hal_api.h index a07ffc269803..691b2328defc 100644 --- a/hal/wifi3.0/hal_api.h +++ b/hal/wifi3.0/hal_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -2417,6 +2418,15 @@ void hal_compute_reo_remap_ix2_ix3(hal_soc_handle_t hal_soc_hdl, num_rings, remap1, remap2); } +static inline +void hal_compute_reo_remap_ix0(hal_soc_handle_t hal_soc_hdl, uint32_t *remap0) +{ + struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; + + if (hal_soc->ops->hal_compute_reo_remap_ix0) + hal_soc->ops->hal_compute_reo_remap_ix0(remap0); +} + /** * hal_setup_link_idle_list - Setup scattered idle list using the * buffer list provided diff --git a/hal/wifi3.0/hal_generic_api.h b/hal/wifi3.0/hal_generic_api.h index 159bb076fa2f..2ecaaa06c8a1 100644 --- a/hal/wifi3.0/hal_generic_api.h +++ b/hal/wifi3.0/hal_generic_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1700,6 +1701,17 @@ static void hal_reo_setup_generic(struct hal_soc *soc, * 7: NOT_USED. */ if (reo_params->rx_hash_enabled) { + if (reo_params->remap0) + HAL_REG_WRITE(soc, + HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR( + SEQ_WCSS_UMAC_REO_REG_OFFSET), + reo_params->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( + SEQ_WCSS_UMAC_REO_REG_OFFSET))); + HAL_REG_WRITE(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_2_ADDR( SEQ_WCSS_UMAC_REO_REG_OFFSET), diff --git a/hal/wifi3.0/hal_internal.h b/hal/wifi3.0/hal_internal.h index e1aec3aa0d18..c1e9db008a94 100644 --- a/hal/wifi3.0/hal_internal.h +++ b/hal/wifi3.0/hal_internal.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -508,6 +509,8 @@ struct shadow_reg_config { struct hal_reo_params { /** rx hash steering enabled or disabled */ bool rx_hash_enabled; + /** reo remap 0 register */ + uint32_t remap0; /** reo remap 1 register */ uint32_t remap1; /** reo remap 2 register */ @@ -675,6 +678,7 @@ struct hal_hw_txrx_ops { uint32_t num_rings, uint32_t *remap1, uint32_t *remap2); + void (*hal_compute_reo_remap_ix0)(uint32_t *remap0); uint32_t (*hal_rx_flow_setup_cmem_fse)( struct hal_soc *soc, uint32_t cmem_ba, uint32_t table_offset, uint8_t *rx_flow); diff --git a/hal/wifi3.0/qca5018/hal_5018.c b/hal/wifi3.0/qca5018/hal_5018.c index 73e1957b846d..eb0d46c77fe6 100644 --- a/hal/wifi3.0/qca5018/hal_5018.c +++ b/hal/wifi3.0/qca5018/hal_5018.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1771,6 +1772,7 @@ struct hal_hw_txrx_ops qca5018_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/hal/wifi3.0/qca6290/hal_6290.c b/hal/wifi3.0/qca6290/hal_6290.c index a33b2d7fa564..5cfaf197c077 100644 --- a/hal/wifi3.0/qca6290/hal_6290.c +++ b/hal/wifi3.0/qca6290/hal_6290.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1152,6 +1153,7 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/hal/wifi3.0/qca6390/hal_6390.c b/hal/wifi3.0/qca6390/hal_6390.c index c1696e8ca9cf..dc91de82b9fb 100644 --- a/hal/wifi3.0/qca6390/hal_6390.c +++ b/hal/wifi3.0/qca6390/hal_6390.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1090,6 +1091,19 @@ void hal_compute_reo_remap_ix2_ix3_6390(uint32_t *ring, uint32_t num_rings, } } +static +void hal_compute_reo_remap_ix0_6390(uint32_t *remap0) +{ + *remap0 = HAL_REO_REMAP_IX0(REO_REMAP_SW1, 0) | + HAL_REO_REMAP_IX0(REO_REMAP_SW1, 1) | + HAL_REO_REMAP_IX0(REO_REMAP_SW2, 2) | + HAL_REO_REMAP_IX0(REO_REMAP_SW3, 3) | + HAL_REO_REMAP_IX0(REO_REMAP_SW2, 4) | + HAL_REO_REMAP_IX0(REO_REMAP_RELEASE, 5) | + HAL_REO_REMAP_IX0(REO_REMAP_FW, 6) | + HAL_REO_REMAP_IX0(REO_REMAP_FW, 7); +} + struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = { /* init and setup */ hal_srng_dst_hw_init_generic, @@ -1202,6 +1216,7 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = { hal_rx_mpdu_end_offset_get_generic, NULL, hal_compute_reo_remap_ix2_ix3_6390, + hal_compute_reo_remap_ix0_6390, NULL, NULL, NULL, diff --git a/hal/wifi3.0/qca6490/hal_6490.c b/hal/wifi3.0/qca6490/hal_6490.c index 00d2a7a2f34b..6041255976fa 100644 --- a/hal/wifi3.0/qca6490/hal_6490.c +++ b/hal/wifi3.0/qca6490/hal_6490.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1666,6 +1667,19 @@ void hal_compute_reo_remap_ix2_ix3_6490(uint32_t *ring, uint32_t num_rings, } } +static +void hal_compute_reo_remap_ix0_6490(uint32_t *remap0) +{ + *remap0 = HAL_REO_REMAP_IX0(REO_REMAP_SW1, 0) | + HAL_REO_REMAP_IX0(REO_REMAP_SW1, 1) | + HAL_REO_REMAP_IX0(REO_REMAP_SW2, 2) | + HAL_REO_REMAP_IX0(REO_REMAP_SW3, 3) | + HAL_REO_REMAP_IX0(REO_REMAP_SW2, 4) | + HAL_REO_REMAP_IX0(REO_REMAP_RELEASE, 5) | + HAL_REO_REMAP_IX0(REO_REMAP_FW, 6) | + HAL_REO_REMAP_IX0(REO_REMAP_FW, 7); +} + struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = { /* init and setup */ hal_srng_dst_hw_init_generic, @@ -1784,6 +1798,7 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = { hal_rx_mpdu_end_offset_get_generic, hal_rx_flow_setup_fse_6490, hal_compute_reo_remap_ix2_ix3_6490, + hal_compute_reo_remap_ix0_6490, NULL, NULL, NULL, diff --git a/hal/wifi3.0/qca6750/hal_6750.c b/hal/wifi3.0/qca6750/hal_6750.c index 2706a080ec7b..b4034c4afe32 100644 --- a/hal/wifi3.0/qca6750/hal_6750.c +++ b/hal/wifi3.0/qca6750/hal_6750.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1824,6 +1825,19 @@ void hal_compute_reo_remap_ix2_ix3_6750(uint32_t *ring, uint32_t num_rings, } } +static +void hal_compute_reo_remap_ix0_6750(uint32_t *remap0) +{ + *remap0 = HAL_REO_REMAP_IX0(REO_REMAP_SW1, 0) | + HAL_REO_REMAP_IX0(REO_REMAP_SW1, 1) | + HAL_REO_REMAP_IX0(REO_REMAP_SW2, 2) | + HAL_REO_REMAP_IX0(REO_REMAP_SW3, 3) | + HAL_REO_REMAP_IX0(REO_REMAP_SW2, 4) | + HAL_REO_REMAP_IX0(REO_REMAP_RELEASE, 5) | + HAL_REO_REMAP_IX0(REO_REMAP_FW, 6) | + HAL_REO_REMAP_IX0(REO_REMAP_FW, 7); +} + struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = { /* init and setup */ hal_srng_dst_hw_init_generic, @@ -1942,6 +1956,7 @@ struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = { hal_rx_mpdu_end_offset_get_generic, hal_rx_flow_setup_fse_6750, hal_compute_reo_remap_ix2_ix3_6750, + hal_compute_reo_remap_ix0_6750, /* CMEM FSE */ hal_rx_flow_setup_cmem_fse_6750, diff --git a/hal/wifi3.0/qca8074v1/hal_8074v1.c b/hal/wifi3.0/qca8074v1/hal_8074v1.c index 194f0d801070..1de3781a0d6d 100644 --- a/hal/wifi3.0/qca8074v1/hal_8074v1.c +++ b/hal/wifi3.0/qca8074v1/hal_8074v1.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1328,6 +1329,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/hal/wifi3.0/qca8074v2/hal_8074v2.c b/hal/wifi3.0/qca8074v2/hal_8074v2.c index d361c0c641d6..7c92563a7772 100644 --- a/hal/wifi3.0/qca8074v2/hal_8074v2.c +++ b/hal/wifi3.0/qca8074v2/hal_8074v2.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1331,6 +1332,7 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/hal/wifi3.0/qcn9000/hal_9000.c b/hal/wifi3.0/qcn9000/hal_9000.c index 025aca716c37..9d23118caa59 100644 --- a/hal/wifi3.0/qcn9000/hal_9000.c +++ b/hal/wifi3.0/qcn9000/hal_9000.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1862,6 +1863,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, NULL }; diff --git a/hal/wifi3.0/qcn9100/hal_qcn9100.c b/hal/wifi3.0/qcn9100/hal_qcn9100.c index 92693027ccda..c94699f296b8 100644 --- a/hal/wifi3.0/qcn9100/hal_qcn9100.c +++ b/hal/wifi3.0/qcn9100/hal_qcn9100.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -1778,6 +1779,7 @@ struct hal_hw_txrx_ops qcn9100_hal_hw_txrx_ops = { NULL, NULL, NULL, + NULL, NULL };