]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ath5k: Fix eeprom checksum check for custom sized eeproms
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 4 Jan 2010 15:40:39 +0000 (10:40 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:29 +0000 (15:55 -0700)
commit98e4c05d2401863414cb5183e4d844ad061598ef
tree19380a6c629a27164c37313aeb36c38227b3b3da
parent9b44bbd3b08c8b9c7ae764465239886ca4d94827
ath5k: Fix eeprom checksum check for custom sized eeproms

commit 359207c687cc8f4f9845c8dadd0d6dabad44e584 upstream.

Commit 8bf3d79bc401ca417ccf9fc076d3295d1a71dbf5 enabled EEPROM
checksum checks to avoid bogus bug reports but failed to address
updating the code to consider devices with custom EEPROM sizes.
Devices with custom sized EEPROMs have the upper limit size stuffed
in the EEPROM. Use this as the upper limit instead of the static
default size. In case of a checksum error also provide back the
max size and whether or not this was the default size or a custom
one. If the EEPROM is busted we add a failsafe check to ensure
we don't loop forever or try to read bogus areas of hardware.

This closes bug 14874

http://bugzilla.kernel.org/show_bug.cgi?id=14874

Cc: stable@kernel.org
Cc: David Quan <david.quan@atheros.com>
Cc: Stephen Beahm <stephenbeahm@comcast.net>
Reported-by: Joshua Covington <joshuacov@googlemail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/ath5k/eeprom.h