Re: [RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper

2011-03-18 Thread Arnd Bergmann
On Saturday 12 March 2011, Andy Green wrote: Introduce a generic helper function that can set a MAC address using data from the OMAP unqiue CPU ID register. Signed-off-by: Andy Green andy.gr...@linaro.org --- arch/arm/mach-omap2/id.c | 13 +

Re: [RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper

2011-03-18 Thread Andy Green
On 03/18/2011 08:34 AM, Somebody in the thread at some point said: +void omap2_die_id_to_mac(u8 *mac, int length) +{ + struct omap_die_id odi; + + omap_get_die_id(odi); + memcpy(mac,odi.id_0, length); + + /* mark it as not multicast and outside official 80211 MAC

Re: [RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper

2011-03-18 Thread Roger Quadros
On 03/13/2011 12:50 AM, ext Andy Green wrote: Introduce a generic helper function that can set a MAC address using data from the OMAP unqiue CPU ID register. Signed-off-by: Andy Green andy.gr...@linaro.org --- arch/arm/mach-omap2/id.c | 13 +

Re: [RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper

2011-03-18 Thread Andy Green
On 03/18/2011 08:52 AM, Somebody in the thread at some point said: + /* mark it as not multicast and outside official 80211 MAC namespace */ + + mac[0] = (mac[0] ~1) | 2; so here lies the answer to my question From where do you get the MAC :) Is there a guarantee that this MAC

Re: [RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper

2011-03-18 Thread Andy Green
On 03/18/2011 02:37 PM, Somebody in the thread at some point said: Hi - [sp] This 'trick' has been tried earlier in u-boot. See: http://www.mail-archive.com/u-boot@lists.denx.de/msg19915.html I am also not sure whether DIE_ID would really be unique. It doesn't actually need all

[RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper

2011-03-12 Thread Andy Green
Introduce a generic helper function that can set a MAC address using data from the OMAP unqiue CPU ID register. Signed-off-by: Andy Green andy.gr...@linaro.org --- arch/arm/mach-omap2/id.c | 13 + arch/arm/mach-omap2/include/mach/id.h |1 + 2 files changed, 14