From 1f1bed5f5c2ea053ee762c2725379e9cae86d5e7 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 28 Dec 2022 12:19:18 +0800 Subject: [PATCH] rtl8189es/rtl8192eu: fix build with kernel 5.10 Signed-off-by: Tianling Shen --- .../kernel/rtl8189es/patches/020-wireless-5.8.patch | 11 +++++++++++ .../kernel/rtl8192eu/patches/030-wireless-5.8.patch | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/package/kernel/rtl8189es/patches/020-wireless-5.8.patch b/package/kernel/rtl8189es/patches/020-wireless-5.8.patch index bd30870678..912cba6859 100644 --- a/package/kernel/rtl8189es/patches/020-wireless-5.8.patch +++ b/package/kernel/rtl8189es/patches/020-wireless-5.8.patch @@ -1,3 +1,14 @@ +--- a/include/osdep_service_linux.h ++++ b/include/osdep_service_linux.h +@@ -220,7 +220,7 @@ typedef void *timer_hdl_context; + #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) + #endif + +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && !defined(BUILD_OPENWRT)) + /* Porting from linux kernel commits + 48eab831ae8b9f7002a533fa4235eed63ea1f1a3 + 3f6cffb8604b537e3d7ea040d7f4368689638eaf --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -438,7 +438,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte diff --git a/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch b/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch index bb145edcf6..bc505e10d7 100644 --- a/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch +++ b/package/kernel/rtl8192eu/patches/030-wireless-5.8.patch @@ -1,3 +1,14 @@ +--- a/include/osdep_service_linux.h ++++ b/include/osdep_service_linux.h +@@ -217,7 +217,7 @@ typedef void *timer_hdl_context; + + typedef unsigned long systime; + +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && !defined(BUILD_OPENWRT)) + /* Porting from linux kernel v5.15-rc1 48eab831ae8b9f7002a533fa4235eed63ea1f1a3 */ + static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr) + { --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -439,9 +439,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte