[PATCH 41/47] patches: Do not set mhi_controller->reg_len on older kernel versions

Hauke Mehrtens <[email protected]>
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
With kernel 5.15 struct mhi_controller got a new attribute reg_len to
check that the register length is correct. Do not set it on older kernel
versions.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 patches/0104-mhi-reg-len.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 patches/0104-mhi-reg-len.patch

diff --git a/patches/0104-mhi-reg-len.patch b/patches/0104-mhi-reg-len.patch
new file mode 100644
index 00000000..32d1e55a
--- /dev/null
+++ b/patches/0104-mhi-reg-len.patch
@@ -0,0 +1,12 @@
+--- a/drivers/net/wireless/ath/ath11k/mhi.c
++++ b/drivers/net/wireless/ath/ath11k/mhi.c
+@@ -330,7 +330,9 @@ int ath11k_mhi_register(struct ath11k_pc
+ 	mhi_ctrl->cntrl_dev = ab->dev;
+ 	mhi_ctrl->fw_image = ab_pci->amss_path;
+ 	mhi_ctrl->regs = ab->mem;
++#if LINUX_VERSION_IS_GEQ(5,15,0)
+ 	mhi_ctrl->reg_len = ab->mem_len;
++#endif
+ 
+ 	ret = ath11k_mhi_get_msi(ab_pci);
+ 	if (ret) {
-- 
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.