]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: allow port_bridge_join() to override extack message
authorClément Léger <clement.leger@bootlin.com>
Fri, 24 Jun 2022 14:39:46 +0000 (16:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jun 2022 10:37:54 +0000 (11:37 +0100)
commit6c0c1ef0b796dc7ba9958625299987dfba703223
tree519ba97f1b7bd0df589389175dccdd1580b834dd
parent9834b1bab995357ee0d8bcc48312fd7211542151
net: dsa: allow port_bridge_join() to override extack message

Some drivers might report that they are unable to bridge ports by
returning -EOPNOTSUPP, but still wants to override extack message.
In order to do so, in dsa_slave_changeupper(), if port_bridge_join()
returns -EOPNOTSUPP, check if extack message is set and if so, do not
override it.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c