Skip to content

Commit

Permalink
bridge: Allow set bridge ageing time when switchdev disabled
Browse files Browse the repository at this point in the history
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: c62987b ("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>
  • Loading branch information
Haishuang Yan authored and David S. Miller committed Mar 30, 2016
1 parent e84810c commit 5e263f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e263f7

Please sign in to comment.