aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_main.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-18 06:25:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:44 -0500
commite2e77b5ffb14211306ee093f01230f6ec69fab30 (patch)
treefc1459583628993f33e88ee402f843ddc184f8c7 /drivers/net/wireless/wl12xx/wl1271_main.c
parent6f8434a754894f5743efc281fda3925ecac258b9 (diff)
wl1271: Fix random MAC address setting
If reverting to a random MAC address, the driver would not update it to the NVS file, and hence the firmware frame filtering would not work properly. So update the randomized MAC address to the NVS image. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index e698dec40511..c7f5191e7dbf 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -562,6 +562,14 @@ static int wl1271_update_mac_addr(struct wl1271 *wl)
562 static const u8 nokia_oui[3] = {0x00, 0x1f, 0xdf}; 562 static const u8 nokia_oui[3] = {0x00, 0x1f, 0xdf};
563 memcpy(wl->mac_addr, nokia_oui, 3); 563 memcpy(wl->mac_addr, nokia_oui, 3);
564 get_random_bytes(wl->mac_addr + 3, 3); 564 get_random_bytes(wl->mac_addr + 3, 3);
565
566 /* update this address to the NVS */
567 nvs_ptr[11] = wl->mac_addr[0];
568 nvs_ptr[10] = wl->mac_addr[1];
569 nvs_ptr[6] = wl->mac_addr[2];
570 nvs_ptr[5] = wl->mac_addr[3];
571 nvs_ptr[4] = wl->mac_addr[4];
572 nvs_ptr[3] = wl->mac_addr[5];
565 } 573 }
566 574
567 SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr); 575 SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr);