diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_if.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 170794546522..89ad25a76202 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -67,20 +67,21 @@ void br_port_carrier_check(struct net_bridge_port *p) | |||
67 | struct net_device *dev = p->dev; | 67 | struct net_device *dev = p->dev; |
68 | struct net_bridge *br = p->br; | 68 | struct net_bridge *br = p->br; |
69 | 69 | ||
70 | if (netif_carrier_ok(dev)) | 70 | if (netif_running(dev) && netif_carrier_ok(dev)) |
71 | p->path_cost = port_cost(dev); | 71 | p->path_cost = port_cost(dev); |
72 | 72 | ||
73 | if (netif_running(br->dev)) { | 73 | if (!netif_running(br->dev)) |
74 | spin_lock_bh(&br->lock); | 74 | return; |
75 | if (netif_carrier_ok(dev)) { | 75 | |
76 | if (p->state == BR_STATE_DISABLED) | 76 | spin_lock_bh(&br->lock); |
77 | br_stp_enable_port(p); | 77 | if (netif_running(dev) && netif_carrier_ok(dev)) { |
78 | } else { | 78 | if (p->state == BR_STATE_DISABLED) |
79 | if (p->state != BR_STATE_DISABLED) | 79 | br_stp_enable_port(p); |
80 | br_stp_disable_port(p); | 80 | } else { |
81 | } | 81 | if (p->state != BR_STATE_DISABLED) |
82 | spin_unlock_bh(&br->lock); | 82 | br_stp_disable_port(p); |
83 | } | 83 | } |
84 | spin_unlock_bh(&br->lock); | ||
84 | } | 85 | } |
85 | 86 | ||
86 | static void release_nbp(struct kobject *kobj) | 87 | static void release_nbp(struct kobject *kobj) |