diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2010-02-18 06:25:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-19 15:52:44 -0500 |
commit | 6f8434a754894f5743efc281fda3925ecac258b9 (patch) | |
tree | 6a52863af5f3431d7e607e7430582b6b73ce7766 | |
parent | 12419cce88fa591a846a542d35cff43b69d9e271 (diff) |
wl1271: skip 3 unused bytes from the NVS
Our NVS uploading mechanism had a bug that was causing it to pass three extra
zeros at the start of the NVS. This may be a problem in the NVS generation
application, but for now we fix it in the driver.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_boot.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index 57ba78d83e87..fb3090c3ed15 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c | |||
@@ -277,9 +277,14 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl) | |||
277 | wl1271_set_partition(wl, &part_table[PART_WORK]); | 277 | wl1271_set_partition(wl, &part_table[PART_WORK]); |
278 | 278 | ||
279 | /* Copy the NVS tables to a new block to ensure alignment */ | 279 | /* Copy the NVS tables to a new block to ensure alignment */ |
280 | nvs_aligned = kmemdup(nvs_ptr, nvs_len, GFP_KERNEL); | 280 | /* FIXME: We jump 3 more bytes before uploading the NVS. It seems |
281 | if (!nvs_aligned) | 281 | that our NVS files have three extra zeros here. I'm not sure whether |
282 | return -ENOMEM; | 282 | the problem is in our NVS generation or we should really jumpt these |
283 | 3 bytes here */ | ||
284 | nvs_ptr += 3; | ||
285 | |||
286 | nvs_aligned = kmemdup(nvs_ptr, nvs_len, GFP_KERNEL); if | ||
287 | (!nvs_aligned) return -ENOMEM; | ||
283 | 288 | ||
284 | /* And finally we upload the NVS tables */ | 289 | /* And finally we upload the NVS tables */ |
285 | /* FIXME: In wl1271, we upload everything at once. | 290 | /* FIXME: In wl1271, we upload everything at once. |