diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/wl1271/0001-wl12xx-Read-MAC-address-from-NVS-file-on-HW-startup.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/wl1271/0001-wl12xx-Read-MAC-address-from-NVS-file-on-HW-startup.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/wl1271/0001-wl12xx-Read-MAC-address-from-NVS-file-on-HW-startup.patch b/extras/recipes-kernel/linux/linux-omap/wl1271/0001-wl12xx-Read-MAC-address-from-NVS-file-on-HW-startup.patch new file mode 100644 index 00000000..a4f08736 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/wl1271/0001-wl12xx-Read-MAC-address-from-NVS-file-on-HW-startup.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 5d302917bbdb377538f6c848243a6265878abcee Mon Sep 17 00:00:00 2001 | ||
2 | From: Arik Nemtsov <arik@wizery.com> | ||
3 | Date: Sat, 16 Oct 2010 21:49:52 +0200 | ||
4 | Subject: [PATCH 01/15] wl12xx: Read MAC address from NVS file on HW startup | ||
5 | |||
6 | Try to read the MAC address from the on-disk NVS file. | ||
7 | A non-zero MAC address is required to add an AP interface. | ||
8 | |||
9 | Signed-off-by: Arik Nemtsov <arik@wizery.com> | ||
10 | Reviewed-by: Luciano Coelho <coelho@ti.com> | ||
11 | Signed-off-by: Luciano Coelho <coelho@ti.com> | ||
12 | --- | ||
13 | drivers/net/wireless/wl12xx/wl1271_main.c | 12 ++++++++++++ | ||
14 | 1 files changed, 12 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c | ||
17 | index 48a4b99..591de0e 100644 | ||
18 | --- a/drivers/net/wireless/wl12xx/wl1271_main.c | ||
19 | +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | ||
20 | @@ -2391,6 +2391,18 @@ int wl1271_register_hw(struct wl1271 *wl) | ||
21 | if (wl->mac80211_registered) | ||
22 | return 0; | ||
23 | |||
24 | + ret = wl1271_fetch_nvs(wl); | ||
25 | + if (ret == 0) { | ||
26 | + u8 *nvs_ptr = (u8 *)wl->nvs->nvs; | ||
27 | + | ||
28 | + wl->mac_addr[0] = nvs_ptr[11]; | ||
29 | + wl->mac_addr[1] = nvs_ptr[10]; | ||
30 | + wl->mac_addr[2] = nvs_ptr[6]; | ||
31 | + wl->mac_addr[3] = nvs_ptr[5]; | ||
32 | + wl->mac_addr[4] = nvs_ptr[4]; | ||
33 | + wl->mac_addr[5] = nvs_ptr[3]; | ||
34 | + } | ||
35 | + | ||
36 | SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr); | ||
37 | |||
38 | ret = ieee80211_register_hw(wl->hw); | ||
39 | -- | ||
40 | 1.6.6.1 | ||
41 | |||