ath9k: Fix bug in 4K EEPROM size calculation
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 13 Mar 2009 03:26:07 +0000 (08:56 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Mar 2009 00:12:50 +0000 (20:12 -0400)
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>
drivers/net/wireless/ath9k/eeprom.c

index 973b576..d7b9cf4 100644 (file)
@@ -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);