diff mbox series

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

Message ID 20211019214320.2035704-42-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 5.15-rc6 | expand

Commit Message

Hauke Mehrtens Oct. 19, 2021, 9:43 p.m. UTC
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 <hauke@hauke-m.de>
---
 patches/0104-mhi-reg-len.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 patches/0104-mhi-reg-len.patch
diff mbox series

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) {