From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: [MACVLAN]: Fix thinko in macvlan_transfer_operstate()
Date: Sun, 20 Jan 2008 15:47:08 +0100 [thread overview]
Message-ID: <47935EEC.6010402@trash.net> (raw)
[-- 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);
}
}
next reply other threads:[~2008-01-20 14:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-20 14:47 Patrick McHardy [this message]
2008-01-21 8:47 ` [MACVLAN]: Fix thinko in macvlan_transfer_operstate() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47935EEC.6010402@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).