From: Sujith Date: Fri, 13 Mar 2009 03:26:07 +0000 (+0530) Subject: ath9k: Fix bug in 4K EEPROM size calculation X-Git-Tag: v3.12-rc1~15110^2~83^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e71cef37f1f4cb7e9c919cbaabe23438f10a7080;p=kernel%2Fkernel-generic.git ath9k: Fix bug in 4K EEPROM size calculation We should be checking with the 4K header and not the non-4K header size. Signed-off-by: Sujith Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath9k/eeprom.c b/drivers/net/wireless/ath9k/eeprom.c index 973b576..d7b9cf4 100644 --- a/drivers/net/wireless/ath9k/eeprom.c +++ b/drivers/net/wireless/ath9k/eeprom.c @@ -416,7 +416,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) else el = ah->eeprom.map4k.baseEepHeader.length; - if (el > sizeof(struct ar5416_eeprom_def)) + if (el > sizeof(struct ar5416_eeprom_4k)) el = sizeof(struct ar5416_eeprom_4k) / sizeof(u16); else el = el / sizeof(u16);