public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat•com>
To: netdev@vger•kernel.org
Cc: c4p7n@capitanio•org, Francois Romieu <romieu@fr•zoreil.com>,
	kernel@vger•kernel.org
Subject: Re: [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address
Date: Wed, 15 Oct 2008 14:31:57 +0200	[thread overview]
Message-ID: <48F5E2BD.8030901@redhat.com> (raw)
In-Reply-To: <200810151011.m9FABBRj025271@post.webmailer.de>

c4p7n@capitanio•org wrote:
> Tested on top of linus tree and back ported 2.6.27.
> 
> Please cc me, thanks
> Martin Capitanio
> 
I think this one is more common.

Ivan

=====
Subject: [PATCH] [r8169] initialize MAC address found in EEPROM only if is it valid

Signed-off-by: Ivan Vecera <ivecera@redhat•com>
---
 drivers/net/r8169.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c821da2..587a96c 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1975,8 +1975,9 @@ static void rtl_init_mac_address(struct rtl8169_private *tp,
 
 	dprintk("MAC address found in EEPROM: %s\n", print_mac(buf, mac));
 
-	/* Write MAC address */
-	rtl_rar_set(tp, mac);
+	/* Write MAC address if is it valid */
+	if (is_valid_ether_addr(mac))
+		rtl_rar_set(tp, mac);
 }
 
 static int __devinit
-- 
1.5.6.3

  reply	other threads:[~2008-10-15 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 10:11 [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address c4p7n
2008-10-15 12:31 ` Ivan Vecera [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-15 13:57 c4p7n
2008-10-15 22:50 ` Francois Romieu
2008-10-16 11:19   ` Martin Capitanio
2008-10-21 11:15   ` Ivan Vecera

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=48F5E2BD.8030901@redhat.com \
    --to=ivecera@redhat$(echo .)com \
    --cc=c4p7n@capitanio$(echo .)org \
    --cc=kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=romieu@fr$(echo .)zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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