OSDN Git Service

wl1251: Parse and use MAC address from supplied NVS data
authorPali Rohár <pali.rohar@gmail.com>
Thu, 9 Nov 2017 23:38:25 +0000 (00:38 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 27 Feb 2018 13:50:43 +0000 (15:50 +0200)
commit4f507d588d08429126530988f657a7a7ca3e6180
treea1bc8dbf7c8c0e89231588cb857ead662b285ec7
parent562da3a39cb78ffaba44511ec39d8c245023a02f
wl1251: Parse and use MAC address from supplied NVS data

This patch implements parsing MAC address from NVS data which are sent to
wl1251 chip. Calibration NVS data could contain valid MAC address and it
will be used instead of randomly generated one.

This patch also moves code for requesting NVS data from userspace to driver
initialization code to make sure that NVS data will be there at time when
permanent MAC address is needed.

Calibration NVS data for wl1251 are device specific. Every device with
wl1251 chip should have been calibrated in factory and needs to provide own
calibration data.

Default example file wl1251-nvs.bin, found in linux-firmware repository,
contains MAC address 00:00:20:07:03:09. So this MAC address is marked as
invalid as it is not real device specific address, just example one.

Format of calibration NVS data can be found at:
http://notaz.gp2x.de/misc/pnd/wl1251/nvs_map.txt

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wl1251/main.c