Skip to contentSkip to conversation

net: dsa: b53: prevent standalone from trying to forward to other ports

PATCH Applied Jonas Gorski 7 participants 13 messages May 8, 2025 – Mar 2

Subsystems (4)
lore
Share & tools
lore

Jonas Gorski

author maintainer
#0 lore raw

PATCH 1/1 net: dsa: b53: prevent standalone from trying to forward to other ports

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

Fixes ff39c2d68679 ("net: dsa: b53: Add bridge support")
---
 drivers/net/dsa/b53/b53_common.c | 33 ++++++++++++++++++++++++++++++++
 drivers/net/dsa/b53/b53_regs.h   | 14 ++++++++++++++
 2 files changed, 47 insertions(+)
drivers/net/dsa/b53/b53_common.c +33 -0
index 9eb39cfa5fb2..7216eb8f9493 100644
@@ -326,6 +326,26 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
 	}
 }
 
+static void b53_set_eap_mode(struct b53_device *dev, int port, int mode)
+{
+	u64 eap_conf;
+
+	if (is5325(dev) || is5365(dev) || dev->chip_id == BCM5389_DEVICE_ID)
+		return;
+
+	b53_read64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), &eap_conf);
+
+	if (is63xx(dev)) {
+		eap_conf &= ~EAP_MODE_MASK_63XX;
+		eap_conf |= (u64)mode << EAP_MODE_SHIFT_63XX;
+	} else {
+		eap_conf &= ~EAP_MODE_MASK;
+		eap_conf |= (u64)mode << EAP_MODE_SHIFT;
+	}
+
+	b53_write64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), eap_conf);
+}
+
 static void b53_set_forwarding(struct b53_device *dev, int enable)
 {
 	u8 mgmt;
@@ -586,6 +606,13 @@ int b53_setup_port(struct dsa_switch *ds, int port)
 	b53_port_set_mcast_flood(dev, port, true);
 	b53_port_set_learning(dev, port, false);
 
+	/* Force all traffic to go to the CPU port to prevent the ASIC from
+	 * trying to forward to bridged ports on matching FDB entries, then
+	 * dropping frames because it isn't allowed to forward there.
+	 */
+	if (dsa_is_user_port(ds, port))
+		b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
+
 	return 0;
 }
 EXPORT_SYMBOL(b53_setup_port);
@@ -2042,6 +2069,9 @@ int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
 		pvlan |= BIT(i);
 	}
 
+	/* Disable redirection of unknown SA to the CPU port */
+	b53_set_eap_mode(dev, port, EAP_MODE_BASIC);
+
 	/* Configure the local port VLAN control membership to include
 	 * remote ports and update the local port bitmask
 	 */
@@ -2077,6 +2107,9 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
 			pvlan &= ~BIT(i);
 	}
 
+	/* Enable redirection of unknown SA to the CPU port */
+	b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
+
 	b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
 	dev->ports[port].vlan_ctl_mask = pvlan;
 
drivers/net/dsa/b53/b53_regs.h +14 -0
index bfbcb66bef66..5f7a0e5c5709 100644
@@ -50,6 +50,9 @@
 /* Jumbo Frame Registers */
 #define B53_JUMBO_PAGE			0x40
 
+/* EAP Registers */
+#define B53_EAP_PAGE			0x42
+
 /* EEE Control Registers Page */
 #define B53_EEE_PAGE			0x92
 
@@ -480,6 +483,17 @@
 #define   JMS_MIN_SIZE			1518
 #define   JMS_MAX_SIZE			9724
 
+/*************************************************************************
+ * EAP Page Registers
+ *************************************************************************/
+#define B53_PORT_EAP_CONF(i)		(0x20 + 8 * (i))
+#define  EAP_MODE_SHIFT			51
+#define  EAP_MODE_SHIFT_63XX		50
+#define  EAP_MODE_MASK			(0x3ull << EAP_MODE_SHIFT)
+#define  EAP_MODE_MASK_63XX		(0x3ull << EAP_MODE_SHIFT_63XX)
+#define  EAP_MODE_BASIC			0
+#define  EAP_MODE_SIMPLIFIED		3
+
 /*************************************************************************
  * EEE Configuration Page Registers
  *************************************************************************/
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 13 lines · Jonas Gorski

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Quoted 6 lines

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

