diff mbox series

[2/3] ath11k: change return buffer manager for QCA6390

Message ID 20210914163726.38604-2-jouni@codeaurora.org (mailing list archive)
State Accepted
Commit 734223d78428de3c7c7d7bc04daf258085780d90
Delegated to: Kalle Valo
Headers show
Series [1/3] ath11k: Change number of TCL rings to one for QCA6390 | expand

Commit Message

Jouni Malinen Sept. 14, 2021, 4:37 p.m. UTC
From: Baochen Qiang <bqiang@codeaurora.org>

QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not HAL_RX_BUF_RBM_SW3_BM.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1

Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/core.c   |  5 +++++
 drivers/net/wireless/ath/ath11k/dp.c     |  2 +-
 drivers/net/wireless/ath/ath11k/dp_rx.c  | 22 +++++++++++-----------
 drivers/net/wireless/ath/ath11k/hal.c    |  8 ++++++++
 drivers/net/wireless/ath/ath11k/hal.h    |  7 +++++++
 drivers/net/wireless/ath/ath11k/hal_rx.c |  2 +-
 drivers/net/wireless/ath/ath11k/hw.c     |  3 ++-
 drivers/net/wireless/ath/ath11k/hw.h     |  1 +
 8 files changed, 36 insertions(+), 14 deletions(-)

Comments

Kalle Valo Sept. 16, 2021, 10:02 a.m. UTC | #1
Jouni Malinen <jouni@codeaurora.org> writes:

> From: Baochen Qiang <bqiang@codeaurora.org>
>
> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not HAL_RX_BUF_RBM_SW3_BM.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>

There were checkpatch warnings, I fixex them in the pending branch:

drivers/net/wireless/ath/ath11k/dp.c:825: line length of 97 exceeds 90 columns
drivers/net/wireless/ath/ath11k/hal_rx.c:375: line length of 95 exceeds 90 columns
drivers/net/wireless/ath/ath11k/dp_rx.c:3073: line length of 94 exceeds 90 columns
drivers/net/wireless/ath/ath11k/dp_rx.c:3083: line length of 94 exceeds 90 columns
drivers/net/wireless/ath/ath11k/dp_rx.c:3472: line length of 100 exceeds 90 columns
drivers/net/wireless/ath/ath11k/dp_rx.c:5104: line length of 93 exceeds 90 columns
drivers/net/wireless/ath/ath11k/dp_rx.c:5109: line length of 93 exceeds 90 columns
Kalle Valo Sept. 28, 2021, 3:09 p.m. UTC | #2
Jouni Malinen <jouni@codeaurora.org> writes:

> From: Baochen Qiang <bqiang@codeaurora.org>
>
> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not HAL_RX_BUF_RBM_SW3_BM.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>

[...]

