aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mt7530.h
diff options
context:
space:
mode:
authorDENG Qingfang <dqfext@gmail.com>2021-08-04 00:04:03 +0800
committerDavid S. Miller <davem@davemloft.net>2021-08-04 10:30:00 +0100
commita9e3f62dff3c29b0bca86cb188e61d97be84c087 (patch)
tree88071e847bd8830428f2ca5bea4234dc5cc3bc38 /drivers/net/dsa/mt7530.h
parentnet: dsa: mt7530: use independent VLAN learning on VLAN-unaware bridges (diff)
downloadlinux-dev-a9e3f62dff3c29b0bca86cb188e61d97be84c087.tar.xz
linux-dev-a9e3f62dff3c29b0bca86cb188e61d97be84c087.zip
net: dsa: mt7530: set STP state on filter ID 1
As filter ID 1 is the only one used for bridges, set STP state on it. Signed-off-by: DENG Qingfang <dqfext@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
index d44640bbd865..5b70ccef9459 100644
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -186,8 +186,8 @@ enum mt7530_vlan_egress_attr {
/* Register for port STP state control */
#define MT7530_SSP_P(x) (0x2000 + ((x) * 0x100))
-#define FID_PST(x) ((x) & 0x3)
-#define FID_PST_MASK FID_PST(0x3)
+#define FID_PST(fid, state) (((state) & 0x3) << ((fid) * 2))
+#define FID_PST_MASK(fid) FID_PST(fid, 0x3)
enum mt7530_stp_state {
MT7530_STP_DISABLED = 0,