diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2016-03-29 18:48:08 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-20 15:42:05 +0900 |
commit | df371b19630cf045e00f1b09a721bb7103266796 (patch) | |
tree | 85bdac333fa073b9250444dfff9db62b94e12811 | |
parent | 26dd42ebff94ff481af56704cd1b4dd32ca8579f (diff) | |
download | lwn-df371b19630cf045e00f1b09a721bb7103266796.tar.gz lwn-df371b19630cf045e00f1b09a721bb7103266796.zip |
bridge: Allow set bridge ageing time when switchdev disabled
[ Upstream commit 5e263f712691615fb802f06c98d7638c378f5d11 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 0e658f47a5da..eff69cb270d2 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -586,7 +586,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; |