ramips: switch back to kernel 5.4

Fixes: #11222
This commit is contained in:
AmadeusGhost 2023-05-27 23:15:02 +08:00
parent c993397693
commit 4eb245c4b5
4 changed files with 11 additions and 7 deletions

View File

@ -6,14 +6,15 @@ PKG_RELEASE=5
PKG_LICENSE:=GPLv2 PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:= PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
ifdef CONFIG_LINUX_5_4 ifdef CONFIG_LINUX_5_4
PKG_SOURCE_DATE:=2022-12-22 PKG_SOURCE_DATE:=2022-12-22
PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2 PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2
PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9 PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9
PATCH_DIR:=./patches-5.4 PATCH_DIR:=./patches-5.4
else else
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-05-13 PKG_SOURCE_DATE:=2023-05-13
PKG_SOURCE_VERSION:=969b7b5ebd129068ca56e4b0d831593a2f92382f PKG_SOURCE_VERSION:=969b7b5ebd129068ca56e4b0d831593a2f92382f
PKG_MIRROR_HASH:=d28869591d1cb9a967b72f5cd8215c7b2c3388b7b31147b7b18c797018ab8ffb PKG_MIRROR_HASH:=d28869591d1cb9a967b72f5cd8215c7b2c3388b7b31147b7b18c797018ab8ffb

View File

@ -10,8 +10,8 @@ BOARDNAME:=MediaTek Ralink MIPS
SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
FEATURES:=squashfs gpio boot-part rootfs-part FEATURES:=squashfs gpio boot-part rootfs-part
KERNEL_PATCHVER:=5.10 KERNEL_PATCHVER:=5.4
KERNEL_TESTING_PATCHVER:=5.15 KERNEL_TESTING_PATCHVER:=5.10
define Target/Description define Target/Description
Build firmware images for Ralink RT288x/RT3xxx based boards. Build firmware images for Ralink RT288x/RT3xxx based boards.

View File

@ -20,7 +20,7 @@
#include <linux/version.h> #include <linux/version.h>
#include "hnat_mcast.h" #include "hnat_mcast.h"
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 0) #if LINUX_VERSION_CODE > KERNEL_VERSION(5, 5, 0)
#include <net/netfilter/nf_hnat.h> #include <net/netfilter/nf_hnat.h>
#endif #endif

View File

@ -2261,10 +2261,14 @@ static const struct debugfs_reg32 hnat_regs[] = {
int hnat_init_debugfs(struct mtk_hnat *h) int hnat_init_debugfs(struct mtk_hnat *h)
{ {
int ret = 0; int ret = 0;
struct dentry *root;
long i; long i;
char name[16]; 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); root = debugfs_create_dir("hnat", NULL);
if (!root) { if (!root) {
dev_notice(h->dev, "%s:err at %d\n", __func__, __LINE__); 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]; h->regset[i]->base = h->ppe_base[i];
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
struct dentry *file;
snprintf(name, sizeof(name), "regdump%ld", i); snprintf(name, sizeof(name), "regdump%ld", i);
file = debugfs_create_regset32(name, S_IRUGO, file = debugfs_create_regset32(name, S_IRUGO,
root, h->regset[i]); root, h->regset[i]);