netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Frank Li <lznuaa@gmail.com>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	fabio.estevam@freescale.com, l.stach@pengutronix.de,
	Frank.Li@freescale.com, netdev@vger.kernel.org,
	davem@davemloft.net
Subject: Re: Freescale FEC: fall back to random address
Date: Tue, 2 Apr 2013 13:35:32 +0200	[thread overview]
Message-ID: <20130402113532.GA8880@amd.pavel.ucw.cz> (raw)
In-Reply-To: <CAHrpEqSVUc1yedCoyOrRoxkjY7=N_pCDB1F7-WvRaP+4UEY68A@mail.gmail.com>

Hi!

> I think it is okay.

Ok, now... is there someone maintianing Freescale FEC? Or, Dave, can
you merge the patch?

Thanks,
								Pavel


> 2013/4/1 Pavel Machek <pavel@denx.de>:
> > If there's no valid ethernet address, fall back to randomly generated
> > one.
> >
> > (Yes, I need to get newer u-boot for the board, but as the only
> > available one is from 2009... this might be good idea).
> >
> > Signed-off-by: Pavel Machek <pavel@denx.de>
> >
> >
> > index e3f3937..5a7d1e1 100644
> > pp--- a/drivers/net/ethernet/freescale/fec.c
> > +++ b/drivers/net/ethernet/freescale/fec.c
> > @@ -906,6 +914,16 @@ static void fec_get_mac(struct net_device *ndev)
> >                 iap = &tmpaddr[0];
> >         }
> >
> > +       /*
> > +        * 5) random mac address
> > +        */
> > +       if (!is_valid_ether_addr(iap)) {
> > +               /* Report it and use a random ethernet address instead */
> > +               netdev_err(ndev, "Invalid MAC address: %pM\n", iap);
> > +               random_ether_addr(iap);
> > +               netdev_info(ndev, "Using random MAC address: %pM\n", iap);
> > +       }
> > +
> >         memcpy(ndev->dev_addr, iap, ETH_ALEN);
> >
> >         /* Adjust MAC if using macaddr */

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2013-04-02 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-31 21:06 Freescale FEC: fall back to random address Pavel Machek
2013-04-02  8:23 ` Frank Li
2013-04-02 11:35   ` Pavel Machek [this message]
     [not found]     ` <CAHrpEqTdTnRx_htZkFyG2KU5wixdhqmWZ-3R5s=fdedQYc6D9w@mail.gmail.com>
2013-04-02 15:49       ` 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=20130402113532.GA8880@amd.pavel.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=Frank.Li@freescale.com \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lznuaa@gmail.com \
    --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).