MTK762x 在桥接模式下不能获取IPv6地址的问题

本文解决MTK762x在桥接模式下无法获取IPv6地址的问题,通过修改esw_rt3052驱动中特定寄存器配置,允许IPv6组播包到达CPU,确保邻居发现正常工作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MTK762x 在桥接模式下不能获取IPv6地址的问题

参考地址:https://dev.archive.openwrt.org/ticket/20453.html

1. 问题简介

Multicast IPv6 ICMP packets are dropped by built-in RT5350 switch, breaking neighbour discovery

2. 解决方案

The problem I have encountered is basically the exact same thing as described in this previous ticket: ​/ticket/15448.html except that it is happening in a different platform. In my case, I am using the RT5350F CPU with built in switch. The driver for the switch is the file called <openwrt-root>/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
I am attaching a one-line-modified version that corrects the problem by configuring one register in the CPU differently. Also, I am attaching a screen capture of the relevant datasheet section. Basically, I have set bits 18 to 24 to zeros to enable IPv6 multicast packets to make it to the CPU.
Here is the section I changed:
The following modification by Tom Rodinger
.reg_initval_fct2 = 0x00d6500c, old value

.reg_initval_fct2 = 0x000e500c, fixed value to allow IPv6 multicasts to get to the CPU

Finally, the attached Wireshark screenshot shows that after the fix, the correct neighbour advertisement response is invoked by a neighbour solicitation message.
I believe that this bug affects a number of variants from Ralink that all use this same switch driver. Hopefully you can integrate this fix into trunk.

3. 测试平台说明

软件:openwrt 1505 CC版本
硬件:MT7628NN

4. 补丁文件

--- a/drivers/net/ethernet/ralink/esw_rt3052.c
+++ b/drivers/net/ethernet/ralink/esw_rt3052.c
@@ -1353,7 +1353,9 @@ static const struct switch_dev_ops esw_o
 static struct rt305x_esw_platform_data rt3050_esw_data = {
        /* All ports are LAN ports. */
        .vlan_config            = RT305X_ESW_VLAN_CONFIG_NONE,
-       .reg_initval_fct2       = 0x00d6500c,
+// The following modification by Tom Rodinger
+//     .reg_initval_fct2       = 0x00d6500c,  // old value
+       .reg_initval_fct2       = 0x000e500c,  // fixed value to allow IPv6 multicasts to get to the CPU
        /*
         * ext phy base addr 31, enable port 5 polling, rx/tx clock skew 1,
         * turbo mii off, rgmi 3.3v off

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值