Skip to content

Commit

Permalink
ath9k: Fix bug in 4K EEPROM size calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Mar 28, 2009
1 parent d650915 commit e71cef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath9k/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e71cef3

Please sign in to comment.