aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/eeprom.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-12 23:26:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:12:50 -0400
commite71cef37f1f4cb7e9c919cbaabe23438f10a7080 (patch)
treedd606482aa1faec74247e6ba2e932d78072c93ae /drivers/net/wireless/ath9k/eeprom.c
parentd6509151bd3e952b7d157ea4dbae23279d427e95 (diff)
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 <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/eeprom.c')
-rw-r--r--drivers/net/wireless/ath9k/eeprom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/eeprom.c b/drivers/net/wireless/ath9k/eeprom.c
index 973b576c0ad8..d7b9cf4e8eba 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)
416 else 416 else
417 el = ah->eeprom.map4k.baseEepHeader.length; 417 el = ah->eeprom.map4k.baseEepHeader.length;
418 418
419 if (el > sizeof(struct ar5416_eeprom_def)) 419 if (el > sizeof(struct ar5416_eeprom_4k))
420 el = sizeof(struct ar5416_eeprom_4k) / sizeof(u16); 420 el = sizeof(struct ar5416_eeprom_4k) / sizeof(u16);
421 else 421 else
422 el = el / sizeof(u16); 422 el = el / sizeof(u16);