Fixes ff39c2d68679 ("net: dsa: b53: Add bridge support")

@Florian, could you please have a look at this one, too?

Thanks,

Paolo

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Jonas Gorski
Quoted 13 lines · Jonas Gorski

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Quoted 6 lines

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

Fixes ff39c2d68679 ("net: dsa: b53: Add bridge support")
Signature · 1 line
Florian
maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Jonas Gorski
Quoted 13 lines · Jonas Gorski

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Quoted 7 lines

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

Fixes ff39c2d68679 ("net: dsa: b53: Add bridge support")

---

#4 lore raw
In reply to Jonas Gorski
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 10 lines · On Thu, 8 May 2025 11:14:24 +0200 you wrote:

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

[...]

Here is the summary with links:
- [net] net: dsa: b53: prevent standalone from trying to forward to other ports

    https://git.kernel.org/netdev/net/c/4227ea91e265

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#5 lore raw
In reply to Jonas Gorski

W dniu 8.05.2025 o 11:14, Jonas Gorski pisze:

Quoted 9 lines

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Quoted 7 lines

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

This change broke standalone ports (those not being part of bridge) on Northstar (BCM5301X) devices. We got reports from users about WAN ports on routers not working anymore:
https://github.com/openwrt/openwrt/issues/21187
https://github.com/openwrt/openwrt/issues/21349

Can you take another look at those changes, see if something me be wrong / missing?

Quoted 104 lines
Fixes ff39c2d68679 ("net: dsa: b53: Add bridge support")
---
  drivers/net/dsa/b53/b53_common.c | 33 ++++++++++++++++++++++++++++++++
  drivers/net/dsa/b53/b53_regs.h   | 14 ++++++++++++++
  2 files changed, 47 insertions(+)
drivers/net/dsa/b53/b53_common.c +33 -0
index 9eb39cfa5fb2..7216eb8f9493 100644
@@ -326,6 +326,26 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
  	}
  }
 
+static void b53_set_eap_mode(struct b53_device *dev, int port, int mode)
+{
+	u64 eap_conf;
+
+	if (is5325(dev) || is5365(dev) || dev->chip_id == BCM5389_DEVICE_ID)
+		return;
+
+	b53_read64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), &eap_conf);
+
+	if (is63xx(dev)) {
+		eap_conf &= ~EAP_MODE_MASK_63XX;
+		eap_conf |= (u64)mode << EAP_MODE_SHIFT_63XX;
+	} else {
+		eap_conf &= ~EAP_MODE_MASK;
+		eap_conf |= (u64)mode << EAP_MODE_SHIFT;
+	}
+
+	b53_write64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), eap_conf);
+}
+
  static void b53_set_forwarding(struct b53_device *dev, int enable)
  {
  	u8 mgmt;
@@ -586,6 +606,13 @@ int b53_setup_port(struct dsa_switch *ds, int port)
  	b53_port_set_mcast_flood(dev, port, true);
  	b53_port_set_learning(dev, port, false);
 
+	/* Force all traffic to go to the CPU port to prevent the ASIC from
+	 * trying to forward to bridged ports on matching FDB entries, then
+	 * dropping frames because it isn't allowed to forward there.
+	 */
+	if (dsa_is_user_port(ds, port))
+		b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
+
  	return 0;
  }
  EXPORT_SYMBOL(b53_setup_port);
@@ -2042,6 +2069,9 @@ int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
  		pvlan |= BIT(i);
  	}
 
+	/* Disable redirection of unknown SA to the CPU port */
+	b53_set_eap_mode(dev, port, EAP_MODE_BASIC);
+
  	/* Configure the local port VLAN control membership to include
  	 * remote ports and update the local port bitmask
  	 */
@@ -2077,6 +2107,9 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
  			pvlan &= ~BIT(i);
  	}
 
+	/* Enable redirection of unknown SA to the CPU port */
+	b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
+
  	b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
  	dev->ports[port].vlan_ctl_mask = pvlan;
 
drivers/net/dsa/b53/b53_regs.h +14 -0
index bfbcb66bef66..5f7a0e5c5709 100644
@@ -50,6 +50,9 @@
  /* Jumbo Frame Registers */
  #define B53_JUMBO_PAGE			0x40
 
+/* EAP Registers */
+#define B53_EAP_PAGE			0x42
+
  /* EEE Control Registers Page */
  #define B53_EEE_PAGE			0x92
 
