diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index c96e45cbcd2d3..51fea756e0044 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -109,9 +109,9 @@ define KernelPackage/fs-cifs +kmod-crypto-ccm \ +kmod-crypto-ecb \ +kmod-crypto-des \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-asn1-decoder \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-oid-registry \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-dnsresolver + +(LINUX_5_15||LINUX_5_19):kmod-asn1-decoder \ + +(LINUX_5_15||LINUX_5_19):kmod-oid-registry \ + +(LINUX_5_15||LINUX_5_19):kmod-dnsresolver endef define KernelPackage/fs-cifs/description @@ -530,7 +530,7 @@ $(eval $(call KernelPackage,fs-ntfs)) define KernelPackage/fs-ntfs3 SUBMENU:=$(FS_MENU) TITLE:=NTFS3 Read-Write file system support - DEPENDS:=@(LINUX_5_15||LINUX_5_18||LINUX_5_19) +kmod-nls-base + DEPENDS:=@(LINUX_5_15||LINUX_5_19) +kmod-nls-base KCONFIG:= \ CONFIG_NTFS3_FS \ CONFIG_NTFS3_64BIT_CLUSTER=y \ diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 8bba6c63cc156..e4329af952004 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -142,7 +142,7 @@ $(eval $(call KernelPackage,mii)) define KernelPackage/mdio-devres SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Supports MDIO device registration - DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio + DEPENDS:=@(LINUX_5_10||LINUX_5_15||LINUX_5_19) +kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio KCONFIG:=CONFIG_MDIO_DEVRES HIDDEN:=1 FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko @@ -563,7 +563,7 @@ $(eval $(call KernelPackage,8139cp)) define KernelPackage/r8169 SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:= \ CONFIG_R8169 \ CONFIG_R8169_NAPI=y \ @@ -689,7 +689,7 @@ $(eval $(call KernelPackage,igbvf)) define KernelPackage/ixgbe SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:=CONFIG_IXGBE \ CONFIG_IXGBE_VXLAN=n \ CONFIG_IXGBE_HWMON=y \ diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 030e6767c4f3c..95902cca6b79c 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -1151,8 +1151,8 @@ $(eval $(call KernelPackage,keys-trusted)) define KernelPackage/tpm SUBMENU:=$(OTHER_MENU) TITLE:=TPM Hardware Support - DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-asn1-decoder \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-asn1-encoder +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-oid-registry + DEPENDS:= +kmod-random-core +(LINUX_5_15||LINUX_5_19):kmod-asn1-decoder \ + +(LINUX_5_15||LINUX_5_19):kmod-asn1-encoder +(LINUX_5_15||LINUX_5_19):kmod-oid-registry KCONFIG:= CONFIG_TCG_TPM FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko AUTOLOAD:=$(call AutoLoad,10,tpm,1) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 6f97c55b740c2..dbb553802a651 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1138,7 +1138,7 @@ $(eval $(call KernelPackage,usb-net-aqc111)) define KernelPackage/usb-net-asix TITLE:=Kernel module for USB-to-Ethernet Asix convertors - DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=+kmod-libphy +(LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:=CONFIG_USB_NET_AX8817X FILES:= \ $(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko \ diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 09f56ccc1fe68..1740d4101367e 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -244,7 +244,7 @@ define KernelPackage/drm TITLE:=Direct Rendering Manager (DRM) support HIDDEN:=1 DEPENDS:=+kmod-dma-buf +kmod-i2c-core +kmod-i2c-algo-bit +PACKAGE_kmod-backlight:kmod-backlight \ - +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-fb + +(LINUX_5_15||LINUX_5_19):kmod-fb KCONFIG:= \ CONFIG_DRM \ CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y \ diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index e678180a51b06..a0e1c9bd4b5e2 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -344,7 +344,7 @@ define KernelPackage/ath11k-ahb $(call KernelPackage/mac80211/Default) TITLE:=Qualcomm 802.11ax AHB wireless chipset support URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k - DEPENDS+= @TARGET_ipq807x +kmod-ath11k +(LINUX_5_15||LINUX_5_18):kmod-qrtr-smd + DEPENDS+= @TARGET_ipq807x +kmod-ath11k +(LINUX_5_15||LINUX_5_19):kmod-qrtr-smd FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko AUTOLOAD:=$(call AutoProbe,ath11k_ahb) endef @@ -358,7 +358,7 @@ define KernelPackage/ath11k-pci $(call KernelPackage/mac80211/Default) TITLE:=Qualcomm 802.11ax PCI wireless chipset support URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k - DEPENDS+= @PCI_SUPPORT +(LINUX_5_15||LINUX_5_18):kmod-qrtr-mhi +kmod-ath11k + DEPENDS+= @PCI_SUPPORT +(LINUX_5_15||LINUX_5_19):kmod-qrtr-mhi +kmod-ath11k FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko AUTOLOAD:=$(call AutoProbe,ath11k_pci) endef diff --git a/package/kernel/rtl8821cu/Makefile b/package/kernel/rtl8821cu/Makefile deleted file mode 100644 index d74f8564b8dfc..0000000000000 --- a/package/kernel/rtl8821cu/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# -# Copyright (C) 2021 ImmortalWrt -# -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtl8821cu -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-04-09 -PKG_SOURCE_VERSION:=8c2226a74ae718439d56248bd2e44ccf717086d5 -PKG_MIRROR_HASH:=3353a3bc4c73652eceaab95809aab27c3ae8bbf7e915b73488361a061ba91b84 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINTER:=CN_SZTL - -PKG_BUILD_PARALLEL:=1 - -STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/rtl8821cu - SUBMENU:=Wireless Drivers - TITLE:=Realtek RTL8811CU/RTL8821CU support - DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT - FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko - AUTOLOAD:=$(call AutoProbe,rtl8821cu) - PROVIDES:=kmod-rtl8821cu -endef - -NOSTDINC_FLAGS = \ - -I$(PKG_BUILD_DIR) \ - -I$(PKG_BUILD_DIR)/include \ - -I$(STAGING_DIR)/usr/include/mac80211-backport \ - -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \ - -I$(STAGING_DIR)/usr/include/mac80211 \ - -I$(STAGING_DIR)/usr/include/mac80211/uapi \ - -include backport/autoconf.h \ - -include backport/backport.h - -EXTRA_KCONFIG:= \ - CONFIG_RTL8821CU=m \ - USER_MODULE_NAME=rtl8821cu - -ifeq ($(ARCH),aarch64) - EXTRA_KCONFIG += CONFIG_MP_VHT_HW_TX_MODE=n -endif - -EXTRA_CFLAGS:= \ - -DRTW_SINGLE_WIPHY \ - -DRTW_USE_CFG80211_STA_EVENT \ - -DCONFIG_IOCTL_CFG80211 \ - -DCONFIG_CONCURRENT_MODE \ - -DBUILD_OPENWRT - -ifeq ($(ARCH),arm) - EXTRA_CFLAGS += -mfloat-abi=softfp -endif - -ifeq ($(BOARD),x86) - EXTRA_CFLAGS += -mhard-float -endif - -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) \ - modules -endef - -$(eval $(call KernelPackage,rtl8821cu)) diff --git a/package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch b/package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch deleted file mode 100644 index e75a278339739..0000000000000 --- a/package/kernel/rtl8821cu/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 -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch b/package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch deleted file mode 100644 index 76baf2a24a9ce..0000000000000 --- a/package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4 Mon Sep 17 00:00:00 2001 -From: Ben Greear -Date: Fri, 9 Nov 2018 16:21:43 -0800 -Subject: [PATCH] Fix build against openwrt backports tree. - -Like breaks builds elsewhere, can fix it up later. - -Signed-off-by: Ben Greear ---- - include/drv_conf.h | 4 +++- - .../{wireless.h => old_unused_rtl_wireless.h} | 0 - include/{autoconf.h => rtl_autoconf.h} | 0 - 3 files changed, 3 insertions(+), 1 deletions(-) - rename include/linux/{wireless.h => old_unused_rtl_wireless.h} (100%) - rename include/{autoconf.h => rtl_autoconf.h} (100%) - -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 -@@ -14,7 +14,9 @@ - *****************************************************************************/ - #ifndef __DRV_CONF_H__ - #define __DRV_CONF_H__ --#include "autoconf.h" -+ -+#include -+#include "rtl_autoconf.h" - #include "hal_ic_cfg.h" - - #if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) -diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h -similarity index 100% -rename from include/linux/wireless.h -rename to include/linux/old_unused_rtl_wireless.h -diff --git a/include/autoconf.h b/include/rtl_autoconf.h -similarity index 100% -rename from include/autoconf.h -rename to include/rtl_autoconf.h diff --git a/package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch b/package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch deleted file mode 100644 index 34dcd8e4de2dc..0000000000000 --- a/package/kernel/rtl8821cu/patches/030-change-value-of-vht-enable.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/os_dep/linux/os_intfs.c -+++ b/os_dep/linux/os_intfs.c -@@ -238,7 +238,7 @@ - #endif /* CONFIG_80211N_HT */ - - #ifdef CONFIG_80211AC_VHT --int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */ -+int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */ - module_param(rtw_vht_enable, int, 0644); - - int rtw_ampdu_factor = 7; diff --git a/package/kernel/rtl8821cu/patches/040-wireless-5.8.patch b/package/kernel/rtl8821cu/patches/040-wireless-5.8.patch deleted file mode 100644 index 8ed4115a2c7f5..0000000000000 --- a/package/kernel/rtl8821cu/patches/040-wireless-5.8.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c -index d9c81c9..3e7e27a 100755 ---- a/os_dep/linux/ioctl_cfg80211.c -+++ b/os_dep/linux/ioctl_cfg80211.c -@@ -7149,7 +7149,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #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) -@@ -7178,7 +7178,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - /* Wait QC Verify */ - return; - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT) - SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4)); - #else - switch (frame_type) { -@@ -9467,7 +9467,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, --#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, - #else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c -index 257c581..f97fa24 100755 ---- a/os_dep/linux/os_intfs.c -+++ b/os_dep/linux/os_intfs.c -@@ -1306,6 +1306,14 @@ unsigned int rtw_classify8021d(struct sk_buff *skb) - } - - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) -+static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb -+ , struct net_device *sb_dev -+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0)) -+ , select_queue_fallback_t fallback -+ #endif -+) -+#else - static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) - , void *accel_priv -@@ -1314,6 +1322,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb - #endif - #endif - ) -+#endif - { - _adapter *padapter = rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch b/package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch deleted file mode 100644 index 98f8b422bb9b6..0000000000000 --- a/package/kernel/rtl8821cu/patches/050-Buildfix-for-Linux-5.18.patch +++ /dev/null @@ -1,44 +0,0 @@ -From af27791efdde55cdec3b4400c9d1a806c0040e38 Mon Sep 17 00:00:00 2001 -From: Butterfly -Date: Tue, 12 Apr 2022 00:31:54 +0300 -Subject: [PATCH] Buildfix for Linux 5.18 - -Buildfix for Linux 5.18 -Link: https://github.com/brektrou/rtl8821CU/pull/168 ---- - include/ieee80211.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/include/ieee80211.h -+++ b/include/ieee80211.h -@@ -1529,18 +1529,30 @@ enum ieee80211_state { - (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ - (((Addr[5]) & 0xff) == 0xff)) - #else -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) -+static inline int is_multicast_mac_addr(const u8 *addr) -+#else - extern __inline int is_multicast_mac_addr(const u8 *addr) -+#endif - { - return (addr[0] != 0xff) && (0x01 & addr[0]); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) -+static inline int is_broadcast_mac_addr(const u8 *addr) -+#else - extern __inline int is_broadcast_mac_addr(const u8 *addr) -+#endif - { - return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ - (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) -+static inline int is_zero_mac_addr(const u8 *addr) -+#else - extern __inline int is_zero_mac_addr(const u8 *addr) -+#endif - { - return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ - (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); diff --git a/package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch b/package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch deleted file mode 100644 index c56fdc1581145..0000000000000 --- a/package/kernel/rtl8821cu/patches/051-fix-rtw_memcpy-5.18.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7e24201ebdcdbe2d34f5cdfe4065928b381b8d04 Mon Sep 17 00:00:00 2001 -From: Butterfly -Date: Tue, 12 Apr 2022 00:05:41 +0300 -Subject: [PATCH 1/2] osdep_service.c: fix warning _rtw_memcpy - -osdep_service.c: fix warning _rtw_memcpy ---- - os_dep/osdep_service.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c -index d4a01c8..6a2d3ac 100644 ---- a/os_dep/osdep_service.c -+++ b/os_dep/osdep_service.c -@@ -2491,7 +2491,11 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname) - - rtw_init_netdev_name(pnetdev, ifname); - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) - _rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN); -+#else -+ dev_addr_set(pnetdev, adapter_mac_addr(padapter)); -+#endif - - if (rtnl_lock_needed) - ret = register_netdev(pnetdev); - -From 924f57d1cce2843aa28d557b74baf00a6482caa8 Mon Sep 17 00:00:00 2001 -From: Butterfly -Date: Tue, 12 Apr 2022 00:08:52 +0300 -Subject: [PATCH 2/2] ioctl_linux.c: fix warning _rtw_memcpy - -ioctl_linux.c: fix warning _rtw_memcpy ---- - os_dep/linux/ioctl_linux.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c -index 20dd583..a0d32ee 100644 ---- a/os_dep/linux/ioctl_linux.c -+++ b/os_dep/linux/ioctl_linux.c -@@ -9778,7 +9778,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, - rtw_hal_read_chip_info(padapter); - /* set mac addr*/ - rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter)); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) - _rtw_memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */ -+#else -+ dev_addr_set(padapter->pnetdev, get_hal_mac_addr(padapter)); /* set mac addr to net_device */ -+#endif - - #ifdef CONFIG_P2P - rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter)); diff --git a/package/lean/ntfs3-mount/Makefile b/package/lean/ntfs3-mount/Makefile index 61dd214bac1e5..a5fc2a2974115 100644 --- a/package/lean/ntfs3-mount/Makefile +++ b/package/lean/ntfs3-mount/Makefile @@ -10,7 +10,7 @@ define Package/ntfs3-mount CATEGORY:=Utilities SUBMENU:=Filesystem TITLE:=NTFS mount script for Paragon NTFS3 driver - DEPENDS:=+LINUX_5_4:kmod-fs-ntfs3-oot +(LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-fs-ntfs3 + DEPENDS:=+LINUX_5_4:kmod-fs-ntfs3-oot +(LINUX_5_15||LINUX_5_19):kmod-fs-ntfs3 PKGARCH:=all endef diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 928f44e797863..5439c050c1b59 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.15.0 +PKG_VERSION:=5.19.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff +PKG_HASH:=26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 @@ -57,7 +57,16 @@ $(call Package/iproute2/Default) DEFAULT_VARIANT:=1 PROVIDES:=tc ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny - DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-bpf +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (bpf) + VARIANT:=tcbpf + PROVIDES:=tc + ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-bpf + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf endef define Package/tc-full @@ -65,13 +74,14 @@ $(call Package/iproute2/Default) TITLE:=Traffic control utility (full) VARIANT:=tcfull PROVIDES:=tc - ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full - DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl + ALTERNATIVES:=400:/sbin/tc:/usr/libexec/tc-full + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables +tc-mod-iptables endef define Package/tc-mod-iptables $(call Package/iproute2/Default) TITLE:=Traffic control module - iptables action + VARIANT:=tcfull DEPENDS:=+libxtables endef @@ -123,13 +133,29 @@ endif ifeq ($(BUILD_VARIANT),tctiny) LIBBPF_FORCE:=off +endif + +ifeq ($(BUILD_VARIANT),tcbpf) + HAVE_ELF:=y + LIBBPF_FORCE:=on SHARED_LIBS:=y endif ifeq ($(BUILD_VARIANT),tcfull) + #enable iptables/xtables requirement only if tciptables variant is selected + TC_CONFIG_XT:=y + TC_CONFIG_XT_OLD:=y + TC_CONFIG_XT_OLD_H:=y + TC_CONFIG_IPSET:=y HAVE_ELF:=y LIBBPF_FORCE:=on SHARED_LIBS:=y +else + #disable iptables requirement by default + TC_CONFIG_XT:=n + TC_CONFIG_XT_OLD:=n + TC_CONFIG_XT_OLD_H:=n + TC_CONFIG_IPSET:=n endif ifdef CONFIG_PACKAGE_devlink @@ -158,8 +184,13 @@ MAKE_FLAGS += \ HAVE_ELF=$(HAVE_ELF) \ HAVE_MNL=$(HAVE_MNL) \ HAVE_CAP=$(HAVE_CAP) \ + HAVE_TIRPC=n \ IPT_LIB_DIR=/usr/lib/iptables \ XT_LIB_DIR=/usr/lib/iptables \ + TC_CONFIG_XT=$(TC_CONFIG_XT) \ + TC_CONFIG_XT_OLD=$(TC_CONFIG_XT_OLD) \ + TC_CONFIG_XT_OLD_H=$(TC_CONFIG_XT_OLD_H) \ + TC_CONFIG_IPSET=$(TC_CONFIG_IPSET) \ FPIC="$(FPIC)" \ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') @@ -190,6 +221,11 @@ define Package/tc-tiny/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny endef +define Package/tc-bpf/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-bpf +endef + define Package/tc-full/install $(INSTALL_DIR) $(1)/usr/libexec $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full @@ -236,6 +272,7 @@ $(eval $(call BuildPackage,ip-full)) # spurious rebuilds when building multiple variants. $(eval $(call BuildPackage,tc-mod-iptables)) $(eval $(call BuildPackage,tc-tiny)) +$(eval $(call BuildPackage,tc-bpf)) $(eval $(call BuildPackage,tc-full)) $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ip-bridge)) diff --git a/package/network/utils/iproute2/patches/100-configure.patch b/package/network/utils/iproute2/patches/100-configure.patch index 0c19b2086a95b..2d4fb7b9b39b3 100644 --- a/package/network/utils/iproute2/patches/100-configure.patch +++ b/package/network/utils/iproute2/patches/100-configure.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -34,7 +34,8 @@ int main(int argc, char **argv) { +@@ -36,7 +36,8 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch b/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch new file mode 100644 index 0000000000000..7bf55dd57b810 --- /dev/null +++ b/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch @@ -0,0 +1,27 @@ +From c69e8e474936795a2cd7638b11ce3e99ff4d5ae7 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sat, 6 Aug 2022 10:00:20 +0200 +Subject: [PATCH] ipstats: Define MIN function to fix undefined references + +Fixes errors in the form of: + in function `ipstats_show_64': + :(.text+0x4e30): undefined reference to `MIN' + +Signed-off-by: Nick Hainke +--- + ip/ipstats.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/ip/ipstats.c ++++ b/ip/ipstats.c +@@ -6,6 +6,10 @@ + #include "utils.h" + #include "ip_common.h" + ++#ifndef MIN ++#define MIN(a, b) ((a) < (b) ? (a) : (b)) ++#endif ++ + struct ipstats_stat_dump_filters { + /* mask[0] filters outer attributes. Then individual nests have their + * filtering mask at the index of the nested attribute. diff --git a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch index 8ddb316744fac..2a3f9eb90f1d1 100644 --- a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch +++ b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -1,11 +1,14 @@ --- a/Makefile +++ b/Makefile -@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s +@@ -65,9 +65,9 @@ WFLAGS += -Wmissing-declarations -Wold-s CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v --SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa -+SUBDIRS=lib ip tc bridge misc genl devlink rdma +-SUBDIRS=lib ip tc bridge misc netem genl man ++SUBDIRS=lib ip tc bridge misc genl + ifeq ($(HAVE_MNL),y) +-SUBDIRS += tipc devlink rdma dcb vdpa ++SUBDIRS += devlink rdma + endif LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a - LDLIBS += $(LIBNETLINK) diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index ff7e9ca4e58f9..a8cdd103ba308 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -387,7 +387,7 @@ check_selinux() +@@ -411,7 +411,7 @@ check_tirpc() check_mnl() { diff --git a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch index 079ca0512e212..0c5c3f59ed9ad 100644 --- a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch +++ b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -255,7 +255,7 @@ EOF +@@ -266,7 +266,7 @@ EOF check_elf() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index 68e16241663c3..4cce2c3ca6802 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -445,7 +445,7 @@ EOF +@@ -469,7 +469,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch new file mode 100644 index 0000000000000..28ba7e52176d5 --- /dev/null +++ b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -398,7 +398,7 @@ check_selinux() + + check_tirpc() + { +- if ${PKG_CONFIG} libtirpc --exists; then ++ if [ "${HAVE_TIRPC}" = "y" ] && ${PKG_CONFIG} libtirpc --exists; then + echo "HAVE_RPC:=y" >>$CONFIG + echo "yes" + diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index cd687e7601044..ba2cb0637a782 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -17,6 +17,13 @@ RTMONOBJ=rtmon.o +@@ -19,6 +19,13 @@ RTMONOBJ=rtmon.o include ../config.mk @@ -12,9 +12,9 @@ +STATIC_SYM_SOURCES:=$(filter-out $(STATIC_SYM_FILTER),$(wildcard *.c)) + ALLOBJ=$(IPOBJ) $(RTMONOBJ) - SCRIPTS=ifcfg rtpr routel routef + SCRIPTS=routel TARGETS=ip rtmon -@@ -46,7 +53,7 @@ else +@@ -48,7 +55,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -30,20 +30,20 @@ "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] -batch filename\n" +#ifndef IPROUTE2_TINY - "where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n" - " macsec | maddress | monitor | mptcp | mroute | mrule |\n" + "where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |\n" + " link | macsec | maddress | monitor | mptcp | mroute | mrule |\n" " neighbor | neighbour | netconf | netns | nexthop | ntable |\n" " ntbl | route | rule | sr | tap | tcpmetrics |\n" " token | tunnel | tuntap | vrf | xfrm }\n" +#else -+ "where OBJECT := { address | ila | link | macsec | maddress | monitor |\n" -+ " mroute | mrule | neighbor | neighbour | netns | route |\n" -+ " rule | sr | token | tunnel | vrf }\n" ++ "where OBJECT := { address | link | maddress | monitor |\n" ++ " neighbor | neighbour | netns | route |\n" ++ " rule | token | tunnel }\n" +#endif " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n" -@@ -91,37 +97,51 @@ static const struct cmd { +@@ -91,37 +97,49 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -63,9 +63,9 @@ +#ifndef IPROUTE2_TINY { "l2tp", do_ipl2tp }, { "fou", do_ipfou }, -+#endif { "ila", do_ipila }, { "macsec", do_ipmacsec }, ++#endif { "tunnel", do_iptunnel }, { "tunl", do_iptunnel }, +#ifndef IPROUTE2_TINY @@ -78,23 +78,21 @@ { "monitor", do_ipmonitor }, +#ifndef IPROUTE2_TINY { "xfrm", do_xfrm }, -+#endif { "mroute", do_multiroute }, { "mrule", do_multirule }, ++#endif { "netns", do_netns }, +#ifndef IPROUTE2_TINY { "netconf", do_ipnetconf }, -+#endif { "vrf", do_ipvrf}, { "sr", do_seg6 }, -+#ifndef IPROUTE2_TINY { "nexthop", do_ipnh }, { "mptcp", do_mptcp }, { "ioam", do_ioam6 }, +#endif { "help", do_help }, + { "stats", do_ipstats }, { 0 } - }; --- a/lib/Makefile +++ b/lib/Makefile @@ -3,6 +3,10 @@ include ../config.mk diff --git a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch index 07d5230a6e4b4..094ff393a68df 100644 --- a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -31,7 +31,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY if (!end || end == arg || *end || res > 255) --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h -@@ -256,6 +256,7 @@ enum { +@@ -265,6 +265,7 @@ enum { RTN_THROW, /* Not in this table */ RTN_NAT, /* Translate this address */ RTN_XRESOLVE, /* Use external resolver */ diff --git a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch index 92d02b9a4e931..c7fceb2e22106 100644 --- a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch +++ b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -279,7 +279,7 @@ int main(int argc, char **argv) { +@@ -290,7 +290,7 @@ int main(int argc, char **argv) { } EOF @@ -9,7 +9,7 @@ local ret=$? rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test -@@ -297,7 +297,7 @@ int main(int argc, char **argv) { +@@ -308,7 +308,7 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index 13418662eeaa7..dc9c0b2969d68 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -1,9 +1,9 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -26,7 +26,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI +@@ -28,7 +28,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI ALLOBJ=$(IPOBJ) $(RTMONOBJ) - SCRIPTS=ifcfg rtpr routel routef + SCRIPTS=routel -TARGETS=ip rtmon +TARGETS=$(findstring ip,$(BUILD_VARIANT)) rtmon diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index 12a1ccfa33cf1..d1948860e8665 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -431,14 +431,8 @@ EOF +@@ -455,14 +455,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else diff --git a/package/network/utils/iproute2/patches/300-selinux-configurable.patch b/package/network/utils/iproute2/patches/300-selinux-configurable.patch index b7e61fd3bd593..817abf7d17ac0 100644 --- a/package/network/utils/iproute2/patches/300-selinux-configurable.patch +++ b/package/network/utils/iproute2/patches/300-selinux-configurable.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -374,7 +374,7 @@ check_libbpf() +@@ -385,7 +385,7 @@ check_libbpf() check_selinux() # SELinux is a compile time option in the ss utility { diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk index 8d21bf473bdb0..182fa3387ce62 100644 --- a/target/linux/x86/modules.mk +++ b/target/linux/x86/modules.mk @@ -22,7 +22,7 @@ $(eval $(call KernelPackage,amazon-ena)) define KernelPackage/amd-xgbe SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=AMD Ethernet on SoC support - DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_18||LINUX_5_19):kmod-mdio-devres + DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +(LINUX_5_10||LINUX_5_15||LINUX_5_19):kmod-mdio-devres KCONFIG:=CONFIG_AMD_XGBE FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/xgbe/amd-xgbe.ko AUTOLOAD:=$(call AutoLoad,35,amd-xgbe)