diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2023-05-28 23:00:00 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2023-05-30 01:58:20 +0200 |
commit | fdd3605398544cbe612c6bf1ea0d428c6b70bbd5 (patch) | |
tree | 8ec0bfa75aa5bce0eca02f6531784d13379fc9fa /target/linux | |
parent | f7910d99f417891d19f53d95b873fcbd17032667 (diff) | |
download | openwrt-fdd3605398544cbe612c6bf1ea0d428c6b70bbd5.tar.gz openwrt-fdd3605398544cbe612c6bf1ea0d428c6b70bbd5.tar.bz2 openwrt-fdd3605398544cbe612c6bf1ea0d428c6b70bbd5.zip |
kernel: 6.1: fix swconfig not working
On 6.1 swconfig is not showing up and there's a splat:
| ------------[ cut here ]------------
| WARNING: CPU: 0 PID: 1 at genl_register_family+0xb4/0x81c
| Modules linked in:
| CPU: 0 PID: 1 Comm: swapper Not tainted 6.1.29 #0
| Hardware name: Netgear WNDR4700/WNDR4720 Series APM821XX [...]
| NIP: c0599370 LR: c0599344 CTR: c08c9950
| REGS: c0c21cb0 TRAP: 0700 Not tainted (6.1.29)
| MSR: 00029000 <CE,EE,ME> CR: 48000888 XER: 00000000
|
| GPR00: c0002678 c0c21da0 c0c2cd80 [...]
| NIP [c0599370] genl_register_family+0xb4/0x81c
| LR [c0599344] genl_register_family+0x88/0x81c
| Call Trace:
| [c0c21d80] [c0c21df4] 0xc0c21df4 (unreliable)
| [c0c21e10] [c08c9988] swconfig_init+0x38/0x64
| [c0c21e30] [c0002678] do_one_initcall+0x50/0x260
This is due to it failing to register the netlink
family since changes to upstream linux in patch.
| commit 9c5d03d362519f36cd551aec596388f895c93d2d
|Author: Jakub Kicinski <kuba@kernel.org>
|Date: Wed Aug 24 17:18:30 2022 -0700
|
| genetlink: start to validate reserved header byte
this is fixed by adding the proper value to the introduced
"resv_start_op" parameter.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/swconfig.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index a734e57608..5fa2b147c6 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -1054,6 +1054,9 @@ static struct genl_family switch_fam = { .module = THIS_MODULE, .ops = swconfig_ops, .n_ops = ARRAY_SIZE(swconfig_ops), +#if LINUX_VERSION_CODE > KERNEL_VERSION(6,0,0) + .resv_start_op = SWITCH_CMD_SET_VLAN + 1, +#endif }; #ifdef CONFIG_OF |