@@ -480,6 +483,17 @@
  #define   JMS_MIN_SIZE			1518
  #define   JMS_MAX_SIZE			9724
 
+/*************************************************************************
+ * EAP Page Registers
+ *************************************************************************/
+#define B53_PORT_EAP_CONF(i)		(0x20 + 8 * (i))
+#define  EAP_MODE_SHIFT			51
+#define  EAP_MODE_SHIFT_63XX		50
+#define  EAP_MODE_MASK			(0x3ull << EAP_MODE_SHIFT)
+#define  EAP_MODE_MASK_63XX		(0x3ull << EAP_MODE_SHIFT_63XX)
+#define  EAP_MODE_BASIC			0
+#define  EAP_MODE_SIMPLIFIED		3
+
  /*************************************************************************
   * EEE Configuration Page Registers
   *************************************************************************/
maintainer
#6 lore raw
Quoted 18 lines · Rafał Miłecki

W dniu 8.05.2025 o 11:14, Jonas Gorski pisze:

Quoted 9 lines

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Quoted 7 lines

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

Quoted 5 lines

This change broke standalone ports (those not being part of bridge) on Northstar (BCM5301X) devices. We got reports from users about WAN ports on routers not working anymore:
https://github.com/openwrt/openwrt/issues/21187
https://github.com/openwrt/openwrt/issues/21349

Can you take another look at those changes, see if something me be wrong / missing?

Checking the BCM5301X datasheet, the register definitions look correct.

The first report appears to be for a Netgear R7000 which AFAICT would utilize port 8 of the switch as the CPU port, which would be correct.

The other report is for a Netgear R6250 where port 5 would be acting as the CPU port, that could be an issue unless the switch is also programmed to use port 5 as the IMP port.

Could you try to program GMNGCFG (page 0x02, offset 0) bits 7:6 to have the value 0b11 which is dual IMP port (IMPO is port 8 and IMP1 is port 5) and see if that helps?

Signature · 1 line
Florian
#7 lore raw

czw., 26 lut 2026 o 22:26 Florian Fainelli
<[email protected]> napisał(a):

Quoted 33 lines · Rafał Miłecki
Quoted 18 lines

W dniu 8.05.2025 o 11:14, Jonas Gorski pisze:

Quoted 9 lines

When bridged ports and standalone ports share a VLAN, e.g. via VLAN uppers, or untagged traffic with a vlan unaware bridge, the ASIC will still try to forward traffic to known FDB entries on standalone ports. But since the port VLAN masks prevent forwarding to bridged ports, this traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where this breaks pinging with learning on.

Quoted 7 lines

Work around this by enabling the simplified EAP mode on switches supporting it for standalone ports, which causes the ASIC to redirect traffic of unknown source MAC addresses to the CPU port.

Since standalone ports do not learn, there are no known source MAC addresses, so effectively this redirects all incoming traffic to the CPU port.

Quoted 8 lines

This change broke standalone ports (those not being part of bridge) on Northstar (BCM5301X) devices. We got reports from users about WAN ports on routers not working anymore:
https://github.com/openwrt/openwrt/issues/21187
https://github.com/openwrt/openwrt/issues/21349

Can you take another look at those changes, see if something me be wrong / missing?

Checking the BCM5301X datasheet, the register definitions look correct.

The first report appears to be for a Netgear R7000 which AFAICT would utilize port 8 of the switch as the CPU port, which would be correct.

Quoted 7 lines

The other report is for a Netgear R6250 where port 5 would be acting as the CPU port, that could be an issue unless the switch is also programmed to use port 5 as the IMP port.

Could you try to program GMNGCFG (page 0x02, offset 0) bits 7:6 to have the value 0b11 which is dual IMP port (IMPO is port 8 and IMP1 is port
5) and see if that helps?

On my Luxul XWR-3150 (it uses gmac0 and port 5) the value of B53_MGMT_PAGE (0x02) / B53_GLOBAL_CONFIG (0x00) is 0xc2. Nothing to set there I suppose?

Signature · 1 line
Rafał
#8 lore raw

pt., 27 lut 2026 o 13:23 Rafał Miłecki <[email protected]> napisał(a):

Quoted 9 lines

czw., 26 lut 2026 o 22:26 Florian Fainelli
<[email protected]> napisał(a):

