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>
This commit is contained in:

committed by
David S. Miller

parent
4a5b85ffe2
commit
02bc6e546e
@@ -175,9 +175,8 @@ static int mv88e6060_setup_port(struct dsa_switch *ds, int p)
|
||||
*/
|
||||
REG_WRITE(addr, PORT_VLAN_MAP,
|
||||
((p & 0xf) << PORT_VLAN_MAP_DBNUM_SHIFT) |
|
||||
(dsa_is_cpu_port(ds, p) ?
|
||||
ds->enabled_port_mask :
|
||||
BIT(dsa_to_port(ds, p)->cpu_dp->index)));
|
||||
(dsa_is_cpu_port(ds, p) ? dsa_user_ports(ds) :
|
||||
BIT(dsa_to_port(ds, p)->cpu_dp->index)));
|
||||
|
||||
/* Port Association Vector: when learning source addresses
|
||||
* of packets, add the address to the address database using
|
||||
|
Reference in New Issue
Block a user