diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2016-03-29 18:48:08 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-30 15:38:13 -0400 |
commit | 5e263f712691615fb802f06c98d7638c378f5d11 (patch) | |
tree | 75d44bf320d2552150c3f88dc2464a3e73dd4abd | |
parent | e84810c7b85a2d7897797b3ad3e879168a8e032a (diff) | |
download | op-kernel-dev-5e263f712691615fb802f06c98d7638c378f5d11.zip op-kernel-dev-5e263f712691615fb802f06c98d7638c378f5d11.tar.gz |
bridge: Allow set bridge ageing time when switchdev disabled
When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP,
we should ignore this error code and continue to set the ageing time.
Fixes: c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev")
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/bridge/br_stp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index e234490..9cb7044 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -582,7 +582,7 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time) int err; err = switchdev_port_attr_set(br->dev, &attr); - if (err) + if (err && err != -EOPNOTSUPP) return err; br->ageing_time = t; |