[openwrt/openwrt] rtl8812au-ct: fix build with mac80211 6.9.9 backport
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 13 05:27:09 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/419ceead119b1c0d50012970f217d190f1441aaf
commit 419ceead119b1c0d50012970f217d190f1441aaf
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Jul 13 16:50:59 2024 +0800
rtl8812au-ct: fix build with mac80211 6.9.9 backport
The change_beacon() API has been updated since the 6.7 kernel. Ref:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.9.9&id=66f85d57b7109baf8a7d5ee04049ac9412611d35
Fix build error:
../rtl8812au-ct-2022.10.26~9b2b203a/os_dep/linux/ioctl_cfg80211.c:5984:26: error: initialization of 'int (*)(struct wiphy *, struct net_device *, struct cfg80211_ap_update *)' from incompatible pointer type 'int (*)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *)' [-Werror=incompatible-pointer-types]
5984 | .change_beacon = cfg80211_rtw_change_beacon,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../rtl8812au-ct-2022.10.26~9b2b203a/os_dep/linux/ioctl_cfg80211.c:5984:26: note: (near initialization for 'rtw_cfg80211_ops.change_beacon')
Link: https://patchwork.ozlabs.org/project/openwrt/patch/TYCP286MB0895A26BA1C0517F2CBE71F0BCA72@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM/
Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
.../009-fix-build-on-linux-6.7-kernel.patch | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/package/kernel/rtl8812au-ct/patches/009-fix-build-on-linux-6.7-kernel.patch b/package/kernel/rtl8812au-ct/patches/009-fix-build-on-linux-6.7-kernel.patch
new file mode 100644
index 0000000000..8a5c15427c
--- /dev/null
+++ b/package/kernel/rtl8812au-ct/patches/009-fix-build-on-linux-6.7-kernel.patch
@@ -0,0 +1,29 @@
+--- a/os_dep/linux/ioctl_cfg80211.c
++++ b/os_dep/linux/ioctl_cfg80211.c
+@@ -4020,6 +4020,18 @@ static int cfg80211_rtw_start_ap(struct
+ return ret;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))|| defined(BUILD_OPENWRT)
++static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
++ struct cfg80211_ap_update *info)
++{
++ int ret = 0;
++ _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
++
++ DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
++
++ ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len,
++ info->beacon.tail, info->beacon.tail_len);
++#else
+ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
+ struct cfg80211_beacon_data *info)
+ {
+@@ -4029,6 +4041,7 @@ static int cfg80211_rtw_change_beacon(st
+ 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);
++#endif
+
+ return ret;
+ }
More information about the lede-commits
mailing list