From: Phil Oester Date: Tue, 17 Aug 2010 18:45:08 +0000 (+0000) Subject: vlan: Match underlying dev carrier on vlan add X-Git-Tag: MMI-PSA29.97-13-9~22097^2~181 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ac820eebe9008094040955d294ef7b33b418413;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git vlan: Match underlying dev carrier on vlan add When adding a new vlan, if the underlying interface has no carrier, then the newly added vlan interface should also have no carrier. At present, this is not true - the newly added vlan is added with carrier up. Fix by checking state of real device. Signed-off-by: Phil Oester Signed-off-by: David S. Miller --- diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 3d59c9bf8feb..3bccdd12a264 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -510,7 +510,8 @@ static int vlan_dev_open(struct net_device *dev) if (vlan->flags & VLAN_FLAG_GVRP) vlan_gvrp_request_join(dev); - netif_carrier_on(dev); + if (netif_carrier_ok(real_dev)) + netif_carrier_on(dev); return 0; clear_allmulti: