Subject: [MACVLAN]: Fix thinko in macvlan_transfer_operstate()

From: Patrick McHardy <[email-masked]>
Date: Sun, 20 Jan 2008 15:47:08 +0100

Fix a minor thinko in macvlan. The bug is uncritical, so this
doesn't need to go in 2.6.24.

commit b40b16bb72ae1ad192daef55a3e9f81d76cd97ab
Author: Patrick McHardy <[email-masked]>
Date:   Thu Jan 17 09:18:11 2008 +0100

    [MACVLAN]: Fix thinko in macvlan_transfer_operstate()
    
    When the lower device's carrier is off, the macvlan devices's
    carrier state should be checked to decide whether it needs to
    be turned off. Currently the lower device's state is checked
    a second time.
    
    This still works, but unnecessarily tries to turn off the
    carrier when its already off.
    
    Signed-off-by: Patrick McHardy <[email-masked]>

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 3acf8cd..312526b 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -375,7 +375,7 @@ static void macvlan_transfer_operstate(struct net_device *dev)
 		if (!netif_carrier_ok(dev))
 			netif_carrier_on(dev);
 	} else {
-		if (netif_carrier_ok(lowerdev))
+		if (netif_carrier_ok(dev))
 			netif_carrier_off(dev);
 	}
 }