> --- a/drivers/net/wireless/ath/ath11k/hal.c
> +++ b/drivers/net/wireless/ath/ath11k/hal.c
> @@ -189,6 +189,14 @@ static const struct hal_srng_config hw_srng_config_template[] = {
>  	},
>  };
>  
> +const struct hal_param ath11k_hal_params_ipq8074 = {
> +	.rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM,
> +};
> +
> +const struct hal_param ath11k_hal_params_qca6390 = {
> +	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
> +};
> +
>  static int ath11k_hal_alloc_cont_rdp(struct ath11k_base *ab)
>  {
>  	struct ath11k_hal *hal = &ab->hal;
> diff --git a/drivers/net/wireless/ath/ath11k/hal.h b/drivers/net/wireless/ath/ath11k/hal.h
> index 35ed3a14e200..1bf6e040120f 100644
> --- a/drivers/net/wireless/ath/ath11k/hal.h
> +++ b/drivers/net/wireless/ath/ath11k/hal.h
> @@ -903,6 +903,13 @@ struct ath11k_hal {
>  	int num_shadow_reg_configured;
>  };
>  
> +struct hal_param {
> +	enum hal_rx_buf_return_buf_manager rx_buf_rbm;
> +};
> +
> +extern const struct hal_param ath11k_hal_params_ipq8074;
> +extern const struct hal_param ath11k_hal_params_qca6390;

In the pending branch I renamed these to struct ath11k_hw_hal_params and
moved to hw.c and hw.h, respectively.
Kalle Valo Sept. 28, 2021, 3:14 p.m. UTC | #3
Jouni Malinen <jouni@codeaurora.org> writes:

> From: Baochen Qiang <bqiang@codeaurora.org>
>
> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not HAL_RX_BUF_RBM_SW3_BM.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>

Same question as in patch 1, does this fix a bug or is just a
theoretical issue found during code review?
Baochen Qiang Sept. 29, 2021, 2:42 a.m. UTC | #4
On 2021-09-28 23:14, Kalle Valo wrote:
> Jouni Malinen <jouni@codeaurora.org> writes:
> 
>> From: Baochen Qiang <bqiang@codeaurora.org>
>> 
>> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not 
>> HAL_RX_BUF_RBM_SW3_BM.
>> 
>> Tested-on: QCA6390 hw2.0 PCI 
>> WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>> 
>> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
>> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
> 
> Same question as in patch 1, does this fix a bug or is just a
> theoretical issue found during code review?

Yes, this patch did fix a bug.
QCA6390 firmware expects some specific packets from WBM2SW1 ring, which, 
however, will
not happen because they are routed directly to host through WBM2SW3 ring 
due to wrong
configuration of RBM.
Kalle Valo Oct. 1, 2021, 6:26 a.m. UTC | #5
bqiang@codeaurora.org writes:

> On 2021-09-28 23:14, Kalle Valo wrote:
>> Jouni Malinen <jouni@codeaurora.org> writes:
>>
>>> From: Baochen Qiang <bqiang@codeaurora.org>
>>>
>>> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not
>>> HAL_RX_BUF_RBM_SW3_BM.
>>>
>>> Tested-on: QCA6390 hw2.0 PCI
>>> WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>>>
>>> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
>>> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
>>
>> Same question as in patch 1, does this fix a bug or is just a
>> theoretical issue found during code review?
>
> Yes, this patch did fix a bug.

Ok, please always describe the bug you are fixing in the commit log.
This is documented in the wiki pages which you definitely should read
very carefully, links below.

> QCA6390 firmware expects some specific packets from WBM2SW1 ring,
> which, however, will not happen because they are routed directly to
> host through WBM2SW3 ring due to wrong configuration of RBM.

Can you give higher level description of the bug (from user's
perspective)? For example, what test case was failing or how did you
notice this? I'll then add it to the commit log.
Kalle Valo Oct. 5, 2021, 2:10 p.m. UTC | #6
bqiang@codeaurora.org writes:

> On 2021-09-28 23:14, Kalle Valo wrote:
>> Jouni Malinen <jouni@codeaurora.org> writes:
>>
>>> From: Baochen Qiang <bqiang@codeaurora.org>
>>>
>>> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not
>>> HAL_RX_BUF_RBM_SW3_BM.
>>>
>>> Tested-on: QCA6390 hw2.0 PCI
>>> WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>>>
>>> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
>>> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
>>
>> Same question as in patch 1, does this fix a bug or is just a
>> theoretical issue found during code review?
>
> Yes, this patch did fix a bug.
>
> QCA6390 firmware expects some specific packets from WBM2SW1 ring,
> which, however, will not happen because they are routed directly to
> host through WBM2SW3 ring due to wrong configuration of RBM.

What specific packets exactly?
Kalle Valo Oct. 25, 2021, 1:02 p.m. UTC | #7
Kalle Valo <kvalo@codeaurora.org> writes:

> bqiang@codeaurora.org writes:
>
>> On 2021-09-28 23:14, Kalle Valo wrote:
>>> Jouni Malinen <jouni@codeaurora.org> writes:
>>>
>>>> From: Baochen Qiang <bqiang@codeaurora.org>
>>>>
>>>> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not
>>>> HAL_RX_BUF_RBM_SW3_BM.
>>>>
>>>> Tested-on: QCA6390 hw2.0 PCI
>>>> WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>>>>
>>>> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
>>>> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
>>>
>>> Same question as in patch 1, does this fix a bug or is just a
>>> theoretical issue found during code review?
>>
>> Yes, this patch did fix a bug.
>>
>> QCA6390 firmware expects some specific packets from WBM2SW1 ring,
>> which, however, will not happen because they are routed directly to
>> host through WBM2SW3 ring due to wrong configuration of RBM.
>
> What specific packets exactly?

We discussed this internally and I now changed the commit log to:

ath11k: change return buffer manager for QCA6390

QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not HAL_RX_BUF_RBM_SW3_BM. This is
needed to fix a case where an A-MSDU has an unexpected LLC/SNAP header in the
first subframe (CVE-2020-24588).

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1

Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo Oct. 25, 2021, 1:03 p.m. UTC | #8
Jouni Malinen <jouni@codeaurora.org> wrote:

> QCA6390 firmware uses HAL_RX_BUF_RBM_SW1_BM, not HAL_RX_BUF_RBM_SW3_BM. This is
> needed to fix a case where an A-MSDU has an unexpected LLC/SNAP header in the
> first subframe (CVE-2020-24588).
> 
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
> 
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

734223d78428 ath11k: change return buffer manager for QCA6390
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index af76e37d11ae..265ff225bd81 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -82,6 +82,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.sram_dump = NULL,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX,
+		.hal_params = &ath11k_hal_params_ipq8074,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -131,6 +132,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.sram_dump = NULL,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX,
+		.hal_params = &ath11k_hal_params_ipq8074,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -179,6 +181,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.sram_dump = &sram_dump_qca6390,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
+		.hal_params = &ath11k_hal_params_qca6390,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -227,6 +230,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.sram_dump = NULL,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX,
+		.hal_params = &ath11k_hal_params_ipq8074,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -274,6 +278,7 @@  static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = false,
 		.sram_dump = &sram_dump_wcn6855,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
+		.hal_params = &ath11k_hal_params_qca6390,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index f7049a13973d..4a4f30e933a3 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -822,7 +822,7 @@  int ath11k_dp_service_srng(struct ath11k_base *ab,
 				struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring;
 
 				ath11k_dp_rxbufs_replenish(ab, id, rx_ring, 0,
-							   HAL_RX_BUF_RBM_SW3_BM);
+							   ab->hw_params.hal_params->rx_buf_rbm);
 			}
 		}
 	}
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index c50f70913583..913e8a9878eb 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -499,7 +499,7 @@  static int ath11k_dp_rxdma_ring_buf_setup(struct ath11k *ar,
 
 	rx_ring->bufs_max = num_entries;
 	ath11k_dp_rxbufs_replenish(ar->ab, dp->mac_id, rx_ring, num_entries,
-				   HAL_RX_BUF_RBM_SW3_BM);
+				   ar->ab->hw_params.hal_params->rx_buf_rbm);
 	return 0;
 }
 
