wl1271: Fix overflow in wl1271_boot_upload_nvs
authorIdo Yariv <ido@wizery.com>
Wed, 22 Sep 2010 07:53:13 +0000 (09:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Sep 2010 19:57:38 +0000 (15:57 -0400)
commit67e0208acea29682f5766eb9f67f6f26117eef3e
tree39445bd52a7c310d5f70b94aa0c257fdd1a8669b
parent87fd2e6c90acb45a5741207fc953190596f93841
wl1271: Fix overflow in wl1271_boot_upload_nvs

Due to miscalculation of nvs_len, excessive data was sent to the
firmware.
Fix this by first setting nvs_ptr to point to the first NVS table,
and computing the total size of all NVS tables accordingly.

Signed-off-by: Ido Yariv <ido@wizery.com>
Tested-By: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271_boot.c