diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-10-26 18:22:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-27 18:00:09 +0300 |
commit | 4a5b85ffe2a001b52d165931ad05d2d620daca3c (patch) | |
tree | e36bcf74ffadedffa5dfc613bfd946e3245733c5 /drivers/net/dsa/bcm_sf2_cfp.c | |
parent | 2b3e9891cb607f7c7d5a4b11fb5a6e775e7f3ef4 (diff) | |
download | linux-4a5b85ffe2a001b52d165931ad05d2d620daca3c.tar.xz |
net: dsa: use dsa_is_user_port everywhere
Most of the DSA code still check ds->enabled_port_mask directly to
inspect a given port type instead of using the provided dsa_is_user_port
helper. Change this.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2_cfp.c')
-rw-r--r-- | drivers/net/dsa/bcm_sf2_cfp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c index 4feb507eeee0..b721a2009b50 100644 --- a/drivers/net/dsa/bcm_sf2_cfp.c +++ b/drivers/net/dsa/bcm_sf2_cfp.c @@ -750,7 +750,7 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port, port_num = fs->ring_cookie / SF2_NUM_EGRESS_QUEUES; if (fs->ring_cookie == RX_CLS_FLOW_DISC || - !(BIT(port_num) & ds->enabled_port_mask) || + !dsa_is_user_port(ds, port_num) || port_num >= priv->hw_params.num_ports) return -EINVAL; /* |