@@ -2756,7 +2756,7 @@  int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
 		rx_ring = &ar->dp.rx_refill_buf_ring;
 
 		ath11k_dp_rxbufs_replenish(ab, i, rx_ring, num_buffs_reaped[i],
-					   HAL_RX_BUF_RBM_SW3_BM);
+					   ab->hw_params.hal_params->rx_buf_rbm);
 	}
 
 	ath11k_dp_rx_process_received_packets(ab, napi, &msdu_list,
@@ -3070,7 +3070,7 @@  static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id,
 
 		if (!skb) {
 			ath11k_hal_rx_buf_addr_info_set(rx_mon_status_desc, 0, 0,
-							HAL_RX_BUF_RBM_SW3_BM);
+							ab->hw_params.hal_params->rx_buf_rbm);
 			num_buffs_reaped++;
 			break;
 		}
@@ -3080,7 +3080,7 @@  static int ath11k_dp_rx_reap_mon_status_ring(struct ath11k_base *ab, int mac_id,
 			 FIELD_PREP(DP_RXDMA_BUF_COOKIE_BUF_ID, buf_id);
 
 		ath11k_hal_rx_buf_addr_info_set(rx_mon_status_desc, rxcb->paddr,
-						cookie, HAL_RX_BUF_RBM_SW3_BM);
+						cookie, ab->hw_params.hal_params->rx_buf_rbm);
 		ath11k_hal_srng_src_get_next_entry(ab, srng);
 		num_buffs_reaped++;
 	}
