Skip to content

Commit

Permalink
[MACVLAN]: Fix thinko in macvlan_transfer_operstate()
Browse files Browse the repository at this point in the history
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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent 91b4f95 commit f12ca5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit f12ca5f

Please sign in to comment.