diff mbox series

package/rtl8821au: fix build failure with Linux version 6.7.0

Message ID 20240408163823.49770-1-giulio.benetti@benettiengineering.com
State Rejected, archived
Headers show
Series package/rtl8821au: fix build failure with Linux version 6.7.0 | expand

Commit Message

Giulio Benetti April 8, 2024, 4:38 p.m. UTC
Add local patch pending upstream to fix build failure with Linux version
6.7.0 and allow to build up to Linux version 6.9.x.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 ...2au-Fix-builds-for-kernels-up-to-6.9.patch | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 package/rtl8821au/0001-rtl8812au-Fix-builds-for-kernels-up-to-6.9.patch
diff mbox series

Patch

diff --git a/package/rtl8821au/0001-rtl8812au-Fix-builds-for-kernels-up-to-6.9.patch b/package/rtl8821au/0001-rtl8812au-Fix-builds-for-kernels-up-to-6.9.patch
new file mode 100644
index 0000000000..29164fb3b7
--- /dev/null
+++ b/package/rtl8821au/0001-rtl8812au-Fix-builds-for-kernels-up-to-6.9.patch
@@ -0,0 +1,52 @@ 
+From 3ea4762b6ea8fc01b967e8d3b627ef3a16fe9d22 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Mon, 8 Apr 2024 18:29:34 +0200
+Subject: [PATCH] rtl8812au: Fix builds for kernels up to 6.9
+
+During commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb55441c57ccc5cc2eab44e1a97698b9d708871d
+function pointer change_beacon() parameter 'info' changed its type, so
+let's change our local function according to that prototype if Linux
+version >= 6.7.0
+
+Upstream: https://github.com/lwfinger/rtl8812au/pull/28
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ os_dep/ioctl_cfg80211.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c
+index 7cdc235..6c2f520 100644
+--- a/os_dep/ioctl_cfg80211.c
++++ b/os_dep/ioctl_cfg80211.c
+@@ -3658,14 +3658,23 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
+ }
+ 
+ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
+-                                struct cfg80211_beacon_data *info)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
++				      struct cfg80211_ap_update *info)
++#else
++				      struct cfg80211_beacon_data *info)
++#endif
+ {
+ 	int ret = 0;
+ 	_adapter *adapter = wiphy_to_adapter(wiphy);
+ 
+ 	DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
+-
+-	ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
++	ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len,
++			     info->beacon.tail, info->beacon.tail_len);
++#else
++	ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail,
++			     info->tail_len);
++#endif
+ 
+ 	return ret;
+ }
+-- 
+2.34.1
+