1 From cd3d888d569f5908c4345f7c99018f574c80a32b Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Sun, 9 Dec 2012 14:58:56 +0100
4 Subject: [PATCH 1/4] ath9k: move duplicated debug message to
7 The fill_eeprom functions are printing the same
8 debug message in case the 'ath9k_hw_nvram_read'
9 function fails. Remove the duplicated code from
10 fill_eeprom functions and add the ath_dbg call
11 directly into 'ath9k_hw_nvram_read'.
13 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
15 drivers/net/wireless/ath/ath9k/eeprom.c | 8 +++++++-
16 drivers/net/wireless/ath/ath9k/eeprom_4k.c | 6 ++----
17 drivers/net/wireless/ath/ath9k/eeprom_9287.c | 5 +----
18 drivers/net/wireless/ath/ath9k/eeprom_def.c | 5 +----
19 4 files changed, 11 insertions(+), 13 deletions(-)
21 --- a/drivers/net/wireless/ath/ath9k/eeprom.c
22 +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
23 @@ -115,7 +115,13 @@ void ath9k_hw_usb_gen_fill_eeprom(struct
25 bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
27 - return common->bus_ops->eeprom_read(common, off, data);
30 + ret = common->bus_ops->eeprom_read(common, off, data);
32 + ath_dbg(common, EEPROM, "Unable to read eeprom region\n");
37 void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList,
38 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
39 +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
40 @@ -37,11 +37,9 @@ static bool __ath9k_hw_4k_fill_eeprom(st
41 int addr, eep_start_loc = 64;
43 for (addr = 0; addr < SIZE_EEPROM_4K; addr++) {
44 - if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) {
45 - ath_dbg(common, EEPROM,
46 - "Unable to read eeprom region\n");
47 + if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
54 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
55 +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
56 @@ -40,11 +40,8 @@ static bool __ath9k_hw_ar9287_fill_eepro
58 for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
59 if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
61 - ath_dbg(common, EEPROM,
62 - "Unable to read eeprom region\n");
69 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
70 +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
71 @@ -97,11 +97,8 @@ static bool __ath9k_hw_def_fill_eeprom(s
73 for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) {
74 if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc,
76 - ath_err(ath9k_hw_common(ah),
77 - "Unable to read eeprom region\n");