From: David Miller <davem@davemloft.net>
To: jacmet@sunsite.dk
Cc: wfg@linux.intel.com, netdev@vger.kernel.org
Subject: Re: [PATCH] dm9601: handle corrupt mac address
Date: Tue, 06 Jan 2009 10:55:41 -0800 (PST) [thread overview]
Message-ID: <20090106.105541.165809083.davem@davemloft.net> (raw)
In-Reply-To: <87hc4cvp05.fsf@macbook.be.48ers.dk>
From: Peter Korsgaard <jacmet@sunsite.dk>
Date: Tue, 06 Jan 2009 09:04:58 +0100
> >>>>> "Wu" == Wu Fengguang <wfg@linux.intel.com> writes:
>
> Wu> Some cheap devices ship with dangling EEPROM pins!
> Wu> They always return invalid address ff:ff:ff:ff:ff:ff.
>
> Wu> Inherit the auto-generated address in this case,
> Wu> so that these products can work with zero configuration.
>
> Wu> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
> Wu> + /*
> Wu> + * Overwrite the auto-generated address only with good ones.
> Wu> + */
> Wu> + if (is_valid_ether_addr(mac))
> Wu> + memcpy(dev->net->dev_addr, mac, ETH_ALEN);
> Wu> +
>
> Do we automatically get a random address in netdev nowadays without
> calling random_ether_addr? I didn't know that.
>
> Anyway, I would prefer to add a dev_warn mentioning the fact that
> we're using a random address (and which one).
>
> Other than that,
>
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Applied, thanks everyone.
prev parent reply other threads:[~2009-01-06 18:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 6:14 [PATCH] dm9601: handle corrupt mac address Wu Fengguang
2009-01-06 8:04 ` Peter Korsgaard
2009-01-06 8:29 ` Wu Fengguang
2009-01-06 8:42 ` Peter Korsgaard
2009-01-06 9:50 ` Wu Fengguang
2009-01-06 10:28 ` David Brownell
2009-01-06 10:56 ` Peter Korsgaard
2009-01-06 18:55 ` David Miller [this message]
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=20090106.105541.165809083.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jacmet@sunsite.dk \
--cc=netdev@vger.kernel.org \
--cc=wfg@linux.intel.com \
/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).