@@ -3469,7 +3469,7 @@  static int ath11k_dp_rx_h_defrag_reo_reinject(struct ath11k *ar, struct dp_rx_ti
 	cookie = FIELD_PREP(DP_RXDMA_BUF_COOKIE_PDEV_ID, dp->mac_id) |
 		 FIELD_PREP(DP_RXDMA_BUF_COOKIE_BUF_ID, buf_id);
 
-	ath11k_hal_rx_buf_addr_info_set(msdu0, paddr, cookie, HAL_RX_BUF_RBM_SW3_BM);
+	ath11k_hal_rx_buf_addr_info_set(msdu0, paddr, cookie, ab->hw_params.hal_params->rx_buf_rbm);
 
 	/* Fill mpdu details into reo entrace ring */
 	srng = &ab->hal.srng_list[ab->dp.reo_reinject_ring.ring_id];
@@ -3846,7 +3846,7 @@  int ath11k_dp_process_rx_err(struct ath11k_base *ab, struct napi_struct *napi,
 		ath11k_hal_rx_msdu_link_info_get(link_desc_va, &num_msdus, msdu_cookies,
 						 &rbm);
 		if (rbm != HAL_RX_BUF_RBM_WBM_IDLE_DESC_LIST &&
-		    rbm != HAL_RX_BUF_RBM_SW3_BM) {
+		    rbm != ab->hw_params.hal_params->rx_buf_rbm) {
 			ab->soc_stats.invalid_rbm++;
 			ath11k_warn(ab, "invalid return buffer manager %d\n", rbm);
 			ath11k_dp_rx_link_desc_return(ab, desc,
@@ -3902,7 +3902,7 @@  int ath11k_dp_process_rx_err(struct ath11k_base *ab, struct napi_struct *napi,
 		rx_ring = &ar->dp.rx_refill_buf_ring;
 
 		ath11k_dp_rxbufs_replenish(ab, i, rx_ring, n_bufs_reaped[i],
-					   HAL_RX_BUF_RBM_SW3_BM);
+					   ab->hw_params.hal_params->rx_buf_rbm);
 	}
 
 	return tot_n_bufs_reaped;
@@ -4198,7 +4198,7 @@  int ath11k_dp_rx_process_wbm_err(struct ath11k_base *ab,
 		rx_ring = &ar->dp.rx_refill_buf_ring;
 
 		ath11k_dp_rxbufs_replenish(ab, i, rx_ring, num_buffs_reaped[i],
-					   HAL_RX_BUF_RBM_SW3_BM);
+					   ab->hw_params.hal_params->rx_buf_rbm);
 	}
 
 	rcu_read_lock();
@@ -4307,7 +4307,7 @@  int ath11k_dp_process_rxdma_err(struct ath11k_base *ab, int mac_id, int budget)
 
 	if (num_buf_freed)
 		ath11k_dp_rxbufs_replenish(ab, mac_id, rx_ring, num_buf_freed,
-					   HAL_RX_BUF_RBM_SW3_BM);
+					   ab->hw_params.hal_params->rx_buf_rbm);
 
 	return budget - quota;
 }
