[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87hc4cvp05.fsf@macbook.be.48ers.dk>
Date: Tue, 06 Jan 2009 09:04:58 +0100
From: Peter Korsgaard <jacmet@...site.dk>
To: Wu Fengguang <wfg@...ux.intel.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] dm9601: handle corrupt mac address
>>>>> "Wu" == Wu Fengguang <wfg@...ux.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@...el.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@...site.dk>
--
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists