bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
{
- return common->bus_ops->eeprom_read(common, off, data);
+ bool ret;
+
+ ret = common->bus_ops->eeprom_read(common, off, data);
+ if (!ret)
+ ath_dbg(common, EEPROM, "Unable to read eeprom region\n");
+
+ return ret;
}
void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList,
int addr, eep_start_loc = 64;
for (addr = 0; addr < SIZE_EEPROM_4K; addr++) {
- if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) {
- ath_dbg(common, EEPROM,
- "Unable to read eeprom region\n");
+ if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
+ eep_data))
return false;
- }
eep_data++;
}
for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
- eep_data)) {
- ath_dbg(common, EEPROM,
- "Unable to read eeprom region\n");
+ eep_data))
return false;
- }
eep_data++;
}
for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) {
if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc,
- eep_data)) {
- ath_err(ath9k_hw_common(ah),
- "Unable to read eeprom region\n");
+ eep_data))
return false;
- }
eep_data++;
}
return true;