mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
ath9k_hw: Fix EEPROM uncompress block reading on AR9003
The EEPROM is compressed on AR9003, upon decompression the wrong upper limit was being used for the block which prevented the 5 GHz CTL indexes from being used, which are stored towards the end of the EEPROM block. This fix allows the actual intended regulatory limits to be used on AR9003 hardware. Cc: stable@kernel.org [2.6.36+] Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
c3d34d5d96
commit
803288e61e
@ -797,7 +797,7 @@ static bool ar9300_uncompress_block(struct ath_hw *ah,
|
||||
length = block[it+1];
|
||||
length &= 0xff;
|
||||
|
||||
if (length > 0 && spot >= 0 && spot+length < mdataSize) {
|
||||
if (length > 0 && spot >= 0 && spot+length <= mdataSize) {
|
||||
ath_print(common, ATH_DBG_EEPROM,
|
||||
"Restore at %d: spot=%d "
|
||||
"offset=%d length=%d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user