@@ -5101,12 +5101,12 @@  static void ath11k_dp_rx_mon_dest_process(struct ath11k *ar, int mac_id,
 			ath11k_dp_rxbufs_replenish(ar->ab, dp->mac_id,
 						   &dp->rxdma_mon_buf_ring,
 						   rx_bufs_used,
-						   HAL_RX_BUF_RBM_SW3_BM);
+						   ar->ab->hw_params.hal_params->rx_buf_rbm);
 		else
 			ath11k_dp_rxbufs_replenish(ar->ab, dp->mac_id,
 						   &dp->rx_refill_buf_ring,
 						   rx_bufs_used,
-						   HAL_RX_BUF_RBM_SW3_BM);
+						   ar->ab->hw_params.hal_params->rx_buf_rbm);
 	}
 }
 
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index eaa0edca5576..f1492cde84ed 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -189,6 +189,14 @@  static const struct hal_srng_config hw_srng_config_template[] = {
 	},
 };
 
+const struct hal_param ath11k_hal_params_ipq8074 = {
+	.rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM,
+};
+
+const struct hal_param ath11k_hal_params_qca6390 = {
+	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
+};
+
 static int ath11k_hal_alloc_cont_rdp(struct ath11k_base *ab)
 {
 	struct ath11k_hal *hal = &ab->hal;
diff --git a/drivers/net/wireless/ath/ath11k/hal.h b/drivers/net/wireless/ath/ath11k/hal.h
index 35ed3a14e200..1bf6e040120f 100644
--- a/drivers/net/wireless/ath/ath11k/hal.h
+++ b/drivers/net/wireless/ath/ath11k/hal.h
@@ -903,6 +903,13 @@  struct ath11k_hal {
 	int num_shadow_reg_configured;
 };
 
+struct hal_param {
+	enum hal_rx_buf_return_buf_manager rx_buf_rbm;
+};
+
+extern const struct hal_param ath11k_hal_params_ipq8074;
+extern const struct hal_param ath11k_hal_params_qca6390;
+
 u32 ath11k_hal_reo_qdesc_size(u32 ba_window_size, u8 tid);
 void ath11k_hal_reo_qdesc_setup(void *vaddr, int tid, u32 ba_window_size,
 				u32 start_seq, enum hal_pn_type type);
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index f072c95e7434..d4d1c4a9785f 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -372,7 +372,7 @@  int ath11k_hal_wbm_desc_parse_err(struct ath11k_base *ab, void *desc,
 		return -EINVAL;
 
 	if (FIELD_GET(BUFFER_ADDR_INFO1_RET_BUF_MGR,
-		      wbm_desc->buf_addr_info.info1) != HAL_RX_BUF_RBM_SW3_BM) {
+		      wbm_desc->buf_addr_info.info1) != ab->hw_params.hal_params->rx_buf_rbm) {
 		ab->soc_stats.invalid_rbm++;
 		return -EINVAL;
 	}
diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
index 57fab9d085d0..fdfb379b4d08 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -7,10 +7,11 @@ 
 #include <linux/bitops.h>
 #include <linux/bitfield.h>
 
-#include "hw.h"
 #include "core.h"
 #include "ce.h"
 #include "hif.h"
+#include "hal.h"
+#include "hw.h"
 
 /* Map from pdev index to hw mac index */
 static u8 ath11k_hw_ipq8074_mac_from_pdev_id(int pdev_idx)
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 6e68c5b60eaa..c6831fb110ba 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -179,6 +179,7 @@  struct ath11k_hw_params {
 	bool fix_l1ss;
 	const struct ath11k_hw_sram_dump *sram_dump;
 	u8 max_tx_ring;
+	const struct hal_param *hal_params;
 };
 
 struct ath11k_hw_ops {