summaryrefslogtreecommitdiff
path: root/net/dsa/switch.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-02-13 23:43:18 +0300
committerDavid S. Miller <davem@davemloft.net>2021-02-15 04:38:11 +0300
commit31046a5fd92c57d99e8861f3dc56a2584787b473 (patch)
tree95c43c68688376535eb83c805231d55477b0e874 /net/dsa/switch.c
parentdcbdf1350e3312c199dbc6a76f41cf8f67e8c09c (diff)
downloadlinux-31046a5fd92c57d99e8861f3dc56a2584787b473.tar.xz
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 'net/dsa/switch.c')
-rw-r--r--net/dsa/switch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 1906179e59f7..c82d201181a5 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -291,7 +291,8 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
for (port = 0; port < ds->num_ports; port++) {
if (dsa_switch_vlan_match(ds, port, info)) {
- err = ds->ops->port_vlan_add(ds, port, info->vlan);
+ err = ds->ops->port_vlan_add(ds, port, info->vlan,
+ info->extack);
if (err)
return err;
}