diff --git a/package/kernel/rtl8189es/Makefile b/package/kernel/rtl8189es/Makefile index 1421dca9d9..6fd3e1884a 100644 --- a/package/kernel/rtl8189es/Makefile +++ b/package/kernel/rtl8189es/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2021 ImmortalWrt.org +# Copyright (C) 2021-2022 ImmortalWrt.org include $(TOPDIR)/rules.mk @@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_URL:=https://github.com/jwrdegoede/rtl8189ES_linux.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-03-28 -PKG_SOURCE_VERSION:=39c17661136da48f8e9c644194dce6a7f5076896 -PKG_MIRROR_HASH:=9f4f5aeb0bcfc13ef8376a6c2037f325d6e5434dd57c9d00859afd9e70d1fff1 +PKG_SOURCE_DATE:=2022-10-30 +PKG_SOURCE_VERSION:=e58bd86c9d9408c648b1246a0dd76b16856ec172 +PKG_MIRROR_HASH:=1e4acfd7d1f1f2490b6778068f97e7a63b81575dffd98c93e84cecb287e2c7ad PKG_MAINTAINER:=Hauke Mehrtens PKG_BUILD_PARALLEL:=1 @@ -29,7 +29,7 @@ define KernelPackage/rtl8189es AUTOLOAD:=$(call AutoProbe,rtl8189es) endef -NOSTDINC_FLAGS = \ +NOSTDINC_FLAGS:= \ -I$(PKG_BUILD_DIR) \ -I$(PKG_BUILD_DIR)/include \ -I$(STAGING_DIR)/usr/include/mac80211-backport \ @@ -39,26 +39,18 @@ NOSTDINC_FLAGS = \ -include backport/autoconf.h \ -include backport/backport.h -EXTRA_KCONFIG:= \ - CONFIG_RTL8189ES=m \ - USER_MODULE_NAME=rtl8189es - -EXTRA_CFLAGS:= \ +NOSTDINC_FLAGS+= \ -DRTW_SINGLE_WIPHY \ -DRTW_USE_CFG80211_STA_EVENT \ -DCONFIG_IOCTL_CFG80211 \ -DBUILD_OPENWRT -MAKE_OPTS:= \ - $(KERNEL_MAKE_FLAGS) \ - M="$(PKG_BUILD_DIR)" \ - NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ - USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ - $(EXTRA_KCONFIG) - define Build/Compile - +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M="$(PKG_BUILD_DIR)" \ + NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ + CONFIG_RTL8189ES=m \ + USER_MODULE_NAME=rtl8189es \ modules endef diff --git a/package/kernel/rtl8189es/patches/001-use-kernel-byteorder.patch b/package/kernel/rtl8189es/patches/001-use-kernel-byteorder.patch deleted file mode 100644 index 9e4d3d1999..0000000000 --- a/package/kernel/rtl8189es/patches/001-use-kernel-byteorder.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix compile problem when rtw_byteorder.h and asm/byteorder.h gets -included in addition for example indirectly, do not use realtek own copy -of the byteorder headers. - ---- a/include/drv_types.h -+++ b/include/drv_types.h -@@ -29,7 +29,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/package/kernel/rtl8189es/patches/002-use-kernel-wireless-header.patch b/package/kernel/rtl8189es/patches/002-use-kernel-wireless-header.patch new file mode 100644 index 0000000000..c2c293ac97 --- /dev/null +++ b/package/kernel/rtl8189es/patches/002-use-kernel-wireless-header.patch @@ -0,0 +1,31 @@ +Fix wireless.h to use linux kernel header files +including uapi version of wireless.h + +--- a/include/linux/wireless.h ++++ b/include/linux/wireless.h +@@ -18,16 +18,17 @@ + + /***************************** INCLUDES *****************************/ + +-#if 0 ++#if 1 + #include /* for __u* and __s* typedefs */ + #include /* for "struct sockaddr" et al */ + #include /* for IFNAMSIZ and co... */ ++ #include ++ #include + #else + #define __user + /* typedef uint16_t __u16; */ + #include /* for "struct sockaddr" et al */ + #include /* for IFNAMSIZ and co... */ +-#endif + + /****************************** TYPES ******************************/ + #ifdef CONFIG_COMPAT +@@ -84,4 +85,5 @@ struct iwreq { + union iwreq_data u; + }; + ++#endif + #endif /* _LINUX_WIRELESS_H */ diff --git a/package/kernel/rtl8189es/patches/010-remove-repeat-flies.patch b/package/kernel/rtl8189es/patches/010-remove-repeat-flies.patch index b017b641f5..67cfa1d87a 100644 --- a/package/kernel/rtl8189es/patches/010-remove-repeat-flies.patch +++ b/package/kernel/rtl8189es/patches/010-remove-repeat-flies.patch @@ -18,8 +18,8 @@ diff --git a/include/drv_conf.h b/include/drv_conf.h index 0d20a7e..f0a9f88 100644 --- a/include/drv_conf.h +++ b/include/drv_conf.h -@@ -19,7 +19,9 @@ - ******************************************************************************/ +@@ -14,7 +14,9 @@ + *****************************************************************************/ #ifndef __DRV_CONF_H__ #define __DRV_CONF_H__ -#include "autoconf.h" @@ -28,7 +28,7 @@ index 0d20a7e..f0a9f88 100644 +#include "rtl_autoconf.h" #include "hal_ic_cfg.h" - #if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) + #define CONFIG_RSSI_PRIORITY diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h similarity index 100% rename from include/linux/wireless.h diff --git a/package/kernel/rtl8189es/patches/020-wireless-5.8.patch b/package/kernel/rtl8189es/patches/020-wireless-5.8.patch index 1cebf1ac91..8369768565 100644 --- a/package/kernel/rtl8189es/patches/020-wireless-5.8.patch +++ b/package/kernel/rtl8189es/patches/020-wireless-5.8.patch @@ -1,29 +1,29 @@ --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c -@@ -5569,7 +5569,7 @@ static void cfg80211_rtw_mgmt_frame_regi - #else - struct net_device *ndev, - #endif --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT) - struct mgmt_frame_regs *upd) - #else - u16 frame_type, bool reg) -@@ -5579,7 +5579,7 @@ static void cfg80211_rtw_mgmt_frame_regi - struct net_device *ndev = wdev_to_ndev(wdev); - #endif - _adapter *adapter; --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT) - u16 frame_type = BIT(upd->global_stypes << 4); - bool reg = false; - #endif -@@ -6510,7 +6510,7 @@ static struct cfg80211_ops rtw_cfg80211_ - .action = cfg80211_rtw_mgmt_tx, - #endif - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT) - .update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register, - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, +@@ -7609,7 +7609,7 @@ static void cfg80211_rtw_mgmt_frame_regi + #else + struct net_device *ndev, + #endif +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(BUILD_OPENWRT)) + struct mgmt_frame_regs *upd) + #else + u16 frame_type, bool reg) +@@ -7619,7 +7619,7 @@ static void cfg80211_rtw_mgmt_frame_regi + struct net_device *ndev = wdev_to_ndev(wdev); + #endif + _adapter *adapter; +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(BUILD_OPENWRT)) + u16 frame_type = BIT(upd->global_stypes << 4); + bool reg = false; + #endif +@@ -10047,7 +10047,7 @@ static struct cfg80211_ops rtw_cfg80211_ + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) + .action = cfg80211_rtw_mgmt_tx, + #endif +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(BUILD_OPENWRT)) + .update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register, + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) + .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,