Quoted 3 lines

Could you try to program GMNGCFG (page 0x02, offset 0) bits 7:6 to have the value 0b11 which is dual IMP port (IMPO is port 8 and IMP1 is port
5) and see if that helps?

On my Luxul XWR-3150 (it uses gmac0 and port 5) the value of B53_MGMT_PAGE (0x02) / B53_GLOBAL_CONFIG (0x00) is 0xc2. Nothing to set there I suppose?

I tried other possible values:
0x02
0x82
0x42

None affected my switch / wan / lan ports.

Signature · 1 line
Rafał
#9 lore raw
Quoted 11 lines · Rafał Miłecki

pt., 27 lut 2026 o 13:23 Rafał Miłecki <[email protected]> napisał(a):

Quoted 9 lines

czw., 26 lut 2026 o 22:26 Florian Fainelli
<[email protected]> napisał(a):

Quoted 3 lines

Could you try to program GMNGCFG (page 0x02, offset 0) bits 7:6 to have the value 0b11 which is dual IMP port (IMPO is port 8 and IMP1 is port
5) and see if that helps?

On my Luxul XWR-3150 (it uses gmac0 and port 5) the value of B53_MGMT_PAGE (0x02) / B53_GLOBAL_CONFIG (0x00) is 0xc2. Nothing to set there I suppose?

Quoted 7 lines

I tried other possible values:
0x02
0x82
0x42

None affected my switch / wan / lan ports.

Thanks for giving it a try, how about the BRCM_HDR_CTRL register programming (page 0x02, offset 0x03)? Can you see whether it is set to 0x3 or 0x1?

Signature · 1 line
Florian
#10 lore raw

pt., 27 lut 2026 o 18:58 Florian Fainelli <[email protected]> napisał(a):

Quoted 17 lines · Rafał Miłecki
Quoted 16 lines

pt., 27 lut 2026 o 13:23 Rafał Miłecki <[email protected]> napisał(a):

Quoted 9 lines

czw., 26 lut 2026 o 22:26 Florian Fainelli
<[email protected]> napisał(a):

Quoted 3 lines

Could you try to program GMNGCFG (page 0x02, offset 0) bits 7:6 to have the value 0b11 which is dual IMP port (IMPO is port 8 and IMP1 is port
5) and see if that helps?

On my Luxul XWR-3150 (it uses gmac0 and port 5) the value of B53_MGMT_PAGE (0x02) / B53_GLOBAL_CONFIG (0x00) is 0xc2. Nothing to set there I suppose?

I tried other possible values:
0x02
0x82
0x42

Quoted 6 lines
Quoted 2 lines

None affected my switch / wan / lan ports.

Thanks for giving it a try, how about the BRCM_HDR_CTRL register programming (page 0x02, offset 0x03)? Can you see whether it is set to 0x3 or 0x1?

It's 0x02 which seems to match BRCM_HDR_P5_EN. It makes sense as XWR-3150 uses gmac0 + port 5.

Signature · 1 line
Rafał
author maintainer
#11 lore raw

Hi,

sorry for being late to the party; currently on vacation (be back early next week).

Quoted 22 lines · Rafał Miłecki

pt., 27 lut 2026 o 18:58 Florian Fainelli <[email protected]> napisał(a):

Quoted 20 lines · Rafał Miłecki
Quoted 18 lines

pt., 27 lut 2026 o 13:23 Rafał Miłecki <[email protected]> napisał(a):

Quoted 9 lines

czw., 26 lut 2026 o 22:26 Florian Fainelli
<[email protected]> napisał(a):

Quoted 3 lines

Could you try to program GMNGCFG (page 0x02, offset 0) bits 7:6 to have the value 0b11 which is dual IMP port (IMPO is port 8 and IMP1 is port
5) and see if that helps?

On my Luxul XWR-3150 (it uses gmac0 and port 5) the value of B53_MGMT_PAGE (0x02) / B53_GLOBAL_CONFIG (0x00) is 0xc2. Nothing to set there I suppose?

I tried other possible values:
0x02
0x82
0x42

None affected my switch / wan / lan ports.

Quoted 6 lines
Quoted 3 lines

Thanks for giving it a try, how about the BRCM_HDR_CTRL register programming (page 0x02, offset 0x03)? Can you see whether it is set to 0x3 or 0x1?

