mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-07 18:10:03 +01:00
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 <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
ebeae54d3a
commit
1c6e8088d9
1 file changed
+3
-2
+3
-2
@@ -2460,8 +2460,9 @@ static int dsa_slave_changeupper(struct net_device *dev,
|
||||
if (!err)
|
||||
dsa_bridge_mtu_normalization(dp);
|
||||
if (err == -EOPNOTSUPP) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Offloading not supported");
|
||||
if (!extack->_msg)
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Offloading not supported");
|
||||
err = 0;
|
||||
}
|
||||
err = notifier_from_errno(err);
|
||||
|
||||
Reference in new issue
Block a user