提交 8cf5e8e5 编写于 作者: L Luciano Coelho 提交者: John W. Linville

wl1271: upload only the first 468 bytes from the NVS file

We were uploading the whole NVS file, but that is wrong, because the same
file also contains the initialization values.  For the latest firmwares, we
should upload only the initial 468 bytes from the file.
Signed-off-by: NLuciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 98b2a684
...@@ -111,6 +111,7 @@ enum { ...@@ -111,6 +111,7 @@ enum {
#define WL1271_FW_NAME "wl1271-fw.bin" #define WL1271_FW_NAME "wl1271-fw.bin"
#define WL1271_NVS_NAME "wl1271-nvs.bin" #define WL1271_NVS_NAME "wl1271-nvs.bin"
#define WL1271_NVS_LEN 468
/* /*
* Enable/disable 802.11a support for WL1273 * Enable/disable 802.11a support for WL1273
......
...@@ -225,9 +225,15 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl) ...@@ -225,9 +225,15 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
if (nvs == NULL) if (nvs == NULL)
return -ENODEV; return -ENODEV;
if (wl->nvs_len < WL1271_NVS_LEN)
return -EINVAL;
nvs_ptr = nvs; nvs_ptr = nvs;
nvs_len = wl->nvs_len; /* only the first part of the NVS needs to be uploaded */
nvs_len = WL1271_NVS_LEN;
/* FIXME: read init settings from the remaining part of the NVS */
/* Update the device MAC address into the nvs */ /* Update the device MAC address into the nvs */
nvs[11] = wl->mac_addr[0]; nvs[11] = wl->mac_addr[0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册