* [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274
@ 2025-04-02 15:25 Nithyanantham Paramasivam
2025-04-02 15:25 ` [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature Nithyanantham Paramasivam
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Nithyanantham Paramasivam @ 2025-04-02 15:25 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Nithyanantham Paramasivam
Instead of storing the REO queue address inside peer entries, REO
hardware module prefers them to be stored in SRAM which could be
directly accessed by REO using peer_ID/TID based Lookup table(LUT)
mechanism. This feature is expected to improve stability by reduced
interaction between host and firmware during both MLO and non-MLO
operations.This feature is enabled only for the QCN9274, so it does
not impact the WCN7850.
v4:
- Rebased on TOT
v3:
- Rebased on TOT
- Fixed 32bit compilation warning
v2:
- Removed junk version histories in cover letter
Balamurugan S (1):
wifi: ath12k: Add support to clear qdesc array in REO cache
Nithyanantham Paramasivam (1):
wifi: ath12k: Enable REO queue lookup table feature on QCN9274
Sriram R (1):
wifi: ath12k: Fix the enabling of REO queue lookup table feature
drivers/net/wireless/ath/ath12k/dp.c | 77 ++++++++++++++++--------
drivers/net/wireless/ath/ath12k/dp.h | 5 +-
drivers/net/wireless/ath/ath12k/dp_rx.c | 11 +++-
drivers/net/wireless/ath/ath12k/hal.h | 7 +++
drivers/net/wireless/ath/ath12k/hal_rx.c | 19 +++++-
drivers/net/wireless/ath/ath12k/hw.c | 4 +-
drivers/net/wireless/ath/ath12k/hw.h | 3 +
drivers/net/wireless/ath/ath12k/wmi.c | 8 ++-
drivers/net/wireless/ath/ath12k/wmi.h | 1 +
9 files changed, 104 insertions(+), 31 deletions(-)
base-commit: ba613742db305037ca2193b2b552b769c4f2a5f7
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature
2025-04-02 15:25 [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274 Nithyanantham Paramasivam
@ 2025-04-02 15:25 ` Nithyanantham Paramasivam
2025-04-02 15:35 ` Vasanthakumar Thiagarajan
2025-04-02 15:25 ` [PATCH ath-next v4 2/3] wifi: ath12k: Add support to clear qdesc array in REO cache Nithyanantham Paramasivam
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Nithyanantham Paramasivam @ 2025-04-02 15:25 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Sriram R, Nithyanantham Paramasivam
From: Sriram R <quic_srirrama@quicinc.com>
Instead of storing the REO queue address inside peer entries, REO
hardware module prefers them to be stored in SRAM which could be
directly accessed by REO using peer_ID/TID based lookup table
mechanism.
Fix the enabling of the REO queue lookup table(LUT) feature by
configuring the LUT address information in the REO hardware register
and setting the host service flags.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp.c | 77 +++++++++++++++++--------
drivers/net/wireless/ath/ath12k/dp.h | 5 +-
drivers/net/wireless/ath/ath12k/dp_rx.c | 10 +++-
drivers/net/wireless/ath/ath12k/hal.h | 6 ++
drivers/net/wireless/ath/ath12k/hw.c | 2 +
drivers/net/wireless/ath/ath12k/hw.h | 3 +
drivers/net/wireless/ath/ath12k/wmi.c | 8 ++-
drivers/net/wireless/ath/ath12k/wmi.h | 1 +
8 files changed, 83 insertions(+), 29 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
index b1f27c3ac723..80b9f4594dee 100644
--- a/drivers/net/wireless/ath/ath12k/dp.c
+++ b/drivers/net/wireless/ath/ath12k/dp.c
@@ -1261,22 +1261,24 @@ static void ath12k_dp_reoq_lut_cleanup(struct ath12k_base *ab)
if (!ab->hw_params->reoq_lut_support)
return;
- if (dp->reoq_lut.vaddr) {
+ if (dp->reoq_lut.vaddr_unaligned) {
ath12k_hif_write32(ab,
HAL_SEQ_WCSS_UMAC_REO_REG +
HAL_REO1_QDESC_LUT_BASE0(ab), 0);
- dma_free_coherent(ab->dev, DP_REOQ_LUT_SIZE,
- dp->reoq_lut.vaddr, dp->reoq_lut.paddr);
- dp->reoq_lut.vaddr = NULL;
+ dma_free_coherent(ab->dev, dp->reoq_lut.size,
+ dp->reoq_lut.vaddr_unaligned,
+ dp->reoq_lut.paddr_unaligned);
+ dp->reoq_lut.vaddr_unaligned = NULL;
}
- if (dp->ml_reoq_lut.vaddr) {
+ if (dp->ml_reoq_lut.vaddr_unaligned) {
ath12k_hif_write32(ab,
HAL_SEQ_WCSS_UMAC_REO_REG +
HAL_REO1_QDESC_LUT_BASE1(ab), 0);
- dma_free_coherent(ab->dev, DP_REOQ_LUT_SIZE,
- dp->ml_reoq_lut.vaddr, dp->ml_reoq_lut.paddr);
- dp->ml_reoq_lut.vaddr = NULL;
+ dma_free_coherent(ab->dev, dp->ml_reoq_lut.size,
+ dp->ml_reoq_lut.vaddr_unaligned,
+ dp->ml_reoq_lut.paddr_unaligned);
+ dp->ml_reoq_lut.vaddr_unaligned = NULL;
}
}
@@ -1608,39 +1610,66 @@ static int ath12k_dp_cc_init(struct ath12k_base *ab)
return ret;
}
+static int ath12k_dp_alloc_reoq_lut(struct ath12k_base *ab,
+ struct ath12k_reo_q_addr_lut *lut)
+{
+ lut->size = DP_REOQ_LUT_SIZE + HAL_REO_QLUT_ADDR_ALIGN - 1;
+ lut->vaddr_unaligned = dma_alloc_coherent(ab->dev, lut->size,
+ &lut->paddr_unaligned,
+ GFP_KERNEL | __GFP_ZERO);
+ if (!lut->vaddr_unaligned)
+ return -ENOMEM;
+
+ lut->vaddr = PTR_ALIGN(lut->vaddr_unaligned, HAL_REO_QLUT_ADDR_ALIGN);
+ lut->paddr = lut->paddr_unaligned +
+ ((unsigned long)lut->vaddr - (unsigned long)lut->vaddr_unaligned);
+ return 0;
+}
+
static int ath12k_dp_reoq_lut_setup(struct ath12k_base *ab)
{
struct ath12k_dp *dp = &ab->dp;
+ u32 val;
+ int ret;
if (!ab->hw_params->reoq_lut_support)
return 0;
- dp->reoq_lut.vaddr = dma_alloc_coherent(ab->dev,
- DP_REOQ_LUT_SIZE,
- &dp->reoq_lut.paddr,
- GFP_KERNEL | __GFP_ZERO);
- if (!dp->reoq_lut.vaddr) {
+ ret = ath12k_dp_alloc_reoq_lut(ab, &dp->reoq_lut);
+ if (ret) {
ath12k_warn(ab, "failed to allocate memory for reoq table");
- return -ENOMEM;
+ return ret;
}
- dp->ml_reoq_lut.vaddr = dma_alloc_coherent(ab->dev,
- DP_REOQ_LUT_SIZE,
- &dp->ml_reoq_lut.paddr,
- GFP_KERNEL | __GFP_ZERO);
- if (!dp->ml_reoq_lut.vaddr) {
+ ret = ath12k_dp_alloc_reoq_lut(ab, &dp->ml_reoq_lut);
+ if (ret) {
ath12k_warn(ab, "failed to allocate memory for ML reoq table");
- dma_free_coherent(ab->dev, DP_REOQ_LUT_SIZE,
- dp->reoq_lut.vaddr, dp->reoq_lut.paddr);
- dp->reoq_lut.vaddr = NULL;
- return -ENOMEM;
+ dma_free_coherent(ab->dev, dp->reoq_lut.size,
+ dp->reoq_lut.vaddr_unaligned,
+ dp->reoq_lut.paddr_unaligned);
+ dp->reoq_lut.vaddr_unaligned = NULL;
+ return ret;
}
+ /* Bits in the register have address [39:8] LUT base address to be
+ * allocated such that LSBs are assumed to be zero. Also, current
+ * design supports paddr upto 4 GB max hence it fits in 32 bit register only
+ */
+
ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_QDESC_LUT_BASE0(ab),
- dp->reoq_lut.paddr);
+ dp->reoq_lut.paddr >> 8);
+
ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_QDESC_LUT_BASE1(ab),
dp->ml_reoq_lut.paddr >> 8);
+ val = ath12k_hif_read32(ab, HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_QDESC_ADDR(ab));
+
+ ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_QDESC_ADDR(ab),
+ val | HAL_REO_QDESC_ADDR_READ_LUT_ENABLE);
+
+ ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_QDESC_MAX_PEERID(ab),
+ HAL_REO_QDESC_MAX_PEERID);
+
return 0;
}
diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index 427a87b63dec..e8dbba0c3bb7 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -311,8 +311,11 @@ struct ath12k_reo_queue_ref {
} __packed;
struct ath12k_reo_q_addr_lut {
- dma_addr_t paddr;
+ u32 *vaddr_unaligned;
u32 *vaddr;
+ dma_addr_t paddr_unaligned;
+ dma_addr_t paddr;
+ u32 size;
};
struct ath12k_dp {
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 66603e9c154b..81e036f1d70f 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -3242,8 +3242,14 @@ static int ath12k_dp_rx_h_defrag_reo_reinject(struct ath12k *ar,
reo_ent_ring->rx_mpdu_info.peer_meta_data =
reo_dest_ring->rx_mpdu_info.peer_meta_data;
- reo_ent_ring->queue_addr_lo = cpu_to_le32(lower_32_bits(rx_tid->paddr));
- queue_addr_hi = upper_32_bits(rx_tid->paddr);
+ if (ab->hw_params->reoq_lut_support) {
+ reo_ent_ring->queue_addr_lo = reo_dest_ring->rx_mpdu_info.peer_meta_data;
+ queue_addr_hi = 0;
+ } else {
+ reo_ent_ring->queue_addr_lo = cpu_to_le32(lower_32_bits(rx_tid->paddr));
+ queue_addr_hi = upper_32_bits(rx_tid->paddr);
+ }
+
reo_ent_ring->info0 = le32_encode_bits(queue_addr_hi,
HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI) |
le32_encode_bits(dst_ind,
diff --git a/drivers/net/wireless/ath/ath12k/hal.h b/drivers/net/wireless/ath/ath12k/hal.h
index 9f12ed84a653..76bb095c62e6 100644
--- a/drivers/net/wireless/ath/ath12k/hal.h
+++ b/drivers/net/wireless/ath/ath12k/hal.h
@@ -22,6 +22,7 @@ struct ath12k_base;
#define HAL_MAX_AVAIL_BLK_RES 3
#define HAL_RING_BASE_ALIGN 8
+#define HAL_REO_QLUT_ADDR_ALIGN 256
#define HAL_WBM_IDLE_SCATTER_BUF_SIZE_MAX 32704
/* TODO: Check with hw team on the supported scatter buf size */
@@ -40,6 +41,7 @@ struct ath12k_base;
#define HAL_OFFSET_FROM_HP_TO_TP 4
#define HAL_SHADOW_REG(x) (HAL_SHADOW_BASE_ADDR + (4 * (x)))
+#define HAL_REO_QDESC_MAX_PEERID 8191
/* WCSS Relative address */
#define HAL_SEQ_WCSS_CMEM_OFFSET 0x00100000
@@ -141,6 +143,8 @@ struct ath12k_base;
#define HAL_REO1_DEST_RING_CTRL_IX_1 0x00000008
#define HAL_REO1_DEST_RING_CTRL_IX_2 0x0000000c
#define HAL_REO1_DEST_RING_CTRL_IX_3 0x00000010
+#define HAL_REO1_QDESC_ADDR(ab) ((ab)->hw_params->regs->hal_reo1_qdesc_addr)
+#define HAL_REO1_QDESC_MAX_PEERID(ab) ((ab)->hw_params->regs->hal_reo1_qdesc_max_peerid)
#define HAL_REO1_SW_COOKIE_CFG0(ab) ((ab)->hw_params->regs->hal_reo1_sw_cookie_cfg0)
#define HAL_REO1_SW_COOKIE_CFG1(ab) ((ab)->hw_params->regs->hal_reo1_sw_cookie_cfg1)
#define HAL_REO1_QDESC_LUT_BASE0(ab) ((ab)->hw_params->regs->hal_reo1_qdesc_lut_base0)
@@ -328,6 +332,8 @@ struct ath12k_base;
#define HAL_REO1_SW_COOKIE_CFG_ALIGN BIT(18)
#define HAL_REO1_SW_COOKIE_CFG_ENABLE BIT(19)
#define HAL_REO1_SW_COOKIE_CFG_GLOBAL_ENABLE BIT(20)
+#define HAL_REO_QDESC_ADDR_READ_LUT_ENABLE BIT(7)
+#define HAL_REO_QDESC_ADDR_READ_CLEAR_QDESC_ARRAY BIT(6)
/* CE ring bit field mask and shift */
#define HAL_CE_DST_R0_DEST_CTRL_MAX_LEN GENMASK(15, 0)
diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index 0ba6aedc8405..1d1a59819bbe 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -997,6 +997,8 @@ static const struct ath12k_hw_regs qcn9274_v2_regs = {
.hal_reo1_sw_cookie_cfg1 = 0x00000070,
.hal_reo1_qdesc_lut_base0 = 0x00000074,
.hal_reo1_qdesc_lut_base1 = 0x00000078,
+ .hal_reo1_qdesc_addr = 0x0000007c,
+ .hal_reo1_qdesc_max_peerid = 0x00000088,
.hal_reo1_ring_base_lsb = 0x00000500,
.hal_reo1_ring_base_msb = 0x00000504,
.hal_reo1_ring_id = 0x00000508,
diff --git a/drivers/net/wireless/ath/ath12k/hw.h b/drivers/net/wireless/ath/ath12k/hw.h
index d4a2e47169d9..a9fc24074c9f 100644
--- a/drivers/net/wireless/ath/ath12k/hw.h
+++ b/drivers/net/wireless/ath/ath12k/hw.h
@@ -311,6 +311,9 @@ struct ath12k_hw_regs {
u32 hal_tcl_status_ring_base_lsb;
+ u32 hal_reo1_qdesc_addr;
+ u32 hal_reo1_qdesc_max_peerid;
+
u32 hal_wbm_idle_ring_base_lsb;
u32 hal_wbm_idle_ring_misc_addr;
u32 hal_wbm_r0_idle_list_cntl_addr;
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index c8248675354c..00b3c0f8741c 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -3684,7 +3684,8 @@ ath12k_fill_band_to_mac_param(struct ath12k_base *soc,
}
static void
-ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cfg,
+ath12k_wmi_copy_resource_config(struct ath12k_base *ab,
+ struct ath12k_wmi_resource_config_params *wmi_cfg,
struct ath12k_wmi_resource_config_arg *tg_cfg)
{
wmi_cfg->num_vdevs = cpu_to_le32(tg_cfg->num_vdevs);
@@ -3751,6 +3752,9 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION);
wmi_cfg->host_service_flags = cpu_to_le32(tg_cfg->is_reg_cc_ext_event_supported <<
WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT);
+ if (ab->hw_params->reoq_lut_support)
+ wmi_cfg->host_service_flags |=
+ cpu_to_le32(1 << WMI_RSRC_CFG_HOST_SVC_FLAG_REO_QREF_SUPPORT_BIT);
wmi_cfg->ema_max_vap_cnt = cpu_to_le32(tg_cfg->ema_max_vap_cnt);
wmi_cfg->ema_max_profile_period = cpu_to_le32(tg_cfg->ema_max_profile_period);
wmi_cfg->flags2 |= cpu_to_le32(WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET);
@@ -3791,7 +3795,7 @@ static int ath12k_init_cmd_send(struct ath12k_wmi_pdev *wmi,
ptr = skb->data + sizeof(*cmd);
cfg = ptr;
- ath12k_wmi_copy_resource_config(cfg, &arg->res_cfg);
+ ath12k_wmi_copy_resource_config(ab, cfg, &arg->res_cfg);
cfg->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_RESOURCE_CONFIG,
sizeof(*cfg));
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index be4ac91dd34f..bd7312f3cf24 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -2461,6 +2461,7 @@ struct wmi_init_cmd {
} __packed;
#define WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT 4
+#define WMI_RSRC_CFG_HOST_SVC_FLAG_REO_QREF_SUPPORT_BIT 12
#define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION GENMASK(5, 4)
#define WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 BIT(5)
#define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET BIT(9)
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH ath-next v4 2/3] wifi: ath12k: Add support to clear qdesc array in REO cache
2025-04-02 15:25 [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274 Nithyanantham Paramasivam
2025-04-02 15:25 ` [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature Nithyanantham Paramasivam
@ 2025-04-02 15:25 ` Nithyanantham Paramasivam
2025-04-02 15:37 ` Vasanthakumar Thiagarajan
2025-04-02 15:25 ` [PATCH ath-next v4 3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274 Nithyanantham Paramasivam
2025-04-03 18:52 ` [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table " Jeff Johnson
3 siblings, 1 reply; 8+ messages in thread
From: Nithyanantham Paramasivam @ 2025-04-02 15:25 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Balamurugan S, Nithyanantham Paramasivam
From: Balamurugan S <quic_bselvara@quicinc.com>
Currently, the existing code lacks functionality to clear the qdesc
array in the REO cache. As a result, any updates in the LUT are not
reflected in the REO cache. To address this issue, add functionality
to clear the qdesc array in the REO cache during a peer TID update.
To do this, set the CLEAR_DESC_ARRAY field of
WCSS_UMAC_REO_R0_QDESC_ADDR_READ and then reset it.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Signed-off-by: Balamurugan S <quic_bselvara@quicinc.com>
Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_rx.c | 1 +
drivers/net/wireless/ath/ath12k/hal.h | 1 +
drivers/net/wireless/ath/ath12k/hal_rx.c | 19 ++++++++++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 81e036f1d70f..48d907a400b3 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -762,6 +762,7 @@ static void ath12k_peer_rx_tid_qref_setup(struct ath12k_base *ab, u16 peer_id, u
qref->info1 = u32_encode_bits(upper_32_bits(paddr),
BUFFER_ADDR_INFO1_ADDR) |
u32_encode_bits(tid, DP_REO_QREF_NUM);
+ ath12k_hal_reo_shared_qaddr_cache_clear(ab);
}
static void ath12k_peer_rx_tid_qref_reset(struct ath12k_base *ab, u16 peer_id, u16 tid)
diff --git a/drivers/net/wireless/ath/ath12k/hal.h b/drivers/net/wireless/ath/ath12k/hal.h
index 76bb095c62e6..339812d38338 100644
--- a/drivers/net/wireless/ath/ath12k/hal.h
+++ b/drivers/net/wireless/ath/ath12k/hal.h
@@ -1172,4 +1172,5 @@ int ath12k_hal_srng_update_shadow_config(struct ath12k_base *ab,
void ath12k_hal_srng_shadow_config(struct ath12k_base *ab);
void ath12k_hal_srng_shadow_update_hp_tp(struct ath12k_base *ab,
struct hal_srng *srng);
+void ath12k_hal_reo_shared_qaddr_cache_clear(struct ath12k_base *ab);
#endif
diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.c b/drivers/net/wireless/ath/ath12k/hal_rx.c
index ac17d6223fa7..98eeccc68fcd 100644
--- a/drivers/net/wireless/ath/ath12k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath12k/hal_rx.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include "debug.h"
@@ -851,3 +851,20 @@ void ath12k_hal_reo_hw_setup(struct ath12k_base *ab, u32 ring_hash_map)
ath12k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3,
ring_hash_map);
}
+
+void ath12k_hal_reo_shared_qaddr_cache_clear(struct ath12k_base *ab)
+{
+ u32 val;
+
+ lockdep_assert_held(&ab->base_lock);
+ val = ath12k_hif_read32(ab, HAL_SEQ_WCSS_UMAC_REO_REG +
+ HAL_REO1_QDESC_ADDR(ab));
+
+ val |= u32_encode_bits(1, HAL_REO_QDESC_ADDR_READ_CLEAR_QDESC_ARRAY);
+ ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG +
+ HAL_REO1_QDESC_ADDR(ab), val);
+
+ val &= ~HAL_REO_QDESC_ADDR_READ_CLEAR_QDESC_ARRAY;
+ ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG +
+ HAL_REO1_QDESC_ADDR(ab), val);
+}
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH ath-next v4 3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274
2025-04-02 15:25 [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274 Nithyanantham Paramasivam
2025-04-02 15:25 ` [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature Nithyanantham Paramasivam
2025-04-02 15:25 ` [PATCH ath-next v4 2/3] wifi: ath12k: Add support to clear qdesc array in REO cache Nithyanantham Paramasivam
@ 2025-04-02 15:25 ` Nithyanantham Paramasivam
2025-04-02 15:38 ` Vasanthakumar Thiagarajan
2025-04-03 18:52 ` [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table " Jeff Johnson
3 siblings, 1 reply; 8+ messages in thread
From: Nithyanantham Paramasivam @ 2025-04-02 15:25 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Nithyanantham Paramasivam
Enable the REO queue lookup table feature for QCN9274 by setting the
reoq_lut_support flag.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
---
drivers/net/wireless/ath/ath12k/hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
index 1d1a59819bbe..20f04f5c6b5b 100644
--- a/drivers/net/wireless/ath/ath12k/hw.c
+++ b/drivers/net/wireless/ath/ath12k/hw.c
@@ -1288,7 +1288,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
.download_calib = true,
.supports_suspend = false,
.tcl_ring_retry = true,
- .reoq_lut_support = false,
+ .reoq_lut_support = true,
.supports_shadow_regs = false,
.num_tcl_banks = 48,
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature
2025-04-02 15:25 ` [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature Nithyanantham Paramasivam
@ 2025-04-02 15:35 ` Vasanthakumar Thiagarajan
0 siblings, 0 replies; 8+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-04-02 15:35 UTC (permalink / raw)
To: Nithyanantham Paramasivam, ath12k; +Cc: linux-wireless, Sriram R
On 4/2/2025 8:55 PM, Nithyanantham Paramasivam wrote:
> From: Sriram R <quic_srirrama@quicinc.com>
>
> Instead of storing the REO queue address inside peer entries, REO
> hardware module prefers them to be stored in SRAM which could be
> directly accessed by REO using peer_ID/TID based lookup table
> mechanism.
>
> Fix the enabling of the REO queue lookup table(LUT) feature by
> configuring the LUT address information in the REO hardware register
> and setting the host service flags.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
> Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH ath-next v4 2/3] wifi: ath12k: Add support to clear qdesc array in REO cache
2025-04-02 15:25 ` [PATCH ath-next v4 2/3] wifi: ath12k: Add support to clear qdesc array in REO cache Nithyanantham Paramasivam
@ 2025-04-02 15:37 ` Vasanthakumar Thiagarajan
0 siblings, 0 replies; 8+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-04-02 15:37 UTC (permalink / raw)
To: Nithyanantham Paramasivam, ath12k; +Cc: linux-wireless, Balamurugan S
On 4/2/2025 8:55 PM, Nithyanantham Paramasivam wrote:
> From: Balamurugan S <quic_bselvara@quicinc.com>
>
> Currently, the existing code lacks functionality to clear the qdesc
> array in the REO cache. As a result, any updates in the LUT are not
> reflected in the REO cache. To address this issue, add functionality
> to clear the qdesc array in the REO cache during a peer TID update.
> To do this, set the CLEAR_DESC_ARRAY field of
> WCSS_UMAC_REO_R0_QDESC_ADDR_READ and then reset it.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Balamurugan S <quic_bselvara@quicinc.com>
> Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH ath-next v4 3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274
2025-04-02 15:25 ` [PATCH ath-next v4 3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274 Nithyanantham Paramasivam
@ 2025-04-02 15:38 ` Vasanthakumar Thiagarajan
0 siblings, 0 replies; 8+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-04-02 15:38 UTC (permalink / raw)
To: Nithyanantham Paramasivam, ath12k; +Cc: linux-wireless
On 4/2/2025 8:55 PM, Nithyanantham Paramasivam wrote:
> Enable the REO queue lookup table feature for QCN9274 by setting the
> reoq_lut_support flag.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Nithyanantham Paramasivam <quic_nithp@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274
2025-04-02 15:25 [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274 Nithyanantham Paramasivam
` (2 preceding siblings ...)
2025-04-02 15:25 ` [PATCH ath-next v4 3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274 Nithyanantham Paramasivam
@ 2025-04-03 18:52 ` Jeff Johnson
3 siblings, 0 replies; 8+ messages in thread
From: Jeff Johnson @ 2025-04-03 18:52 UTC (permalink / raw)
To: ath12k, Nithyanantham Paramasivam; +Cc: linux-wireless
On Wed, 02 Apr 2025 20:55:26 +0530, Nithyanantham Paramasivam wrote:
> Instead of storing the REO queue address inside peer entries, REO
> hardware module prefers them to be stored in SRAM which could be
> directly accessed by REO using peer_ID/TID based Lookup table(LUT)
> mechanism. This feature is expected to improve stability by reduced
> interaction between host and firmware during both MLO and non-MLO
> operations.This feature is enabled only for the QCN9274, so it does
> not impact the WCN7850.
>
> [...]
Applied, thanks!
[1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature
commit: 0bbcd42b15fa730f393a01bc818802d9f0b04197
[2/3] wifi: ath12k: Add support to clear qdesc array in REO cache
commit: 30b03edd265a79b779c29c12ad640c91830ce7ca
[3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274
commit: 89ac53e96217bd5525ee56eaa1b8ef2b398a9ad6
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-04-03 18:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 15:25 [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table on QCN9274 Nithyanantham Paramasivam
2025-04-02 15:25 ` [PATCH ath-next v4 1/3] wifi: ath12k: Fix the enabling of REO queue lookup table feature Nithyanantham Paramasivam
2025-04-02 15:35 ` Vasanthakumar Thiagarajan
2025-04-02 15:25 ` [PATCH ath-next v4 2/3] wifi: ath12k: Add support to clear qdesc array in REO cache Nithyanantham Paramasivam
2025-04-02 15:37 ` Vasanthakumar Thiagarajan
2025-04-02 15:25 ` [PATCH ath-next v4 3/3] wifi: ath12k: Enable REO queue lookup table feature on QCN9274 Nithyanantham Paramasivam
2025-04-02 15:38 ` Vasanthakumar Thiagarajan
2025-04-03 18:52 ` [PATCH ath-next v4 0/3] wifi: ath12k: Enable REO queue lookup table " Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox