1 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
3 @@ -3260,10 +3260,20 @@ static int ar9300_eeprom_restore_interna
5 u16 checksum, mchecksum;
6 struct ath_common *common = ath9k_hw_common(ah);
7 + struct ar9300_eeprom *eep;
10 - if (ath9k_hw_use_flash(ah))
11 - return ar9300_eeprom_restore_flash(ah, mptr, mdata_size);
12 + if (ath9k_hw_use_flash(ah)) {
15 + ar9300_eeprom_restore_flash(ah, mptr, mdata_size);
17 + /* check if eeprom contains valid data */
18 + eep = (struct ar9300_eeprom *) mptr;
19 + txrx = eep->baseEepHeader.txrxMask;
20 + if (txrx != 0 && txrx != 0xff)
24 word = kzalloc(2048, GFP_KERNEL);