rtl8189es/rtl8192eu: fix build with kernel 5.10

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-12-28 12:19:18 +08:00
parent 886daef3cf
commit 1f1bed5f5c
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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