diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2009-12-11 08:40:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:31:32 -0500 |
commit | 8cf5e8e509950237fa0982235a703348d8b6e670 (patch) | |
tree | cdf15048787724c4644e5c0c3664f616ad9256d6 | |
parent | 98b2a68473ae975bc4abdeb66cd719ccfdad9d4a (diff) |
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: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_boot.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 3bec6f3b1c7f..8dfc9ec9590d 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -111,6 +111,7 @@ enum { | |||
111 | 111 | ||
112 | #define WL1271_FW_NAME "wl1271-fw.bin" | 112 | #define WL1271_FW_NAME "wl1271-fw.bin" |
113 | #define WL1271_NVS_NAME "wl1271-nvs.bin" | 113 | #define WL1271_NVS_NAME "wl1271-nvs.bin" |
114 | #define WL1271_NVS_LEN 468 | ||
114 | 115 | ||
115 | /* | 116 | /* |
116 | * Enable/disable 802.11a support for WL1273 | 117 | * Enable/disable 802.11a support for WL1273 |
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index b7c96454cca3..e803b876f3f0 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c | |||
@@ -225,9 +225,15 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl) | |||
225 | if (nvs == NULL) | 225 | if (nvs == NULL) |
226 | return -ENODEV; | 226 | return -ENODEV; |
227 | 227 | ||
228 | if (wl->nvs_len < WL1271_NVS_LEN) | ||
229 | return -EINVAL; | ||
230 | |||
228 | nvs_ptr = nvs; | 231 | nvs_ptr = nvs; |
229 | 232 | ||
230 | nvs_len = wl->nvs_len; | 233 | /* only the first part of the NVS needs to be uploaded */ |
234 | nvs_len = WL1271_NVS_LEN; | ||
235 | |||
236 | /* FIXME: read init settings from the remaining part of the NVS */ | ||
231 | 237 | ||
232 | /* Update the device MAC address into the nvs */ | 238 | /* Update the device MAC address into the nvs */ |
233 | nvs[11] = wl->mac_addr[0]; | 239 | nvs[11] = wl->mac_addr[0]; |