diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-10-26 11:22:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 00:00:09 +0900 |
commit | 02bc6e546e858b209c3ebe380a13a73b333b1b3f (patch) | |
tree | bb5750dc5daf1022a39028a48ce6e932a3888f2a /net/dsa | |
parent | 4a5b85ffe2a001b52d165931ad05d2d620daca3c (diff) | |
download | op-kernel-dev-02bc6e546e858b209c3ebe380a13a73b333b1b3f.zip op-kernel-dev-02bc6e546e858b209c3ebe380a13a73b333b1b3f.tar.gz |
net: dsa: introduce dsa_user_ports helper
Introduce a dsa_user_ports() helper to return the ds->enabled_port_mask
mask which is more explicit. This will also minimize diffs when touching
this internal mask.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/dsa2.c | 2 | ||||
-rw-r--r-- | net/dsa/legacy.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 62485a5..d43c59c 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -312,7 +312,7 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, struct dsa_switch *ds) * the slave MDIO bus driver rely on these values for probing PHY * devices or not */ - ds->phys_mii_mask = ds->enabled_port_mask; + ds->phys_mii_mask |= dsa_user_ports(ds); /* Add the switch to devlink before calling setup, so that setup can * add dpipe tables diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index 0b79c61..fa543c4 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c @@ -136,7 +136,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, /* Make the built-in MII bus mask match the number of ports, * switch drivers can override this later */ - ds->phys_mii_mask = ds->enabled_port_mask; + ds->phys_mii_mask |= dsa_user_ports(ds); /* * If the CPU connects to this switch, set the switch tree |