From 6be1124ecfa1e6ba674152f8c8ce9fcfddd686a2 Mon Sep 17 00:00:00 2001 From: logicog Date: Mon, 21 Jul 2025 21:59:20 +0200 Subject: [PATCH] Fixed shift arithmetic bug reported by airjinkela --- rtl837x_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl837x_port.c b/rtl837x_port.c index 32c6a0e..0d1a7aa 100644 --- a/rtl837x_port.c +++ b/rtl837x_port.c @@ -94,7 +94,7 @@ void vlan_create(register uint16_t vlan, register uint16_t members, register uin uint16_t a = members ^ tagged; // Initialize VLAN table with VLAN 1 - REG_WRITE(RTL837x_TBL_DATA_IN_A, 0x02, (a >> 8) & 0x0f, (a << 2) | (tagged >> 8), tagged); + REG_WRITE(RTL837x_TBL_DATA_IN_A, 0x02, (a >> 6) & 0x0f, (a << 2) | (tagged >> 8), tagged); REG_WRITE(RTL837X_TBL_CTRL, vlan >> 8, vlan, TBL_VLAN, TBL_WRITE | TBL_EXECUTE); do { reg_read_m(RTL837X_TBL_CTRL);