Skip to content

Commit 34c2d9f

Browse files
Ian Wilsondavem330
authored andcommitted
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: Ian Wilson <[email protected]> Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8f35043 commit 34c2d9f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

net/bridge/br_stp.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -576,17 +576,12 @@ void __br_set_forward_delay(struct net_bridge *br, unsigned long t)
576576
int br_set_forward_delay(struct net_bridge *br, unsigned long val)
577577
{
578578
unsigned long t = clock_t_to_jiffies(val);
579-
int err = -ERANGE;
580579

581-
spin_lock_bh(&br->lock);
582-
if (br->stp_enabled != BR_NO_STP &&
583-
(t < BR_MIN_FORWARD_DELAY || t > BR_MAX_FORWARD_DELAY))
584-
goto unlock;
580+
if (t < BR_MIN_FORWARD_DELAY || t > BR_MAX_FORWARD_DELAY)
581+
return -ERANGE;
585582

583+
spin_lock_bh(&br->lock);
586584
__br_set_forward_delay(br, t);
587-
err = 0;
588-
589-
unlock:
590585
spin_unlock_bh(&br->lock);
591-
return err;
586+
return 0;
592587
}

0 commit comments

Comments
 (0)