It's 0x02 which seems to match BRCM_HDR_P5_EN. It makes sense as XWR-3150 uses gmac0 + port 5.

Does this affect all ports, or only the wan port?

Have you tried to check the hardware counters if they get sent out a different (cpu) port? AFAIK they should be available as ethtool counters via gmacs, though I'm not 100% sure.

Can you check the contents of the EAP Port config registers? Maybe some extra mode is set there by default.

I don't have NS(+) device, so I can only guess. Though I always wondered if the setup which CPU port (5/8/both) to use is just a software thing or actually a hardware thing ... .

Best regards,
Jonas

#12 lore raw

sob., 28 lut 2026 o 14:30 Jonas Gorski <[email protected]> napisał(a):

Quoted 1 line

Does this affect all ports, or only the wan port?

Problem affects every standalone port (one that isn't part of a bridge).

Quoted 3 lines

Have you tried to check the hardware counters if they get sent out a different (cpu) port? AFAIK they should be available as ethtool counters via gmacs, though I'm not 100% sure.

With your patch:
1. "rx_packets" stays 0
2. "rx_bytes" stays 0
3. "RxDiscarded" goes higher than 0

Quoted 2 lines

Can you check the contents of the EAP Port config registers? Maybe some extra mode is set there by default.

All my B53_EAP_PAGE / B53_PORT_EAP_CONF(port) registers are set to 0 by default.

Quoted 3 lines

I don't have NS(+) device, so I can only guess. Though I always wondered if the setup which CPU port (5/8/both) to use is just a software thing or actually a hardware thing ... .

Without your patch, 10 s after connecting cable to "wan" port:
NIC statistics:

     tx_packets: 13
     tx_bytes: 1998
     rx_packets: 2
     rx_bytes: 1180
     TxOctets: 2052
     TxDropPkts: 0
     TxBroadcastPkts: 2
     TxMulticastPkts: 11
     TxUnicastPkts: 0
     TxCollisions: 0
     TxSingleCollision: 0
     TxMultipleCollision: 0
     TxDeferredTransmit: 0
     TxLateCollision: 0
     TxExcessiveCollision: 0
     TxPausePkts: 0
     RxOctets: 1188
     RxUndersizePkts: 0
     RxPausePkts: 0
     Pkts64Octets: 0
     Pkts65to127Octets: 0
     Pkts128to255Octets: 0
     Pkts256to511Octets: 0
     Pkts512to1023Octets: 2
     Pkts1024to1522Octets: 0
     RxOversizePkts: 0
     RxJabbers: 0
     RxAlignmentErrors: 0
     RxFCSErrors: 0
     RxGoodOctets: 1188
     RxDropPkts: 0
     RxUnicastPkts: 2
     RxMulticastPkts: 0
     RxBroadcastPkts: 0
     RxSAChanges: 1
     RxFragments: 0
     RxJumboPkts: 0
     RxSymbolErrors: 0
     RxDiscarded: 0

With your patch, 10 s after connecting cable to "wan" port:
NIC statistics:

     tx_packets: 14
     tx_bytes: 2334
     rx_packets: 0
     rx_bytes: 0
     TxOctets: 2392
     TxDropPkts: 0
     TxBroadcastPkts: 3
     TxMulticastPkts: 11
     TxUnicastPkts: 0
     TxCollisions: 0
     TxSingleCollision: 0
     TxMultipleCollision: 0
     TxDeferredTransmit: 0
     TxLateCollision: 0
     TxExcessiveCollision: 0
     TxPausePkts: 0
     RxOctets: 1782
     RxUndersizePkts: 0
     RxPausePkts: 0
     Pkts64Octets: 0
     Pkts65to127Octets: 0
     Pkts128to255Octets: 0
     Pkts256to511Octets: 0
     Pkts512to1023Octets: 3
     Pkts1024to1522Octets: 0
     RxOversizePkts: 0
     RxJabbers: 0
     RxAlignmentErrors: 0
     RxFCSErrors: 0
     RxGoodOctets: 1782
     RxDropPkts: 0
     RxUnicastPkts: 3
     RxMulticastPkts: 0
     RxBroadcastPkts: 0
     RxSAChanges: 1
     RxFragments: 0
     RxJumboPkts: 0
     RxSymbolErrors: 0
     RxDiscarded: 3
Signature · 1 line
Rafał