* [MACVLAN]: Fix thinko in macvlan_transfer_operstate()
@ 2008-01-20 14:47 Patrick McHardy
2008-01-21 8:47 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2008-01-20 14:47 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 93 bytes --]
Fix a minor thinko in macvlan. The bug is uncritical, so this
doesn't need to go in 2.6.24.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 966 bytes --]
commit b40b16bb72ae1ad192daef55a3e9f81d76cd97ab
Author: Patrick McHardy <kaber@trash.net>
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 <kaber@trash.net>
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);
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [MACVLAN]: Fix thinko in macvlan_transfer_operstate()
2008-01-20 14:47 [MACVLAN]: Fix thinko in macvlan_transfer_operstate() Patrick McHardy
@ 2008-01-21 8:47 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-01-21 8:47 UTC (permalink / raw)
To: kaber; +Cc: netdev
From: Patrick McHardy <kaber@trash.net>
Date: Sun, 20 Jan 2008 15:47:08 +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 <kaber@trash.net>
Applied to net-2.6.25, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-21 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-20 14:47 [MACVLAN]: Fix thinko in macvlan_transfer_operstate() Patrick McHardy
2008-01-21 8:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).