diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-02-13 22:43:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-14 17:38:11 -0800 |
commit | 31046a5fd92c57d99e8861f3dc56a2584787b473 (patch) | |
tree | 95c43c68688376535eb83c805231d55477b0e874 /drivers/net/dsa/b53 | |
parent | dcbdf1350e3312c199dbc6a76f41cf8f67e8c09c (diff) | |
download | linux-31046a5fd92c57d99e8861f3dc56a2584787b473.tar.gz linux-31046a5fd92c57d99e8861f3dc56a2584787b473.tar.bz2 linux-31046a5fd92c57d99e8861f3dc56a2584787b473.zip |
net: dsa: propagate extack to .port_vlan_add
Allow drivers to communicate their restrictions to user space directly,
instead of printing to the kernel log. Where the conversion would have
been lossy and things like VLAN ID could no longer be conveyed (due to
the lack of support for printf format specifier in netlink extack), I
chose to keep the messages in full form to the kernel log only, and
leave it up to individual driver maintainers to move more messages to
extack.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/b53')
-rw-r--r-- | drivers/net/dsa/b53/b53_common.c | 3 | ||||
-rw-r--r-- | drivers/net/dsa/b53/b53_priv.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 72c75c7bdb65..98cc051e513e 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1444,7 +1444,8 @@ static int b53_vlan_prepare(struct dsa_switch *ds, int port, } int b53_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan) + const struct switchdev_obj_port_vlan *vlan, + struct netlink_ext_ack *extack) { struct b53_device *dev = ds->priv; bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index ae72ef46b0b6..fc5d6fddb3fe 100644 --- a/drivers/net/dsa/b53/b53_priv.h +++ b/drivers/net/dsa/b53/b53_priv.h @@ -348,7 +348,8 @@ void b53_phylink_mac_link_up(struct dsa_switch *ds, int port, bool tx_pause, bool rx_pause); int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering); int b53_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan); + const struct switchdev_obj_port_vlan *vlan, + struct netlink_ext_ack *extack); int b53_vlan_del(struct dsa_switch *ds, int port, const struct switchdev_obj_port_vlan *vlan); int b53_fdb_add(struct dsa_switch *ds, int port, |