diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_eeprom.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 25de6f9a9778..3cddd78e88ac 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -3260,10 +3260,20 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, | |||
3260 | int it; | 3260 | int it; |
3261 | u16 checksum, mchecksum; | 3261 | u16 checksum, mchecksum; |
3262 | struct ath_common *common = ath9k_hw_common(ah); | 3262 | struct ath_common *common = ath9k_hw_common(ah); |
3263 | struct ar9300_eeprom *eep; | ||
3263 | eeprom_read_op read; | 3264 | eeprom_read_op read; |
3264 | 3265 | ||
3265 | if (ath9k_hw_use_flash(ah)) | 3266 | if (ath9k_hw_use_flash(ah)) { |
3266 | return ar9300_eeprom_restore_flash(ah, mptr, mdata_size); | 3267 | u8 txrx; |
3268 | |||
3269 | ar9300_eeprom_restore_flash(ah, mptr, mdata_size); | ||
3270 | |||
3271 | /* check if eeprom contains valid data */ | ||
3272 | eep = (struct ar9300_eeprom *) mptr; | ||
3273 | txrx = eep->baseEepHeader.txrxMask; | ||
3274 | if (txrx != 0 && txrx != 0xff) | ||
3275 | return 0; | ||
3276 | } | ||
3267 | 3277 | ||
3268 | word = kzalloc(2048, GFP_KERNEL); | 3278 | word = kzalloc(2048, GFP_KERNEL); |
3269 | if (!word) | 3279 | if (!word) |