提交 34c2d9fb 编写于 作者: I Ian Wilson 提交者: David S. Miller

bridge: Allow forward delay to be cfgd when STP enabled

Allow bridge forward delay to be configured when Spanning Tree is enabled.
Signed-off-by: NIan Wilson <iwilson@brocade.com>
Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8f350437
...@@ -576,17 +576,12 @@ void __br_set_forward_delay(struct net_bridge *br, unsigned long t) ...@@ -576,17 +576,12 @@ void __br_set_forward_delay(struct net_bridge *br, unsigned long t)
int br_set_forward_delay(struct net_bridge *br, unsigned long val) int br_set_forward_delay(struct net_bridge *br, unsigned long val)
{ {
unsigned long t = clock_t_to_jiffies(val); unsigned long t = clock_t_to_jiffies(val);
int err = -ERANGE;
spin_lock_bh(&br->lock); if (t < BR_MIN_FORWARD_DELAY || t > BR_MAX_FORWARD_DELAY)
if (br->stp_enabled != BR_NO_STP && return -ERANGE;
(t < BR_MIN_FORWARD_DELAY || t > BR_MAX_FORWARD_DELAY))
goto unlock;
spin_lock_bh(&br->lock);
__br_set_forward_delay(br, t); __br_set_forward_delay(br, t);
err = 0;
unlock:
spin_unlock_bh(&br->lock); spin_unlock_bh(&br->lock);
return err; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册