diff options
author | Arınç ÜNAL <arinc.unal@arinc9.com> | 2024-04-13 15:01:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-17 09:56:36 +0200 |
commit | d59cf049c8378677053703e724808836f180888e (patch) | |
tree | 95592655444d94cb22858efb4cc1dc9f63225f4f /drivers/net/dsa/mt7530.h | |
parent | tun: limit printing rate when illegal packet received by tun dev (diff) | |
download | linux-d59cf049c8378677053703e724808836f180888e.tar.xz linux-d59cf049c8378677053703e724808836f180888e.zip |
net: dsa: mt7530: fix mirroring frames received on local port
This switch intellectual property provides a bit on the ARL global control
register which controls allowing mirroring frames which are received on the
local port (monitor port). This bit is unset after reset.
This ability must be enabled to fully support the port mirroring feature on
this switch intellectual property.
Therefore, this patch fixes the traffic not being reflected on a port,
which would be configured like below:
tc qdisc add dev swp0 clsact
tc filter add dev swp0 ingress matchall skip_sw \
action mirred egress mirror dev swp0
As a side note, this configuration provides the hairpinning feature for a
single port.
Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mt7530.h')
-rw-r--r-- | drivers/net/dsa/mt7530.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h index 585db03c0548..a08053390b28 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -32,6 +32,10 @@ enum mt753x_id { #define SYSC_REG_RSTCTRL 0x34 #define RESET_MCM BIT(2) +/* Register for ARL global control */ +#define MT753X_AGC 0xc +#define LOCAL_EN BIT(7) + /* Registers to mac forward control for unknown frames */ #define MT7530_MFC 0x10 #define BC_FFP(x) (((x) & 0xff) << 24) |