From 4eb245c4b5b6e31a082e5ead5ff75329252474f3 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 27 May 2023 23:15:02 +0800 Subject: [PATCH] ramips: switch back to kernel 5.4 Fixes: #11222 --- package/kernel/mt76/Makefile | 5 +++-- target/linux/ramips/Makefile | 4 ++-- .../ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat.h | 2 +- .../files/drivers/net/ethernet/mtk/mtk_hnat/hnat_debugfs.c | 7 +++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 7e88bed62..bc8fd0879 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -6,14 +6,15 @@ PKG_RELEASE=5 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= +PKG_SOURCE_URL:=https://github.com/openwrt/mt76 +PKG_SOURCE_PROTO:=git + ifdef CONFIG_LINUX_5_4 PKG_SOURCE_DATE:=2022-12-22 PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2 PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9 PATCH_DIR:=./patches-5.4 else -PKG_SOURCE_URL:=https://github.com/openwrt/mt76 -PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2023-05-13 PKG_SOURCE_VERSION:=969b7b5ebd129068ca56e4b0d831593a2f92382f PKG_MIRROR_HASH:=d28869591d1cb9a967b72f5cd8215c7b2c3388b7b31147b7b18c797018ab8ffb diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile index f7d0e4283..3053906f6 100644 --- a/target/linux/ramips/Makefile +++ b/target/linux/ramips/Makefile @@ -10,8 +10,8 @@ BOARDNAME:=MediaTek Ralink MIPS SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 FEATURES:=squashfs gpio boot-part rootfs-part -KERNEL_PATCHVER:=5.10 -KERNEL_TESTING_PATCHVER:=5.15 +KERNEL_PATCHVER:=5.4 +KERNEL_TESTING_PATCHVER:=5.10 define Target/Description Build firmware images for Ralink RT288x/RT3xxx based boards. diff --git a/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat.h b/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat.h index 97a9071a1..789512543 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat.h +++ b/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat.h @@ -20,7 +20,7 @@ #include #include "hnat_mcast.h" -#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 0) +#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 5, 0) #include #endif diff --git a/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat_debugfs.c b/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat_debugfs.c index a3ab80d18..3c8a1243a 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat_debugfs.c +++ b/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_hnat/hnat_debugfs.c @@ -2261,10 +2261,14 @@ static const struct debugfs_reg32 hnat_regs[] = { int hnat_init_debugfs(struct mtk_hnat *h) { int ret = 0; - struct dentry *root; long i; char name[16]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) + struct dentry *file; +#endif + struct dentry *root; + root = debugfs_create_dir("hnat", NULL); if (!root) { dev_notice(h->dev, "%s:err at %d\n", __func__, __LINE__); @@ -2285,7 +2289,6 @@ int hnat_init_debugfs(struct mtk_hnat *h) h->regset[i]->base = h->ppe_base[i]; #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) - struct dentry *file; snprintf(name, sizeof(name), "regdump%ld", i); file = debugfs_create_regset32(name, S_IRUGO, root, h->regset[i]);