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 /include/net/dsa.h | |
parent | 4a5b85ffe2a001b52d165931ad05d2d620daca3c (diff) | |
download | linux-02bc6e546e858b209c3ebe380a13a73b333b1b3f.tar.bz2 |
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 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 49701d958663..dc7728062396 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -276,6 +276,11 @@ static inline bool dsa_is_user_port(struct dsa_switch *ds, int p) return !!(ds->enabled_port_mask & BIT(p)); } +static inline u32 dsa_user_ports(struct dsa_switch *ds) +{ + return ds->enabled_port_mask; +} + static inline const struct dsa_port *dsa_to_port(struct dsa_switch *ds, int p) { return &ds->ports[p]; |