Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e71cef37 authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

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: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d6509151
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);