wl12xx: use two MAC addresses based on the NVS or from fuse ROM
commit5e037e74802a10a71dddbb05585753b2fcbd8ad7
authorLuciano Coelho <coelho@ti.com>
Fri, 23 Dec 2011 07:32:17 +0000 (23 09:32 +0200)
committerLuciano Coelho <coelho@ti.com>
Wed, 15 Feb 2012 06:38:29 +0000 (15 08:38 +0200)
tree4fca005d0d5bdf06ed0d44a095e5bf3c36c27999
parent30c5dbd1ee191dca1c04c70df0ba1adf0a9769c3
wl12xx: use two MAC addresses based on the NVS or from fuse ROM

Add support for two MAC addresses.  If the NVS has a valid MAC
address, that takes precedence and we use two sequential address
starting from the one specified.

If the NVS doesn't contain a valid MAC address (ie. if it is set to
00:00:00:00:00:00), we check if the HW PG version in use has the
BD_ADDR written in the fuse ROM.  If it does, we read it and derive
the two subsequent addresses for WLAN.

During production, 3 addresses are reserved per device.  The first for
Bluetooth (burnt in the fuse ROM) and the following two for WLAN.

This patch has some code by Igal and Arik (squashed from internal
patches).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/boot.c
drivers/net/wireless/wl12xx/boot.h
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/reg.h
drivers/net/wireless/wl12xx/wl12xx.h