[RFC PATCH 2/2] OMAP2+: PANDA: Fix up random or missing MAC addresses for eth0 and wlan0
From: arnd@arndb.de (Arnd Bergmann)
Date: 2011-03-25 20:20:55
Also in:
linux-omap
On Friday 25 March 2011 21:13:05 Jason Kridner wrote:
The use of the OMAP die id below makes this OMAP specific and the list referenced below of the devices to be referenced makes it Panda specific. Is there a way to make the list board specific, but to make these functions that will be used across many OMAP platforms reusable? I believe that this current code will result in a lot of cut-and-paste. My preference is that this is accepted and that we make this more general when we add this to other OMAP platforms, but it'd be great to capture your suggestions on how to do so before those cut-and-paste patch sets start coming in.
Do you know of other existing boards without the EEPROM? If we need the code to be more general, it will simply have to move out of the panda specific board file into one file that can be selected for compilation by other boards.
quoted
quoted
static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS;@@ -517,6 +606,8 @@ static void __init omap4_panda_init(void) if (wl12xx_set_platform_data(&omap_panda_wlan_data)) pr_err("error setting wl12xx data\n"); + register_netdevice_notifier(&omap_panda_netdev_notifier); +I just want to make sure I understand how this works. When a new network device is added, if the device name matches one of the above listed device paths, then the die id based MAC id is applied. This must be done via a device registration notifier as the registration is triggered when the device is detected.
Correct. Arnd