Subject: Re: [PATCH] dnet: Dave DNET ethernet controller driver

From: Sascha Hauer <[email-masked]>
Date: Wed, 11 Mar 2009 09:44:30 +0100

Hi,

On Tue, Mar 10, 2009 at 09:18:41PM -0700, Stephen Hemminger wrote:
> On Wed, 11 Mar 2009 05:29:09 +0300
> Ilya Yanok <[email-masked]> wrote:
> 
> > +static char ethaddr[18];
> > +
> > +module_param_string(ethaddr, ethaddr, sizeof(ethaddr), 0);
> > +
> > +static void get_mac_addr(struct net_device *nd, unsigned char *pmac)
> > +{
> > +	int i;
> > +	char *p = ethaddr;
> > +
> > +	ethaddr[17] = 0;
> > +	for (i = 0; i < ETH_ALEN; i++, p++) {
> > +		pmac[i] = simple_strtoul(p, &p, 16);
> > +		if (*p != ':')
> > +			break;
> > +	}
> > +	if (i != ETH_ALEN - 1) {
> > +		pr_err("Wrong MAC address format!\n");
> > +		memset(pmac, 0, ETH_ALEN);
> > +	}
> > +}
> > +
> 
> Do you still need this? Only works with one board, configuration via
> module parameters is discouraged.  Same effect can be done by setting
> mac address with regular tools.

Except for root over nfs. Ok, the answer to this is usually 'use
initrd', but this is still a pita on embedded systems.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |