From 0d16f302f23c9f5101f849450abc073045a193de Mon Sep 17 00:00:00 2001 From: Zhu Yanjun Date: Tue, 17 Feb 2015 23:59:08 +0800 Subject: [PATCH 1/1] bridge: turn on carrier after removing the last sub interface When the last sub interface is removed from the bridge, the bridge turn off the carrier. Maybe it is not compatible with firstly created bridge without any sub interface. At that time, the carrier of this bridge is turned on. Signed-off-by: Zhu Yanjun --- net/bridge/br_if.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index ed307db..f391f8c 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -565,6 +565,12 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) netdev_update_features(br->dev); + /* No sub interface in bridge, turn on carrier */ + if (list_empty(&br->port_list)) { + eth_hw_addr_random(br->dev); + netif_carrier_on(br->dev); + } + return 0; } -- 1.9.1