]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: mt7620: fix jumbo frame mode 24242/head
authorGleb Pesin <dormancygrace@gmail.com>
Wed, 15 Jul 2026 19:12:33 +0000 (19:12 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 17 Jul 2026 07:26:12 +0000 (09:26 +0200)
MAX_RX_PKT_LEN value 2 selects 1552-byte frames, not jumbo mode.
Select value 3 so the configured 2 KiB frames are actually accepted by
the switch.

Tested on a ZBT-WE826 (MT7620). With value 2, 1534-byte IPv4
packets pass while 1535-byte packets are dropped. With value 3,
1792-byte and 1800-byte DF IPv4 packets pass.

Fixes: d083212e1105 ("ramips: ethernet: ralink: mt7620 enable jumbo frames")
Signed-off-by: Gleb Pesin <dormancygrace@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24242
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h

index 4252bc22a6d6425464b0f8e1127765257d0fc1ca..0c534e8c2643fac84f95ba4d80ad3b65f465d35e 100644 (file)
 #define GSW_REG_GMACCR         0x3FE0 /* correct address per MT7620A datasheet */
 #define GMACCR_JMB_LEN_MASK    0x0F
 #define GMACCR_JMB_LEN_SHIFT   2
-// MAX_RX_PKT_LEN field (bits 0:1): 0=1518, 1=1536, 2=jumbo
+/* MAX_RX_PKT_LEN (bits [1:0]):
+ * 0: 1518 (untagged) / 1522 (tagged)
+ * 1: 1536
+ * 2: 1552
+ * 3: jumbo frame mode
+ */
 #define GMACCR_MAX_RX_PKT_LEN_MASK     0x3
-#define GMACCR_MAX_RX_PKT_LEN_JUMBO    0x2
+#define GMACCR_MAX_RX_PKT_LEN_JUMBO    0x3
 
 #define SYSC_REG_CHIP_REV_ID   0x0c
 #define SYSC_REG_CFG1          0x14