29 bool needreset =
false;
30 #ifdef CONFIG_ATH9K_DEBUGFS
31 sc->tx_complete_poll_work_seen++;
52 "tx hung, resetting the chip\n");
70 u8 is_alive, nbeacon = 1;
80 "DCU stuck is detected. Schedule chip reset\n");
87 spin_unlock_irqrestore(&common->
cc_lock, flags);
89 ath_dbg(common,
RESET,
"Possible baseband hang, busy=%d (try %d)\n",
96 }
else if (busy >= 0) {
113 static bool ath_hw_pll_rx_hang_check(
struct ath_softc *
sc,
u32 pll_sqsum)
118 if (pll_sqsum >= 0x40000) {
121 ath_dbg(common,
RESET,
"PLL WAR, resetting the chip\n");
150 if (ath_hw_pll_rx_hang_check(sc, pll_sqsum))
182 static void ath_paprd_activate(
struct ath_softc *sc)
209 struct ath_common *common = ath9k_hw_common(ah);
213 memset(&txctl, 0,
sizeof(txctl));
216 memset(tx_info, 0,
sizeof(*tx_info));
217 tx_info->
band = hw->
conf.channel->band;
219 tx_info->
control.rates[0].idx = 0;
220 tx_info->
control.rates[0].count = 1;
222 tx_info->
control.rates[1].idx = -1;
225 txctl.paprd =
BIT(chain);
228 ath_dbg(common, CALIBRATE,
"PAPRD TX failed\n");
238 "Timeout waiting for paprd training on TX chain %d\n",
252 struct ath_common *common = ath9k_hw_common(ah);
289 "Sending PAPRD training frame on chain %d\n", chain);
290 if (!ath_paprd_send_frame(sc, skb, chain))
295 "PAPRD not yet done on chain %d\n", chain);
302 "PAPRD curve on chain %d needs to be re-trained\n",
307 "PAPRD create curve failed on chain %d\n",
318 ath_paprd_activate(sc);
336 struct ath_common *common = ath9k_hw_common(ah);
337 bool longcal =
false;
338 bool shortcal =
false;
339 bool aniflag =
false;
341 u32 cal_interval, short_cal_interval, long_cal_interval;
359 if ((timestamp - common->
ani.longcal_timer) >= long_cal_interval) {
365 if (!common->
ani.caldone) {
366 if ((timestamp - common->
ani.shortcal_timer) >= short_cal_interval) {
372 if ((timestamp - common->
ani.resetcal_timer) >=
375 if (common->
ani.caldone)
381 if (sc->
sc_ah->config.enable_ani
382 && (timestamp - common->
ani.checkani_timer) >=
383 ah->
config.ani_poll_interval) {
393 spin_unlock_irqrestore(&common->
cc_lock, flags);
397 if (longcal || shortcal) {
398 common->
ani.caldone =
399 ath9k_hw_calibrate(ah, ah->
curchan,
404 "Calibration @%lu finished: %s %s %s, caldone: %s\n",
406 longcal ?
"long" :
"", shortcal ?
"short" :
"",
407 aniflag ?
"ani" :
"", common->
ani.caldone ?
"true" :
"false");
409 ath9k_debug_samp_bb_mac(sc);
419 if (sc->
sc_ah->config.enable_ani)
420 cal_interval =
min(cal_interval,
422 if (!common->
ani.caldone)
423 cal_interval =
min(cal_interval, (
u32)short_cal_interval);
430 ath_paprd_activate(sc);
437 struct ath_common *common = ath9k_hw_common(ah);
449 ath_dbg(common, ANI,
"Starting ANI\n");
458 ath_dbg(common, ANI,
"Stopping ANI\n");
520 struct ath_common *common = ath9k_hw_common(ah);
550 memset(cc, 0,
sizeof(*cc));