diff options
Diffstat (limited to 'drivers/net/wireless/ath')
21 files changed, 186 insertions, 254 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index 1a984b02e9e5..25a6e4417cdb 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c | |||
@@ -35,10 +35,9 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data) | |||
35 | 35 | ||
36 | pdata = (struct ath9k_platform_data *) pdev->dev.platform_data; | 36 | pdata = (struct ath9k_platform_data *) pdev->dev.platform_data; |
37 | if (off >= (ARRAY_SIZE(pdata->eeprom_data))) { | 37 | if (off >= (ARRAY_SIZE(pdata->eeprom_data))) { |
38 | ath_print(common, ATH_DBG_FATAL, | 38 | ath_err(common, |
39 | "%s: flash read failed, offset %08x " | 39 | "%s: flash read failed, offset %08x is out of range\n", |
40 | "is out of range\n", | 40 | __func__, off); |
41 | __func__, off); | ||
42 | return false; | 41 | return false; |
43 | } | 42 | } |
44 | 43 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 06e34d293dc8..9af9f23af3c4 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -173,8 +173,7 @@ static int ar5008_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) | |||
173 | channelSel = ((freq - 704) * 2 - 3040) / 10; | 173 | channelSel = ((freq - 704) * 2 - 3040) / 10; |
174 | bModeSynth = 1; | 174 | bModeSynth = 1; |
175 | } else { | 175 | } else { |
176 | ath_print(common, ATH_DBG_FATAL, | 176 | ath_err(common, "Invalid channel %u MHz\n", freq); |
177 | "Invalid channel %u MHz\n", freq); | ||
178 | return -EINVAL; | 177 | return -EINVAL; |
179 | } | 178 | } |
180 | 179 | ||
@@ -206,8 +205,7 @@ static int ar5008_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) | |||
206 | channelSel = ath9k_hw_reverse_bits((freq - 4800) / 5, 8); | 205 | channelSel = ath9k_hw_reverse_bits((freq - 4800) / 5, 8); |
207 | aModeRefSel = ath9k_hw_reverse_bits(1, 2); | 206 | aModeRefSel = ath9k_hw_reverse_bits(1, 2); |
208 | } else { | 207 | } else { |
209 | ath_print(common, ATH_DBG_FATAL, | 208 | ath_err(common, "Invalid channel %u MHz\n", freq); |
210 | "Invalid channel %u MHz\n", freq); | ||
211 | return -EINVAL; | 209 | return -EINVAL; |
212 | } | 210 | } |
213 | 211 | ||
@@ -448,8 +446,7 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah) | |||
448 | #define ATH_ALLOC_BANK(bank, size) do { \ | 446 | #define ATH_ALLOC_BANK(bank, size) do { \ |
449 | bank = kzalloc((sizeof(u32) * size), GFP_KERNEL); \ | 447 | bank = kzalloc((sizeof(u32) * size), GFP_KERNEL); \ |
450 | if (!bank) { \ | 448 | if (!bank) { \ |
451 | ath_print(common, ATH_DBG_FATAL, \ | 449 | ath_err(common, "Cannot allocate RF banks\n"); \ |
452 | "Cannot allocate RF banks\n"); \ | ||
453 | return -ENOMEM; \ | 450 | return -ENOMEM; \ |
454 | } \ | 451 | } \ |
455 | } while (0); | 452 | } while (0); |
@@ -879,8 +876,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah, | |||
879 | 876 | ||
880 | /* Write analog registers */ | 877 | /* Write analog registers */ |
881 | if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { | 878 | if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { |
882 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 879 | ath_err(ath9k_hw_common(ah), "ar5416SetRfRegs failed\n"); |
883 | "ar5416SetRfRegs failed\n"); | ||
884 | return -EIO; | 880 | return -EIO; |
885 | } | 881 | } |
886 | 882 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 48261b7252d0..7d5cb204f938 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -494,9 +494,9 @@ int ar9002_hw_rf_claim(struct ath_hw *ah) | |||
494 | case AR_RAD2122_SREV_MAJOR: | 494 | case AR_RAD2122_SREV_MAJOR: |
495 | break; | 495 | break; |
496 | default: | 496 | default: |
497 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 497 | ath_err(ath9k_hw_common(ah), |
498 | "Radio Chip Rev 0x%02X not supported\n", | 498 | "Radio Chip Rev 0x%02X not supported\n", |
499 | val & AR_RADIO_SREV_MAJOR); | 499 | val & AR_RADIO_SREV_MAJOR); |
500 | return -EOPNOTSUPP; | 500 | return -EOPNOTSUPP; |
501 | } | 501 | } |
502 | 502 | ||
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 47bedd82e9a9..70019e93e739 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -46,8 +46,8 @@ int ath_beaconq_config(struct ath_softc *sc) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { | 48 | if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { |
49 | ath_print(common, ATH_DBG_FATAL, | 49 | ath_err(common, |
50 | "Unable to update h/w beacon queue parameters\n"); | 50 | "Unable to update h/w beacon queue parameters\n"); |
51 | return 0; | 51 | return 0; |
52 | } else { | 52 | } else { |
53 | ath9k_hw_resettxqueue(ah, sc->beacon.beaconq); | 53 | ath9k_hw_resettxqueue(ah, sc->beacon.beaconq); |
@@ -189,8 +189,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, | |||
189 | dev_kfree_skb_any(skb); | 189 | dev_kfree_skb_any(skb); |
190 | bf->bf_mpdu = NULL; | 190 | bf->bf_mpdu = NULL; |
191 | bf->bf_buf_addr = 0; | 191 | bf->bf_buf_addr = 0; |
192 | ath_print(common, ATH_DBG_FATAL, | 192 | ath_err(common, "dma_mapping_error on beaconing\n"); |
193 | "dma_mapping_error on beaconing\n"); | ||
194 | return NULL; | 193 | return NULL; |
195 | } | 194 | } |
196 | 195 | ||
@@ -324,8 +323,7 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) | |||
324 | dev_kfree_skb_any(skb); | 323 | dev_kfree_skb_any(skb); |
325 | bf->bf_mpdu = NULL; | 324 | bf->bf_mpdu = NULL; |
326 | bf->bf_buf_addr = 0; | 325 | bf->bf_buf_addr = 0; |
327 | ath_print(common, ATH_DBG_FATAL, | 326 | ath_err(common, "dma_mapping_error on beacon alloc\n"); |
328 | "dma_mapping_error on beacon alloc\n"); | ||
329 | return -ENOMEM; | 327 | return -ENOMEM; |
330 | } | 328 | } |
331 | 329 | ||
@@ -469,8 +467,8 @@ void ath_beacon_tasklet(unsigned long data) | |||
469 | * are still pending on the queue. | 467 | * are still pending on the queue. |
470 | */ | 468 | */ |
471 | if (!ath9k_hw_stoptxdma(ah, sc->beacon.beaconq)) { | 469 | if (!ath9k_hw_stoptxdma(ah, sc->beacon.beaconq)) { |
472 | ath_print(common, ATH_DBG_FATAL, | 470 | ath_err(common, "beacon queue %u did not stop?\n", |
473 | "beacon queue %u did not stop?\n", sc->beacon.beaconq); | 471 | sc->beacon.beaconq); |
474 | } | 472 | } |
475 | 473 | ||
476 | /* NB: cabq traffic should already be queued and primed */ | 474 | /* NB: cabq traffic should already be queued and primed */ |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index c2481b3ac7e6..f74692da24db 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c | |||
@@ -69,8 +69,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
69 | if (!ath9k_hw_use_flash(ah)) { | 69 | if (!ath9k_hw_use_flash(ah)) { |
70 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, | 70 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, |
71 | &magic)) { | 71 | &magic)) { |
72 | ath_print(common, ATH_DBG_FATAL, | 72 | ath_err(common, "Reading Magic # failed\n"); |
73 | "Reading Magic # failed\n"); | ||
74 | return false; | 73 | return false; |
75 | } | 74 | } |
76 | 75 | ||
@@ -90,9 +89,8 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
90 | eepdata++; | 89 | eepdata++; |
91 | } | 90 | } |
92 | } else { | 91 | } else { |
93 | ath_print(common, ATH_DBG_FATAL, | 92 | ath_err(common, |
94 | "Invalid EEPROM Magic. " | 93 | "Invalid EEPROM Magic. endianness mismatch.\n"); |
95 | "endianness mismatch.\n"); | ||
96 | return -EINVAL; | 94 | return -EINVAL; |
97 | } | 95 | } |
98 | } | 96 | } |
@@ -163,9 +161,8 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
163 | 161 | ||
164 | if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR5416_EEP_VER || | 162 | if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR5416_EEP_VER || |
165 | ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) { | 163 | ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) { |
166 | ath_print(common, ATH_DBG_FATAL, | 164 | ath_err(common, "Bad EEPROM checksum 0x%x or revision 0x%04x\n", |
167 | "Bad EEPROM checksum 0x%x or revision 0x%04x\n", | 165 | sum, ah->eep_ops->get_eeprom_ver(ah)); |
168 | sum, ah->eep_ops->get_eeprom_ver(ah)); | ||
169 | return -EINVAL; | 166 | return -EINVAL; |
170 | } | 167 | } |
171 | 168 | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index bcb9ed39c047..9308b684eaa2 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -72,8 +72,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) | |||
72 | if (!ath9k_hw_use_flash(ah)) { | 72 | if (!ath9k_hw_use_flash(ah)) { |
73 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, | 73 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, |
74 | &magic)) { | 74 | &magic)) { |
75 | ath_print(common, ATH_DBG_FATAL, | 75 | ath_err(common, "Reading Magic # failed\n"); |
76 | "Reading Magic # failed\n"); | ||
77 | return false; | 76 | return false; |
78 | } | 77 | } |
79 | 78 | ||
@@ -93,9 +92,8 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) | |||
93 | eepdata++; | 92 | eepdata++; |
94 | } | 93 | } |
95 | } else { | 94 | } else { |
96 | ath_print(common, ATH_DBG_FATAL, | 95 | ath_err(common, |
97 | "Invalid EEPROM Magic. " | 96 | "Invalid EEPROM Magic. Endianness mismatch.\n"); |
98 | "Endianness mismatch.\n"); | ||
99 | return -EINVAL; | 97 | return -EINVAL; |
100 | } | 98 | } |
101 | } | 99 | } |
@@ -160,9 +158,8 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) | |||
160 | 158 | ||
161 | if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR9287_EEP_VER | 159 | if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR9287_EEP_VER |
162 | || ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) { | 160 | || ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) { |
163 | ath_print(common, ATH_DBG_FATAL, | 161 | ath_err(common, "Bad EEPROM checksum 0x%x or revision 0x%04x\n", |
164 | "Bad EEPROM checksum 0x%x or revision 0x%04x\n", | 162 | sum, ah->eep_ops->get_eeprom_ver(ah)); |
165 | sum, ah->eep_ops->get_eeprom_ver(ah)); | ||
166 | return -EINVAL; | 163 | return -EINVAL; |
167 | } | 164 | } |
168 | 165 | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 45f70b2404a1..864a877bc05a 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -96,8 +96,8 @@ static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah) | |||
96 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { | 96 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { |
97 | if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc, | 97 | if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc, |
98 | eep_data)) { | 98 | eep_data)) { |
99 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 99 | ath_err(ath9k_hw_common(ah), |
100 | "Unable to read eeprom region\n"); | 100 | "Unable to read eeprom region\n"); |
101 | return false; | 101 | return false; |
102 | } | 102 | } |
103 | eep_data++; | 103 | eep_data++; |
@@ -117,7 +117,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) | |||
117 | int i, addr, size; | 117 | int i, addr, size; |
118 | 118 | ||
119 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { | 119 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { |
120 | ath_print(common, ATH_DBG_FATAL, "Reading Magic # failed\n"); | 120 | ath_err(common, "Reading Magic # failed\n"); |
121 | return false; | 121 | return false; |
122 | } | 122 | } |
123 | 123 | ||
@@ -139,9 +139,8 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) | |||
139 | eepdata++; | 139 | eepdata++; |
140 | } | 140 | } |
141 | } else { | 141 | } else { |
142 | ath_print(common, ATH_DBG_FATAL, | 142 | ath_err(common, |
143 | "Invalid EEPROM Magic. " | 143 | "Invalid EEPROM Magic. Endianness mismatch.\n"); |
144 | "Endianness mismatch.\n"); | ||
145 | return -EINVAL; | 144 | return -EINVAL; |
146 | } | 145 | } |
147 | } | 146 | } |
@@ -216,8 +215,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) | |||
216 | 215 | ||
217 | if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR5416_EEP_VER || | 216 | if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR5416_EEP_VER || |
218 | ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) { | 217 | ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) { |
219 | ath_print(common, ATH_DBG_FATAL, | 218 | ath_err(common, "Bad EEPROM checksum 0x%x or revision 0x%04x\n", |
220 | "Bad EEPROM checksum 0x%x or revision 0x%04x\n", | ||
221 | sum, ah->eep_ops->get_eeprom_ver(ah)); | 219 | sum, ah->eep_ops->get_eeprom_ver(ah)); |
222 | return -EINVAL; | 220 | return -EINVAL; |
223 | } | 221 | } |
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 6a1a482f9dc3..2b1b58306662 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -103,8 +103,8 @@ static int ath_register_led(struct ath_softc *sc, struct ath_led *led, | |||
103 | 103 | ||
104 | ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->led_cdev); | 104 | ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->led_cdev); |
105 | if (ret) | 105 | if (ret) |
106 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 106 | ath_err(ath9k_hw_common(sc->sc_ah), |
107 | "Failed to register led:%s", led->name); | 107 | "Failed to register led:%s", led->name); |
108 | else | 108 | else |
109 | led->registered = 1; | 109 | led->registered = 1; |
110 | return ret; | 110 | return ret; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c index 1b72aa482ac7..dd9514e019ea 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | |||
@@ -246,8 +246,8 @@ void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv) | |||
246 | qi.tqi_cwmax = qi_be.tqi_cwmax; | 246 | qi.tqi_cwmax = qi_be.tqi_cwmax; |
247 | 247 | ||
248 | if (!ath9k_hw_set_txq_props(ah, priv->beaconq, &qi)) { | 248 | if (!ath9k_hw_set_txq_props(ah, priv->beaconq, &qi)) { |
249 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 249 | ath_err(ath9k_hw_common(ah), |
250 | "Unable to update beacon queue %u!\n", qnum); | 250 | "Unable to update beacon queue %u!\n", qnum); |
251 | } else { | 251 | } else { |
252 | ath9k_hw_resettxqueue(ah, priv->beaconq); | 252 | ath9k_hw_resettxqueue(ah, priv->beaconq); |
253 | } | 253 | } |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 071d0c974747..20b32f614c1f 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -495,37 +495,31 @@ static int ath9k_init_queues(struct ath9k_htc_priv *priv) | |||
495 | 495 | ||
496 | priv->beaconq = ath9k_hw_beaconq_setup(priv->ah); | 496 | priv->beaconq = ath9k_hw_beaconq_setup(priv->ah); |
497 | if (priv->beaconq == -1) { | 497 | if (priv->beaconq == -1) { |
498 | ath_print(common, ATH_DBG_FATAL, | 498 | ath_err(common, "Unable to setup BEACON xmit queue\n"); |
499 | "Unable to setup BEACON xmit queue\n"); | ||
500 | goto err; | 499 | goto err; |
501 | } | 500 | } |
502 | 501 | ||
503 | priv->cabq = ath9k_htc_cabq_setup(priv); | 502 | priv->cabq = ath9k_htc_cabq_setup(priv); |
504 | if (priv->cabq == -1) { | 503 | if (priv->cabq == -1) { |
505 | ath_print(common, ATH_DBG_FATAL, | 504 | ath_err(common, "Unable to setup CAB xmit queue\n"); |
506 | "Unable to setup CAB xmit queue\n"); | ||
507 | goto err; | 505 | goto err; |
508 | } | 506 | } |
509 | 507 | ||
510 | if (!ath9k_htc_txq_setup(priv, WME_AC_BE)) { | 508 | if (!ath9k_htc_txq_setup(priv, WME_AC_BE)) { |
511 | ath_print(common, ATH_DBG_FATAL, | 509 | ath_err(common, "Unable to setup xmit queue for BE traffic\n"); |
512 | "Unable to setup xmit queue for BE traffic\n"); | ||
513 | goto err; | 510 | goto err; |
514 | } | 511 | } |
515 | 512 | ||
516 | if (!ath9k_htc_txq_setup(priv, WME_AC_BK)) { | 513 | if (!ath9k_htc_txq_setup(priv, WME_AC_BK)) { |
517 | ath_print(common, ATH_DBG_FATAL, | 514 | ath_err(common, "Unable to setup xmit queue for BK traffic\n"); |
518 | "Unable to setup xmit queue for BK traffic\n"); | ||
519 | goto err; | 515 | goto err; |
520 | } | 516 | } |
521 | if (!ath9k_htc_txq_setup(priv, WME_AC_VI)) { | 517 | if (!ath9k_htc_txq_setup(priv, WME_AC_VI)) { |
522 | ath_print(common, ATH_DBG_FATAL, | 518 | ath_err(common, "Unable to setup xmit queue for VI traffic\n"); |
523 | "Unable to setup xmit queue for VI traffic\n"); | ||
524 | goto err; | 519 | goto err; |
525 | } | 520 | } |
526 | if (!ath9k_htc_txq_setup(priv, WME_AC_VO)) { | 521 | if (!ath9k_htc_txq_setup(priv, WME_AC_VO)) { |
527 | ath_print(common, ATH_DBG_FATAL, | 522 | ath_err(common, "Unable to setup xmit queue for VO traffic\n"); |
528 | "Unable to setup xmit queue for VO traffic\n"); | ||
529 | goto err; | 523 | goto err; |
530 | } | 524 | } |
531 | 525 | ||
@@ -670,16 +664,15 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, | |||
670 | 664 | ||
671 | ret = ath9k_hw_init(ah); | 665 | ret = ath9k_hw_init(ah); |
672 | if (ret) { | 666 | if (ret) { |
673 | ath_print(common, ATH_DBG_FATAL, | 667 | ath_err(common, |
674 | "Unable to initialize hardware; " | 668 | "Unable to initialize hardware; initialization status: %d\n", |
675 | "initialization status: %d\n", ret); | 669 | ret); |
676 | goto err_hw; | 670 | goto err_hw; |
677 | } | 671 | } |
678 | 672 | ||
679 | ret = ath9k_htc_init_debug(ah); | 673 | ret = ath9k_htc_init_debug(ah); |
680 | if (ret) { | 674 | if (ret) { |
681 | ath_print(common, ATH_DBG_FATAL, | 675 | ath_err(common, "Unable to create debugfs files\n"); |
682 | "Unable to create debugfs files\n"); | ||
683 | goto err_debug; | 676 | goto err_debug; |
684 | } | 677 | } |
685 | 678 | ||
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 8266ce1f02e3..a8007af4e149 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -152,9 +152,9 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
152 | caldata = &priv->caldata[channel->hw_value]; | 152 | caldata = &priv->caldata[channel->hw_value]; |
153 | ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); | 153 | ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); |
154 | if (ret) { | 154 | if (ret) { |
155 | ath_print(common, ATH_DBG_FATAL, | 155 | ath_err(common, |
156 | "Unable to reset channel (%u Mhz) " | 156 | "Unable to reset channel (%u Mhz) reset status %d\n", |
157 | "reset status %d\n", channel->center_freq, ret); | 157 | channel->center_freq, ret); |
158 | goto err; | 158 | goto err; |
159 | } | 159 | } |
160 | 160 | ||
@@ -263,8 +263,9 @@ static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, | |||
263 | WMI_CMD_BUF(WMI_NODE_CREATE_CMDID, &tsta); | 263 | WMI_CMD_BUF(WMI_NODE_CREATE_CMDID, &tsta); |
264 | if (ret) { | 264 | if (ret) { |
265 | if (sta) | 265 | if (sta) |
266 | ath_print(common, ATH_DBG_FATAL, | 266 | ath_err(common, |
267 | "Unable to add station entry for: %pM\n", sta->addr); | 267 | "Unable to add station entry for: %pM\n", |
268 | sta->addr); | ||
268 | return ret; | 269 | return ret; |
269 | } | 270 | } |
270 | 271 | ||
@@ -296,9 +297,9 @@ static int ath9k_htc_remove_station(struct ath9k_htc_priv *priv, | |||
296 | WMI_CMD_BUF(WMI_NODE_REMOVE_CMDID, &sta_idx); | 297 | WMI_CMD_BUF(WMI_NODE_REMOVE_CMDID, &sta_idx); |
297 | if (ret) { | 298 | if (ret) { |
298 | if (sta) | 299 | if (sta) |
299 | ath_print(common, ATH_DBG_FATAL, | 300 | ath_err(common, |
300 | "Unable to remove station entry for: %pM\n", | 301 | "Unable to remove station entry for: %pM\n", |
301 | sta->addr); | 302 | sta->addr); |
302 | return ret; | 303 | return ret; |
303 | } | 304 | } |
304 | 305 | ||
@@ -390,8 +391,8 @@ static int ath9k_htc_send_rate_cmd(struct ath9k_htc_priv *priv, | |||
390 | 391 | ||
391 | WMI_CMD_BUF(WMI_RC_RATE_UPDATE_CMDID, trate); | 392 | WMI_CMD_BUF(WMI_RC_RATE_UPDATE_CMDID, trate); |
392 | if (ret) { | 393 | if (ret) { |
393 | ath_print(common, ATH_DBG_FATAL, | 394 | ath_err(common, |
394 | "Unable to initialize Rate information on target\n"); | 395 | "Unable to initialize Rate information on target\n"); |
395 | } | 396 | } |
396 | 397 | ||
397 | return ret; | 398 | return ret; |
@@ -895,8 +896,8 @@ static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led, | |||
895 | 896 | ||
896 | ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_cdev); | 897 | ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_cdev); |
897 | if (ret) | 898 | if (ret) |
898 | ath_print(ath9k_hw_common(priv->ah), ATH_DBG_FATAL, | 899 | ath_err(ath9k_hw_common(priv->ah), |
899 | "Failed to register led:%s", led->name); | 900 | "Failed to register led:%s", led->name); |
900 | else | 901 | else |
901 | led->registered = 1; | 902 | led->registered = 1; |
902 | 903 | ||
@@ -1024,9 +1025,9 @@ static void ath9k_htc_radio_enable(struct ieee80211_hw *hw) | |||
1024 | /* Reset the HW */ | 1025 | /* Reset the HW */ |
1025 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | 1026 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); |
1026 | if (ret) { | 1027 | if (ret) { |
1027 | ath_print(common, ATH_DBG_FATAL, | 1028 | ath_err(common, |
1028 | "Unable to reset hardware; reset status %d " | 1029 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", |
1029 | "(freq %u MHz)\n", ret, ah->curchan->channel); | 1030 | ret, ah->curchan->channel); |
1030 | } | 1031 | } |
1031 | 1032 | ||
1032 | ath_update_txpow(priv); | 1033 | ath_update_txpow(priv); |
@@ -1087,9 +1088,9 @@ static void ath9k_htc_radio_disable(struct ieee80211_hw *hw) | |||
1087 | /* Reset the HW */ | 1088 | /* Reset the HW */ |
1088 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | 1089 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); |
1089 | if (ret) { | 1090 | if (ret) { |
1090 | ath_print(common, ATH_DBG_FATAL, | 1091 | ath_err(common, |
1091 | "Unable to reset hardware; reset status %d " | 1092 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", |
1092 | "(freq %u MHz)\n", ret, ah->curchan->channel); | 1093 | ret, ah->curchan->channel); |
1093 | } | 1094 | } |
1094 | 1095 | ||
1095 | /* Disable the PHY */ | 1096 | /* Disable the PHY */ |
@@ -1175,9 +1176,9 @@ static int ath9k_htc_start(struct ieee80211_hw *hw) | |||
1175 | ath9k_hw_htc_resetinit(ah); | 1176 | ath9k_hw_htc_resetinit(ah); |
1176 | ret = ath9k_hw_reset(ah, init_channel, ah->caldata, false); | 1177 | ret = ath9k_hw_reset(ah, init_channel, ah->caldata, false); |
1177 | if (ret) { | 1178 | if (ret) { |
1178 | ath_print(common, ATH_DBG_FATAL, | 1179 | ath_err(common, |
1179 | "Unable to reset hardware; reset status %d " | 1180 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", |
1180 | "(freq %u MHz)\n", ret, curchan->center_freq); | 1181 | ret, curchan->center_freq); |
1181 | mutex_unlock(&priv->mutex); | 1182 | mutex_unlock(&priv->mutex); |
1182 | return ret; | 1183 | return ret; |
1183 | } | 1184 | } |
@@ -1243,8 +1244,7 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw) | |||
1243 | /* Remove monitor interface here */ | 1244 | /* Remove monitor interface here */ |
1244 | if (ah->opmode == NL80211_IFTYPE_MONITOR) { | 1245 | if (ah->opmode == NL80211_IFTYPE_MONITOR) { |
1245 | if (ath9k_htc_remove_monitor_interface(priv)) | 1246 | if (ath9k_htc_remove_monitor_interface(priv)) |
1246 | ath_print(common, ATH_DBG_FATAL, | 1247 | ath_err(common, "Unable to remove monitor interface\n"); |
1247 | "Unable to remove monitor interface\n"); | ||
1248 | else | 1248 | else |
1249 | ath_print(common, ATH_DBG_CONFIG, | 1249 | ath_print(common, ATH_DBG_CONFIG, |
1250 | "Monitor interface removed\n"); | 1250 | "Monitor interface removed\n"); |
@@ -1298,7 +1298,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, | |||
1298 | hvif.opmode = cpu_to_be32(HTC_M_IBSS); | 1298 | hvif.opmode = cpu_to_be32(HTC_M_IBSS); |
1299 | break; | 1299 | break; |
1300 | default: | 1300 | default: |
1301 | ath_print(common, ATH_DBG_FATAL, | 1301 | ath_err(common, |
1302 | "Interface type %d not yet supported\n", vif->type); | 1302 | "Interface type %d not yet supported\n", vif->type); |
1303 | ret = -EOPNOTSUPP; | 1303 | ret = -EOPNOTSUPP; |
1304 | goto out; | 1304 | goto out; |
@@ -1405,8 +1405,7 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed) | |||
1405 | hw->conf.channel_type); | 1405 | hw->conf.channel_type); |
1406 | 1406 | ||
1407 | if (ath9k_htc_set_channel(priv, hw, &priv->ah->channels[pos]) < 0) { | 1407 | if (ath9k_htc_set_channel(priv, hw, &priv->ah->channels[pos]) < 0) { |
1408 | ath_print(common, ATH_DBG_FATAL, | 1408 | ath_err(common, "Unable to set channel\n"); |
1409 | "Unable to set channel\n"); | ||
1410 | mutex_unlock(&priv->mutex); | 1409 | mutex_unlock(&priv->mutex); |
1411 | return -EINVAL; | 1410 | return -EINVAL; |
1412 | } | 1411 | } |
@@ -1426,8 +1425,7 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed) | |||
1426 | if (changed & IEEE80211_CONF_CHANGE_MONITOR) { | 1425 | if (changed & IEEE80211_CONF_CHANGE_MONITOR) { |
1427 | if (conf->flags & IEEE80211_CONF_MONITOR) { | 1426 | if (conf->flags & IEEE80211_CONF_MONITOR) { |
1428 | if (ath9k_htc_add_monitor_interface(priv)) | 1427 | if (ath9k_htc_add_monitor_interface(priv)) |
1429 | ath_print(common, ATH_DBG_FATAL, | 1428 | ath_err(common, "Failed to set monitor mode\n"); |
1430 | "Failed to set monitor mode\n"); | ||
1431 | else | 1429 | else |
1432 | ath_print(common, ATH_DBG_CONFIG, | 1430 | ath_print(common, ATH_DBG_CONFIG, |
1433 | "HW opmode set to Monitor mode\n"); | 1431 | "HW opmode set to Monitor mode\n"); |
@@ -1552,7 +1550,7 @@ static int ath9k_htc_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1552 | 1550 | ||
1553 | ret = ath_htc_txq_update(priv, qnum, &qi); | 1551 | ret = ath_htc_txq_update(priv, qnum, &qi); |
1554 | if (ret) { | 1552 | if (ret) { |
1555 | ath_print(common, ATH_DBG_FATAL, "TXQ Update failed\n"); | 1553 | ath_err(common, "TXQ Update failed\n"); |
1556 | goto out; | 1554 | goto out; |
1557 | } | 1555 | } |
1558 | 1556 | ||
@@ -1764,8 +1762,7 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw, | |||
1764 | spin_unlock_bh(&priv->tx_lock); | 1762 | spin_unlock_bh(&priv->tx_lock); |
1765 | break; | 1763 | break; |
1766 | default: | 1764 | default: |
1767 | ath_print(ath9k_hw_common(priv->ah), ATH_DBG_FATAL, | 1765 | ath_err(ath9k_hw_common(priv->ah), "Unknown AMPDU action\n"); |
1768 | "Unknown AMPDU action\n"); | ||
1769 | } | 1766 | } |
1770 | 1767 | ||
1771 | return ret; | 1768 | return ret; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 77958675b55f..5bef41f8c82b 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -69,8 +69,8 @@ int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum, | |||
69 | qi.tqi_readyTime = qinfo->tqi_readyTime; | 69 | qi.tqi_readyTime = qinfo->tqi_readyTime; |
70 | 70 | ||
71 | if (!ath9k_hw_set_txq_props(ah, qnum, &qi)) { | 71 | if (!ath9k_hw_set_txq_props(ah, qnum, &qi)) { |
72 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 72 | ath_err(ath9k_hw_common(ah), |
73 | "Unable to update hardware queue %u!\n", qnum); | 73 | "Unable to update hardware queue %u!\n", qnum); |
74 | error = -EIO; | 74 | error = -EIO; |
75 | } else { | 75 | } else { |
76 | ath9k_hw_resettxqueue(ah, qnum); | 76 | ath9k_hw_resettxqueue(ah, qnum); |
@@ -296,8 +296,7 @@ void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb, | |||
296 | (ep_id == priv->data_vo_ep)) { | 296 | (ep_id == priv->data_vo_ep)) { |
297 | skb_pull(skb, sizeof(struct tx_frame_hdr)); | 297 | skb_pull(skb, sizeof(struct tx_frame_hdr)); |
298 | } else { | 298 | } else { |
299 | ath_print(common, ATH_DBG_FATAL, | 299 | ath_err(common, "Unsupported TX EPID: %d\n", ep_id); |
300 | "Unsupported TX EPID: %d\n", ep_id); | ||
301 | dev_kfree_skb_any(skb); | 300 | dev_kfree_skb_any(skb); |
302 | return; | 301 | return; |
303 | } | 302 | } |
@@ -337,9 +336,8 @@ bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype) | |||
337 | return false; | 336 | return false; |
338 | 337 | ||
339 | if (qnum >= ARRAY_SIZE(priv->hwq_map)) { | 338 | if (qnum >= ARRAY_SIZE(priv->hwq_map)) { |
340 | ath_print(common, ATH_DBG_FATAL, | 339 | ath_err(common, "qnum %u out of range, max %zu!\n", |
341 | "qnum %u out of range, max %u!\n", | 340 | qnum, ARRAY_SIZE(priv->hwq_map)); |
342 | qnum, (unsigned int)ARRAY_SIZE(priv->hwq_map)); | ||
343 | ath9k_hw_releasetxqueue(ah, qnum); | 341 | ath9k_hw_releasetxqueue(ah, qnum); |
344 | return false; | 342 | return false; |
345 | } | 343 | } |
@@ -490,8 +488,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, | |||
490 | __le16 fc; | 488 | __le16 fc; |
491 | 489 | ||
492 | if (skb->len <= HTC_RX_FRAME_HEADER_SIZE) { | 490 | if (skb->len <= HTC_RX_FRAME_HEADER_SIZE) { |
493 | ath_print(common, ATH_DBG_FATAL, | 491 | ath_err(common, "Corrupted RX frame, dropping\n"); |
494 | "Corrupted RX frame, dropping\n"); | ||
495 | goto rx_next; | 492 | goto rx_next; |
496 | } | 493 | } |
497 | 494 | ||
@@ -499,10 +496,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, | |||
499 | 496 | ||
500 | if (be16_to_cpu(rxstatus->rs_datalen) - | 497 | if (be16_to_cpu(rxstatus->rs_datalen) - |
501 | (skb->len - HTC_RX_FRAME_HEADER_SIZE) != 0) { | 498 | (skb->len - HTC_RX_FRAME_HEADER_SIZE) != 0) { |
502 | ath_print(common, ATH_DBG_FATAL, | 499 | ath_err(common, |
503 | "Corrupted RX data len, dropping " | 500 | "Corrupted RX data len, dropping (dlen: %d, skblen: %d)\n", |
504 | "(dlen: %d, skblen: %d)\n", | 501 | rxstatus->rs_datalen, skb->len); |
505 | rxstatus->rs_datalen, skb->len); | ||
506 | goto rx_next; | 502 | goto rx_next; |
507 | } | 503 | } |
508 | 504 | ||
@@ -728,8 +724,7 @@ int ath9k_rx_init(struct ath9k_htc_priv *priv) | |||
728 | for (i = 0; i < ATH9K_HTC_RXBUF; i++) { | 724 | for (i = 0; i < ATH9K_HTC_RXBUF; i++) { |
729 | rxbuf = kzalloc(sizeof(struct ath9k_htc_rxbuf), GFP_KERNEL); | 725 | rxbuf = kzalloc(sizeof(struct ath9k_htc_rxbuf), GFP_KERNEL); |
730 | if (rxbuf == NULL) { | 726 | if (rxbuf == NULL) { |
731 | ath_print(common, ATH_DBG_FATAL, | 727 | ath_err(common, "Unable to allocate RX buffers\n"); |
732 | "Unable to allocate RX buffers\n"); | ||
733 | goto err; | 728 | goto err; |
734 | } | 729 | } |
735 | list_add_tail(&rxbuf->list, &priv->rx.rxbuf); | 730 | list_add_tail(&rxbuf->list, &priv->rx.rxbuf); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 9b1ee7fc05c1..00ecbfa07df5 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -211,8 +211,8 @@ u16 ath9k_hw_computetxtime(struct ath_hw *ah, | |||
211 | } | 211 | } |
212 | break; | 212 | break; |
213 | default: | 213 | default: |
214 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 214 | ath_err(ath9k_hw_common(ah), |
215 | "Unknown phy %u (rate ix %u)\n", phy, rateix); | 215 | "Unknown phy %u (rate ix %u)\n", phy, rateix); |
216 | txTime = 0; | 216 | txTime = 0; |
217 | break; | 217 | break; |
218 | } | 218 | } |
@@ -331,11 +331,9 @@ static bool ath9k_hw_chip_test(struct ath_hw *ah) | |||
331 | REG_WRITE(ah, addr, wrData); | 331 | REG_WRITE(ah, addr, wrData); |
332 | rdData = REG_READ(ah, addr); | 332 | rdData = REG_READ(ah, addr); |
333 | if (rdData != wrData) { | 333 | if (rdData != wrData) { |
334 | ath_print(common, ATH_DBG_FATAL, | 334 | ath_err(common, |
335 | "address test failed " | 335 | "address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", |
336 | "addr: 0x%08x - wr:0x%08x != " | 336 | addr, wrData, rdData); |
337 | "rd:0x%08x\n", | ||
338 | addr, wrData, rdData); | ||
339 | return false; | 337 | return false; |
340 | } | 338 | } |
341 | } | 339 | } |
@@ -344,11 +342,9 @@ static bool ath9k_hw_chip_test(struct ath_hw *ah) | |||
344 | REG_WRITE(ah, addr, wrData); | 342 | REG_WRITE(ah, addr, wrData); |
345 | rdData = REG_READ(ah, addr); | 343 | rdData = REG_READ(ah, addr); |
346 | if (wrData != rdData) { | 344 | if (wrData != rdData) { |
347 | ath_print(common, ATH_DBG_FATAL, | 345 | ath_err(common, |
348 | "address test failed " | 346 | "address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", |
349 | "addr: 0x%08x - wr:0x%08x != " | 347 | addr, wrData, rdData); |
350 | "rd:0x%08x\n", | ||
351 | addr, wrData, rdData); | ||
352 | return false; | 348 | return false; |
353 | } | 349 | } |
354 | } | 350 | } |
@@ -476,9 +472,8 @@ static int ath9k_hw_post_init(struct ath_hw *ah) | |||
476 | 472 | ||
477 | ecode = ath9k_hw_rf_alloc_ext_banks(ah); | 473 | ecode = ath9k_hw_rf_alloc_ext_banks(ah); |
478 | if (ecode) { | 474 | if (ecode) { |
479 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 475 | ath_err(ath9k_hw_common(ah), |
480 | "Failed allocating banks for " | 476 | "Failed allocating banks for external radio\n"); |
481 | "external radio\n"); | ||
482 | ath9k_hw_rf_free_ext_banks(ah); | 477 | ath9k_hw_rf_free_ext_banks(ah); |
483 | return ecode; | 478 | return ecode; |
484 | } | 479 | } |
@@ -509,8 +504,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
509 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; | 504 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; |
510 | 505 | ||
511 | if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { | 506 | if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { |
512 | ath_print(common, ATH_DBG_FATAL, | 507 | ath_err(common, "Couldn't reset chip\n"); |
513 | "Couldn't reset chip\n"); | ||
514 | return -EIO; | 508 | return -EIO; |
515 | } | 509 | } |
516 | 510 | ||
@@ -520,7 +514,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
520 | ath9k_hw_attach_ops(ah); | 514 | ath9k_hw_attach_ops(ah); |
521 | 515 | ||
522 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { | 516 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { |
523 | ath_print(common, ATH_DBG_FATAL, "Couldn't wakeup chip\n"); | 517 | ath_err(common, "Couldn't wakeup chip\n"); |
524 | return -EIO; | 518 | return -EIO; |
525 | } | 519 | } |
526 | 520 | ||
@@ -545,10 +539,9 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
545 | ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD; | 539 | ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD; |
546 | 540 | ||
547 | if (!ath9k_hw_macversion_supported(ah)) { | 541 | if (!ath9k_hw_macversion_supported(ah)) { |
548 | ath_print(common, ATH_DBG_FATAL, | 542 | ath_err(common, |
549 | "Mac Chip Rev 0x%02x.%x is not supported by " | 543 | "Mac Chip Rev 0x%02x.%x is not supported by this driver\n", |
550 | "this driver\n", ah->hw_version.macVersion, | 544 | ah->hw_version.macVersion, ah->hw_version.macRev); |
551 | ah->hw_version.macRev); | ||
552 | return -EOPNOTSUPP; | 545 | return -EOPNOTSUPP; |
553 | } | 546 | } |
554 | 547 | ||
@@ -594,8 +587,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
594 | 587 | ||
595 | r = ath9k_hw_init_macaddr(ah); | 588 | r = ath9k_hw_init_macaddr(ah); |
596 | if (r) { | 589 | if (r) { |
597 | ath_print(common, ATH_DBG_FATAL, | 590 | ath_err(common, "Failed to initialize MAC address\n"); |
598 | "Failed to initialize MAC address\n"); | ||
599 | return r; | 591 | return r; |
600 | } | 592 | } |
601 | 593 | ||
@@ -633,17 +625,16 @@ int ath9k_hw_init(struct ath_hw *ah) | |||
633 | default: | 625 | default: |
634 | if (common->bus_ops->ath_bus_type == ATH_USB) | 626 | if (common->bus_ops->ath_bus_type == ATH_USB) |
635 | break; | 627 | break; |
636 | ath_print(common, ATH_DBG_FATAL, | 628 | ath_err(common, "Hardware device ID 0x%04x not supported\n", |
637 | "Hardware device ID 0x%04x not supported\n", | 629 | ah->hw_version.devid); |
638 | ah->hw_version.devid); | ||
639 | return -EOPNOTSUPP; | 630 | return -EOPNOTSUPP; |
640 | } | 631 | } |
641 | 632 | ||
642 | ret = __ath9k_hw_init(ah); | 633 | ret = __ath9k_hw_init(ah); |
643 | if (ret) { | 634 | if (ret) { |
644 | ath_print(common, ATH_DBG_FATAL, | 635 | ath_err(common, |
645 | "Unable to initialize hardware; " | 636 | "Unable to initialize hardware; initialization status: %d\n", |
646 | "initialization status: %d\n", ret); | 637 | ret); |
647 | return ret; | 638 | return ret; |
648 | } | 639 | } |
649 | 640 | ||
@@ -1145,8 +1136,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1145 | } | 1136 | } |
1146 | 1137 | ||
1147 | if (!ath9k_hw_rfbus_req(ah)) { | 1138 | if (!ath9k_hw_rfbus_req(ah)) { |
1148 | ath_print(common, ATH_DBG_FATAL, | 1139 | ath_err(common, "Could not kill baseband RX\n"); |
1149 | "Could not kill baseband RX\n"); | ||
1150 | return false; | 1140 | return false; |
1151 | } | 1141 | } |
1152 | 1142 | ||
@@ -1154,8 +1144,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1154 | 1144 | ||
1155 | r = ath9k_hw_rf_set_freq(ah, chan); | 1145 | r = ath9k_hw_rf_set_freq(ah, chan); |
1156 | if (r) { | 1146 | if (r) { |
1157 | ath_print(common, ATH_DBG_FATAL, | 1147 | ath_err(common, "Failed to set channel\n"); |
1158 | "Failed to set channel\n"); | ||
1159 | return false; | 1148 | return false; |
1160 | } | 1149 | } |
1161 | ath9k_hw_set_clockrate(ah); | 1150 | ath9k_hw_set_clockrate(ah); |
@@ -1287,7 +1276,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1287 | } | 1276 | } |
1288 | 1277 | ||
1289 | if (!ath9k_hw_chip_reset(ah, chan)) { | 1278 | if (!ath9k_hw_chip_reset(ah, chan)) { |
1290 | ath_print(common, ATH_DBG_FATAL, "Chip reset failed\n"); | 1279 | ath_err(common, "Chip reset failed\n"); |
1291 | return -EINVAL; | 1280 | return -EINVAL; |
1292 | } | 1281 | } |
1293 | 1282 | ||
@@ -1568,9 +1557,9 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip) | |||
1568 | AR_RTC_FORCE_WAKE_EN); | 1557 | AR_RTC_FORCE_WAKE_EN); |
1569 | } | 1558 | } |
1570 | if (i == 0) { | 1559 | if (i == 0) { |
1571 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 1560 | ath_err(ath9k_hw_common(ah), |
1572 | "Failed to wakeup in %uus\n", | 1561 | "Failed to wakeup in %uus\n", |
1573 | POWER_UP_TIME / 20); | 1562 | POWER_UP_TIME / 20); |
1574 | return false; | 1563 | return false; |
1575 | } | 1564 | } |
1576 | } | 1565 | } |
@@ -1609,8 +1598,7 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) | |||
1609 | ath9k_set_power_network_sleep(ah, setChip); | 1598 | ath9k_set_power_network_sleep(ah, setChip); |
1610 | break; | 1599 | break; |
1611 | default: | 1600 | default: |
1612 | ath_print(common, ATH_DBG_FATAL, | 1601 | ath_err(common, "Unknown power mode %u\n", mode); |
1613 | "Unknown power mode %u\n", mode); | ||
1614 | return false; | 1602 | return false; |
1615 | } | 1603 | } |
1616 | ah->power_mode = mode; | 1604 | ah->power_mode = mode; |
@@ -1801,8 +1789,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
1801 | 1789 | ||
1802 | eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); | 1790 | eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); |
1803 | if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) { | 1791 | if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) { |
1804 | ath_print(common, ATH_DBG_FATAL, | 1792 | ath_err(common, |
1805 | "no band has been marked as supported in EEPROM.\n"); | 1793 | "no band has been marked as supported in EEPROM\n"); |
1806 | return -EINVAL; | 1794 | return -EINVAL; |
1807 | } | 1795 | } |
1808 | 1796 | ||
@@ -2348,9 +2336,9 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah, | |||
2348 | timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL); | 2336 | timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL); |
2349 | 2337 | ||
2350 | if (timer == NULL) { | 2338 | if (timer == NULL) { |
2351 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 2339 | ath_err(ath9k_hw_common(ah), |
2352 | "Failed to allocate memory" | 2340 | "Failed to allocate memory for hw timer[%d]\n", |
2353 | "for hw timer[%d]\n", timer_index); | 2341 | timer_index); |
2354 | return NULL; | 2342 | return NULL; |
2355 | } | 2343 | } |
2356 | 2344 | ||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 918308a28410..2b519b387a29 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -283,8 +283,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, | |||
283 | 283 | ||
284 | /* ath_desc must be a multiple of DWORDs */ | 284 | /* ath_desc must be a multiple of DWORDs */ |
285 | if ((desc_len % 4) != 0) { | 285 | if ((desc_len % 4) != 0) { |
286 | ath_print(common, ATH_DBG_FATAL, | 286 | ath_err(common, "ath_desc not DWORD aligned\n"); |
287 | "ath_desc not DWORD aligned\n"); | ||
288 | BUG_ON((desc_len % 4) != 0); | 287 | BUG_ON((desc_len % 4) != 0); |
289 | error = -ENOMEM; | 288 | error = -ENOMEM; |
290 | goto fail; | 289 | goto fail; |
@@ -736,8 +735,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | |||
736 | 735 | ||
737 | error = ath9k_init_debug(ah); | 736 | error = ath9k_init_debug(ah); |
738 | if (error) { | 737 | if (error) { |
739 | ath_print(common, ATH_DBG_FATAL, | 738 | ath_err(common, "Unable to create debugfs files\n"); |
740 | "Unable to create debugfs files\n"); | ||
741 | goto error_world; | 739 | goto error_world; |
742 | } | 740 | } |
743 | 741 | ||
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index b04b37b1124b..b96e750d4c37 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -204,9 +204,8 @@ bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q) | |||
204 | wait = wait_time; | 204 | wait = wait_time; |
205 | while (ath9k_hw_numtxpending(ah, q)) { | 205 | while (ath9k_hw_numtxpending(ah, q)) { |
206 | if ((--wait) == 0) { | 206 | if ((--wait) == 0) { |
207 | ath_print(common, ATH_DBG_FATAL, | 207 | ath_err(common, |
208 | "Failed to stop TX DMA in 100 " | 208 | "Failed to stop TX DMA in 100 msec after killing last frame\n"); |
209 | "msec after killing last frame\n"); | ||
210 | break; | 209 | break; |
211 | } | 210 | } |
212 | udelay(ATH9K_TIME_QUANTUM); | 211 | udelay(ATH9K_TIME_QUANTUM); |
@@ -368,14 +367,12 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
368 | ATH9K_TX_QUEUE_INACTIVE) | 367 | ATH9K_TX_QUEUE_INACTIVE) |
369 | break; | 368 | break; |
370 | if (q == pCap->total_queues) { | 369 | if (q == pCap->total_queues) { |
371 | ath_print(common, ATH_DBG_FATAL, | 370 | ath_err(common, "No available TX queue\n"); |
372 | "No available TX queue\n"); | ||
373 | return -1; | 371 | return -1; |
374 | } | 372 | } |
375 | break; | 373 | break; |
376 | default: | 374 | default: |
377 | ath_print(common, ATH_DBG_FATAL, | 375 | ath_err(common, "Invalid TX queue type: %u\n", type); |
378 | "Invalid TX queue type: %u\n", type); | ||
379 | return -1; | 376 | return -1; |
380 | } | 377 | } |
381 | 378 | ||
@@ -383,8 +380,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
383 | 380 | ||
384 | qi = &ah->txq[q]; | 381 | qi = &ah->txq[q]; |
385 | if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { | 382 | if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { |
386 | ath_print(common, ATH_DBG_FATAL, | 383 | ath_err(common, "TX queue: %u already active\n", q); |
387 | "TX queue: %u already active\n", q); | ||
388 | return -1; | 384 | return -1; |
389 | } | 385 | } |
390 | memset(qi, 0, sizeof(struct ath9k_tx_queue_info)); | 386 | memset(qi, 0, sizeof(struct ath9k_tx_queue_info)); |
@@ -735,9 +731,9 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set) | |||
735 | AR_DIAG_RX_ABORT)); | 731 | AR_DIAG_RX_ABORT)); |
736 | 732 | ||
737 | reg = REG_READ(ah, AR_OBS_BUS_1); | 733 | reg = REG_READ(ah, AR_OBS_BUS_1); |
738 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 734 | ath_err(ath9k_hw_common(ah), |
739 | "RX failed to go idle in 10 ms RXSM=0x%x\n", | 735 | "RX failed to go idle in 10 ms RXSM=0x%x\n", |
740 | reg); | 736 | reg); |
741 | 737 | ||
742 | return false; | 738 | return false; |
743 | } | 739 | } |
@@ -791,12 +787,11 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah) | |||
791 | } | 787 | } |
792 | 788 | ||
793 | if (i == 0) { | 789 | if (i == 0) { |
794 | ath_print(common, ATH_DBG_FATAL, | 790 | ath_err(common, |
795 | "DMA failed to stop in %d ms " | 791 | "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", |
796 | "AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", | 792 | AH_RX_STOP_DMA_TIMEOUT / 1000, |
797 | AH_RX_STOP_DMA_TIMEOUT / 1000, | 793 | REG_READ(ah, AR_CR), |
798 | REG_READ(ah, AR_CR), | 794 | REG_READ(ah, AR_DIAG_SW)); |
799 | REG_READ(ah, AR_DIAG_SW)); | ||
800 | return false; | 795 | return false; |
801 | } else { | 796 | } else { |
802 | return true; | 797 | return true; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index f026a031713b..c7a7abfb2221 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -268,16 +268,14 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, | |||
268 | 268 | ||
269 | r = ath9k_hw_reset(ah, hchan, caldata, fastcc); | 269 | r = ath9k_hw_reset(ah, hchan, caldata, fastcc); |
270 | if (r) { | 270 | if (r) { |
271 | ath_print(common, ATH_DBG_FATAL, | 271 | ath_err(common, |
272 | "Unable to reset channel (%u MHz), " | 272 | "Unable to reset channel (%u MHz), reset status %d\n", |
273 | "reset status %d\n", | 273 | channel->center_freq, r); |
274 | channel->center_freq, r); | ||
275 | goto ps_restore; | 274 | goto ps_restore; |
276 | } | 275 | } |
277 | 276 | ||
278 | if (ath_startrecv(sc) != 0) { | 277 | if (ath_startrecv(sc) != 0) { |
279 | ath_print(common, ATH_DBG_FATAL, | 278 | ath_err(common, "Unable to restart recv logic\n"); |
280 | "Unable to restart recv logic\n"); | ||
281 | r = -EIO; | 279 | r = -EIO; |
282 | goto ps_restore; | 280 | goto ps_restore; |
283 | } | 281 | } |
@@ -892,16 +890,14 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
892 | 890 | ||
893 | r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | 891 | r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); |
894 | if (r) { | 892 | if (r) { |
895 | ath_print(common, ATH_DBG_FATAL, | 893 | ath_err(common, |
896 | "Unable to reset channel (%u MHz), " | 894 | "Unable to reset channel (%u MHz), reset status %d\n", |
897 | "reset status %d\n", | 895 | channel->center_freq, r); |
898 | channel->center_freq, r); | ||
899 | } | 896 | } |
900 | 897 | ||
901 | ath_update_txpow(sc); | 898 | ath_update_txpow(sc); |
902 | if (ath_startrecv(sc) != 0) { | 899 | if (ath_startrecv(sc) != 0) { |
903 | ath_print(common, ATH_DBG_FATAL, | 900 | ath_err(common, "Unable to restart recv logic\n"); |
904 | "Unable to restart recv logic\n"); | ||
905 | spin_unlock_bh(&sc->sc_pcu_lock); | 901 | spin_unlock_bh(&sc->sc_pcu_lock); |
906 | return; | 902 | return; |
907 | } | 903 | } |
@@ -955,10 +951,9 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
955 | 951 | ||
956 | r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | 952 | r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); |
957 | if (r) { | 953 | if (r) { |
958 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 954 | ath_err(ath9k_hw_common(sc->sc_ah), |
959 | "Unable to reset channel (%u MHz), " | 955 | "Unable to reset channel (%u MHz), reset status %d\n", |
960 | "reset status %d\n", | 956 | channel->center_freq, r); |
961 | channel->center_freq, r); | ||
962 | } | 957 | } |
963 | 958 | ||
964 | ath9k_hw_phy_disable(ah); | 959 | ath9k_hw_phy_disable(ah); |
@@ -993,12 +988,11 @@ int ath_reset(struct ath_softc *sc, bool retry_tx) | |||
993 | 988 | ||
994 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false); | 989 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false); |
995 | if (r) | 990 | if (r) |
996 | ath_print(common, ATH_DBG_FATAL, | 991 | ath_err(common, |
997 | "Unable to reset hardware; reset status %d\n", r); | 992 | "Unable to reset hardware; reset status %d\n", r); |
998 | 993 | ||
999 | if (ath_startrecv(sc) != 0) | 994 | if (ath_startrecv(sc) != 0) |
1000 | ath_print(common, ATH_DBG_FATAL, | 995 | ath_err(common, "Unable to start recv logic\n"); |
1001 | "Unable to start recv logic\n"); | ||
1002 | 996 | ||
1003 | /* | 997 | /* |
1004 | * We may be doing a reset in response to a request | 998 | * We may be doing a reset in response to a request |
@@ -1116,10 +1110,9 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1116 | spin_lock_bh(&sc->sc_pcu_lock); | 1110 | spin_lock_bh(&sc->sc_pcu_lock); |
1117 | r = ath9k_hw_reset(ah, init_channel, ah->caldata, false); | 1111 | r = ath9k_hw_reset(ah, init_channel, ah->caldata, false); |
1118 | if (r) { | 1112 | if (r) { |
1119 | ath_print(common, ATH_DBG_FATAL, | 1113 | ath_err(common, |
1120 | "Unable to reset hardware; reset status %d " | 1114 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", |
1121 | "(freq %u MHz)\n", r, | 1115 | r, curchan->center_freq); |
1122 | curchan->center_freq); | ||
1123 | spin_unlock_bh(&sc->sc_pcu_lock); | 1116 | spin_unlock_bh(&sc->sc_pcu_lock); |
1124 | goto mutex_unlock; | 1117 | goto mutex_unlock; |
1125 | } | 1118 | } |
@@ -1138,8 +1131,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1138 | * here except setup the interrupt mask. | 1131 | * here except setup the interrupt mask. |
1139 | */ | 1132 | */ |
1140 | if (ath_startrecv(sc) != 0) { | 1133 | if (ath_startrecv(sc) != 0) { |
1141 | ath_print(common, ATH_DBG_FATAL, | 1134 | ath_err(common, "Unable to start recv logic\n"); |
1142 | "Unable to start recv logic\n"); | ||
1143 | r = -EIO; | 1135 | r = -EIO; |
1144 | spin_unlock_bh(&sc->sc_pcu_lock); | 1136 | spin_unlock_bh(&sc->sc_pcu_lock); |
1145 | goto mutex_unlock; | 1137 | goto mutex_unlock; |
@@ -1378,8 +1370,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1378 | ic_opmode = vif->type; | 1370 | ic_opmode = vif->type; |
1379 | break; | 1371 | break; |
1380 | default: | 1372 | default: |
1381 | ath_print(common, ATH_DBG_FATAL, | 1373 | ath_err(common, "Interface type %d not yet supported\n", |
1382 | "Interface type %d not yet supported\n", vif->type); | 1374 | vif->type); |
1383 | ret = -EOPNOTSUPP; | 1375 | ret = -EOPNOTSUPP; |
1384 | goto out; | 1376 | goto out; |
1385 | } | 1377 | } |
@@ -1650,8 +1642,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1650 | } | 1642 | } |
1651 | 1643 | ||
1652 | if (ath_set_channel(sc, hw, &sc->sc_ah->channels[pos]) < 0) { | 1644 | if (ath_set_channel(sc, hw, &sc->sc_ah->channels[pos]) < 0) { |
1653 | ath_print(common, ATH_DBG_FATAL, | 1645 | ath_err(common, "Unable to set channel\n"); |
1654 | "Unable to set channel\n"); | ||
1655 | mutex_unlock(&sc->mutex); | 1646 | mutex_unlock(&sc->mutex); |
1656 | return -EINVAL; | 1647 | return -EINVAL; |
1657 | } | 1648 | } |
@@ -1775,7 +1766,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1775 | 1766 | ||
1776 | ret = ath_txq_update(sc, txq->axq_qnum, &qi); | 1767 | ret = ath_txq_update(sc, txq->axq_qnum, &qi); |
1777 | if (ret) | 1768 | if (ret) |
1778 | ath_print(common, ATH_DBG_FATAL, "TXQ Update failed\n"); | 1769 | ath_err(common, "TXQ Update failed\n"); |
1779 | 1770 | ||
1780 | if (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) | 1771 | if (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) |
1781 | if (queue == WME_AC_BE && !ret) | 1772 | if (queue == WME_AC_BE && !ret) |
@@ -2024,8 +2015,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw, | |||
2024 | ath9k_ps_restore(sc); | 2015 | ath9k_ps_restore(sc); |
2025 | break; | 2016 | break; |
2026 | default: | 2017 | default: |
2027 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 2018 | ath_err(ath9k_hw_common(sc->sc_ah), "Unknown AMPDU action\n"); |
2028 | "Unknown AMPDU action\n"); | ||
2029 | } | 2019 | } |
2030 | 2020 | ||
2031 | local_bh_enable(); | 2021 | local_bh_enable(); |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 09f69a9617f4..71339dab0860 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -59,10 +59,9 @@ static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data) | |||
59 | 59 | ||
60 | if (pdata) { | 60 | if (pdata) { |
61 | if (off >= (ARRAY_SIZE(pdata->eeprom_data))) { | 61 | if (off >= (ARRAY_SIZE(pdata->eeprom_data))) { |
62 | ath_print(common, ATH_DBG_FATAL, | 62 | ath_err(common, |
63 | "%s: eeprom read failed, offset %08x " | 63 | "%s: eeprom read failed, offset %08x is out of range\n", |
64 | "is out of range\n", | 64 | __func__, off); |
65 | __func__, off); | ||
66 | } | 65 | } |
67 | 66 | ||
68 | *data = pdata->eeprom_data[off]; | 67 | *data = pdata->eeprom_data[off]; |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 3e6ea3bc3d89..d8dcaab18299 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1576,8 +1576,8 @@ static void *ath_rate_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp | |||
1576 | 1576 | ||
1577 | rate_priv = kzalloc(sizeof(struct ath_rate_priv), gfp); | 1577 | rate_priv = kzalloc(sizeof(struct ath_rate_priv), gfp); |
1578 | if (!rate_priv) { | 1578 | if (!rate_priv) { |
1579 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 1579 | ath_err(ath9k_hw_common(sc->sc_ah), |
1580 | "Unable to allocate private rc structure\n"); | 1580 | "Unable to allocate private rc structure\n"); |
1581 | return NULL; | 1581 | return NULL; |
1582 | } | 1582 | } |
1583 | 1583 | ||
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 262c81595f6d..c477be06894e 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -269,7 +269,7 @@ static int ath_rx_edma_init(struct ath_softc *sc, int nbufs) | |||
269 | dev_kfree_skb_any(skb); | 269 | dev_kfree_skb_any(skb); |
270 | bf->bf_mpdu = NULL; | 270 | bf->bf_mpdu = NULL; |
271 | bf->bf_buf_addr = 0; | 271 | bf->bf_buf_addr = 0; |
272 | ath_print(common, ATH_DBG_FATAL, | 272 | ath_err(common, |
273 | "dma_mapping_error() on RX init\n"); | 273 | "dma_mapping_error() on RX init\n"); |
274 | error = -ENOMEM; | 274 | error = -ENOMEM; |
275 | goto rx_init_fail; | 275 | goto rx_init_fail; |
@@ -335,9 +335,9 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) | |||
335 | error = ath_descdma_setup(sc, &sc->rx.rxdma, &sc->rx.rxbuf, | 335 | error = ath_descdma_setup(sc, &sc->rx.rxdma, &sc->rx.rxbuf, |
336 | "rx", nbufs, 1, 0); | 336 | "rx", nbufs, 1, 0); |
337 | if (error != 0) { | 337 | if (error != 0) { |
338 | ath_print(common, ATH_DBG_FATAL, | 338 | ath_err(common, |
339 | "failed to allocate rx descriptors: %d\n", | 339 | "failed to allocate rx descriptors: %d\n", |
340 | error); | 340 | error); |
341 | goto err; | 341 | goto err; |
342 | } | 342 | } |
343 | 343 | ||
@@ -358,8 +358,8 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) | |||
358 | dev_kfree_skb_any(skb); | 358 | dev_kfree_skb_any(skb); |
359 | bf->bf_mpdu = NULL; | 359 | bf->bf_mpdu = NULL; |
360 | bf->bf_buf_addr = 0; | 360 | bf->bf_buf_addr = 0; |
361 | ath_print(common, ATH_DBG_FATAL, | 361 | ath_err(common, |
362 | "dma_mapping_error() on RX init\n"); | 362 | "dma_mapping_error() on RX init\n"); |
363 | error = -ENOMEM; | 363 | error = -ENOMEM; |
364 | goto err; | 364 | goto err; |
365 | } | 365 | } |
@@ -1725,8 +1725,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1725 | dev_kfree_skb_any(requeue_skb); | 1725 | dev_kfree_skb_any(requeue_skb); |
1726 | bf->bf_mpdu = NULL; | 1726 | bf->bf_mpdu = NULL; |
1727 | bf->bf_buf_addr = 0; | 1727 | bf->bf_buf_addr = 0; |
1728 | ath_print(common, ATH_DBG_FATAL, | 1728 | ath_err(common, "dma_mapping_error() on RX\n"); |
1729 | "dma_mapping_error() on RX\n"); | ||
1730 | ath_rx_send_to_mac80211(hw, sc, skb, rxs); | 1729 | ath_rx_send_to_mac80211(hw, sc, skb, rxs); |
1731 | break; | 1730 | break; |
1732 | } | 1731 | } |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 821d3679c6ff..d26449c91d5f 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -985,9 +985,8 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) | |||
985 | return NULL; | 985 | return NULL; |
986 | } | 986 | } |
987 | if (qnum >= ARRAY_SIZE(sc->tx.txq)) { | 987 | if (qnum >= ARRAY_SIZE(sc->tx.txq)) { |
988 | ath_print(common, ATH_DBG_FATAL, | 988 | ath_err(common, "qnum %u out of range, max %zu!\n", |
989 | "qnum %u out of range, max %u!\n", | 989 | qnum, ARRAY_SIZE(sc->tx.txq)); |
990 | qnum, (unsigned int)ARRAY_SIZE(sc->tx.txq)); | ||
991 | ath9k_hw_releasetxqueue(ah, qnum); | 990 | ath9k_hw_releasetxqueue(ah, qnum); |
992 | return NULL; | 991 | return NULL; |
993 | } | 992 | } |
@@ -1038,8 +1037,8 @@ int ath_txq_update(struct ath_softc *sc, int qnum, | |||
1038 | qi.tqi_readyTime = qinfo->tqi_readyTime; | 1037 | qi.tqi_readyTime = qinfo->tqi_readyTime; |
1039 | 1038 | ||
1040 | if (!ath9k_hw_set_txq_props(ah, qnum, &qi)) { | 1039 | if (!ath9k_hw_set_txq_props(ah, qnum, &qi)) { |
1041 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 1040 | ath_err(ath9k_hw_common(sc->sc_ah), |
1042 | "Unable to update hardware queue %u!\n", qnum); | 1041 | "Unable to update hardware queue %u!\n", qnum); |
1043 | error = -EIO; | 1042 | error = -EIO; |
1044 | } else { | 1043 | } else { |
1045 | ath9k_hw_resettxqueue(ah, qnum); | 1044 | ath9k_hw_resettxqueue(ah, qnum); |
@@ -1197,14 +1196,13 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) | |||
1197 | if (npend) { | 1196 | if (npend) { |
1198 | int r; | 1197 | int r; |
1199 | 1198 | ||
1200 | ath_print(common, ATH_DBG_FATAL, | 1199 | ath_err(common, "Failed to stop TX DMA. Resetting hardware!\n"); |
1201 | "Failed to stop TX DMA. Resetting hardware!\n"); | ||
1202 | 1200 | ||
1203 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false); | 1201 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false); |
1204 | if (r) | 1202 | if (r) |
1205 | ath_print(common, ATH_DBG_FATAL, | 1203 | ath_err(common, |
1206 | "Unable to reset hardware; reset status %d\n", | 1204 | "Unable to reset hardware; reset status %d\n", |
1207 | r); | 1205 | r); |
1208 | } | 1206 | } |
1209 | 1207 | ||
1210 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { | 1208 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { |
@@ -1663,8 +1661,8 @@ static struct ath_buf *ath_tx_setup_buffer(struct ieee80211_hw *hw, | |||
1663 | if (unlikely(dma_mapping_error(sc->dev, bf->bf_buf_addr))) { | 1661 | if (unlikely(dma_mapping_error(sc->dev, bf->bf_buf_addr))) { |
1664 | bf->bf_mpdu = NULL; | 1662 | bf->bf_mpdu = NULL; |
1665 | bf->bf_buf_addr = 0; | 1663 | bf->bf_buf_addr = 0; |
1666 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, | 1664 | ath_err(ath9k_hw_common(sc->sc_ah), |
1667 | "dma_mapping_error() on TX\n"); | 1665 | "dma_mapping_error() on TX\n"); |
1668 | ath_tx_return_buffer(sc, bf); | 1666 | ath_tx_return_buffer(sc, bf); |
1669 | return NULL; | 1667 | return NULL; |
1670 | } | 1668 | } |
@@ -2260,16 +2258,16 @@ int ath_tx_init(struct ath_softc *sc, int nbufs) | |||
2260 | error = ath_descdma_setup(sc, &sc->tx.txdma, &sc->tx.txbuf, | 2258 | error = ath_descdma_setup(sc, &sc->tx.txdma, &sc->tx.txbuf, |
2261 | "tx", nbufs, 1, 1); | 2259 | "tx", nbufs, 1, 1); |
2262 | if (error != 0) { | 2260 | if (error != 0) { |
2263 | ath_print(common, ATH_DBG_FATAL, | 2261 | ath_err(common, |
2264 | "Failed to allocate tx descriptors: %d\n", error); | 2262 | "Failed to allocate tx descriptors: %d\n", error); |
2265 | goto err; | 2263 | goto err; |
2266 | } | 2264 | } |
2267 | 2265 | ||
2268 | error = ath_descdma_setup(sc, &sc->beacon.bdma, &sc->beacon.bbuf, | 2266 | error = ath_descdma_setup(sc, &sc->beacon.bdma, &sc->beacon.bbuf, |
2269 | "beacon", ATH_BCBUF, 1, 1); | 2267 | "beacon", ATH_BCBUF, 1, 1); |
2270 | if (error != 0) { | 2268 | if (error != 0) { |
2271 | ath_print(common, ATH_DBG_FATAL, | 2269 | ath_err(common, |
2272 | "Failed to allocate beacon descriptors: %d\n", error); | 2270 | "Failed to allocate beacon descriptors: %d\n", error); |
2273 | goto err; | 2271 | goto err; |
2274 | } | 2272 | } |
2275 | 2273 | ||
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c index 62e3dac8f92a..3a4769506ce3 100644 --- a/drivers/net/wireless/ath/key.c +++ b/drivers/net/wireless/ath/key.c | |||
@@ -37,8 +37,7 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry) | |||
37 | void *ah = common->ah; | 37 | void *ah = common->ah; |
38 | 38 | ||
39 | if (entry >= common->keymax) { | 39 | if (entry >= common->keymax) { |
40 | ath_print(common, ATH_DBG_FATAL, | 40 | ath_err(common, "keycache entry %u out of range\n", entry); |
41 | "keychache entry %u out of range\n", entry); | ||
42 | return false; | 41 | return false; |
43 | } | 42 | } |
44 | 43 | ||
@@ -75,8 +74,7 @@ static bool ath_hw_keysetmac(struct ath_common *common, | |||
75 | void *ah = common->ah; | 74 | void *ah = common->ah; |
76 | 75 | ||
77 | if (entry >= common->keymax) { | 76 | if (entry >= common->keymax) { |
78 | ath_print(common, ATH_DBG_FATAL, | 77 | ath_err(common, "keycache entry %u out of range\n", entry); |
79 | "keychache entry %u out of range\n", entry); | ||
80 | return false; | 78 | return false; |
81 | } | 79 | } |
82 | 80 | ||
@@ -117,8 +115,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry, | |||
117 | u32 keyType; | 115 | u32 keyType; |
118 | 116 | ||
119 | if (entry >= common->keymax) { | 117 | if (entry >= common->keymax) { |
120 | ath_print(common, ATH_DBG_FATAL, | 118 | ath_err(common, "keycache entry %u out of range\n", entry); |
121 | "keycache entry %u out of range\n", entry); | ||
122 | return false; | 119 | return false; |
123 | } | 120 | } |
124 | 121 | ||
@@ -159,8 +156,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry, | |||
159 | keyType = AR_KEYTABLE_TYPE_CLR; | 156 | keyType = AR_KEYTABLE_TYPE_CLR; |
160 | break; | 157 | break; |
161 | default: | 158 | default: |
162 | ath_print(common, ATH_DBG_FATAL, | 159 | ath_err(common, "cipher %u not supported\n", k->kv_type); |
163 | "cipher %u not supported\n", k->kv_type); | ||
164 | return false; | 160 | return false; |
165 | } | 161 | } |
166 | 162 | ||
@@ -341,8 +337,7 @@ static int ath_setkey_tkip(struct ath_common *common, u16 keyix, const u8 *key, | |||
341 | memcpy(hk->kv_mic, key_txmic, sizeof(hk->kv_mic)); | 337 | memcpy(hk->kv_mic, key_txmic, sizeof(hk->kv_mic)); |
342 | if (!ath_hw_set_keycache_entry(common, keyix, hk, NULL)) { | 338 | if (!ath_hw_set_keycache_entry(common, keyix, hk, NULL)) { |
343 | /* TX MIC entry failed. No need to proceed further */ | 339 | /* TX MIC entry failed. No need to proceed further */ |
344 | ath_print(common, ATH_DBG_FATAL, | 340 | ath_err(common, "Setting TX MIC Key Failed\n"); |
345 | "Setting TX MIC Key Failed\n"); | ||
346 | return 0; | 341 | return 0; |
347 | } | 342 | } |
348 | 343 | ||