Lines Matching +full:ts +full:- +full:inv
2 * Copyright (c) 2008-2011 Atheros Communications Inc.
25 ath9k_hw_common(_ah)->ops->write((_ah), (_val), (_reg))
27 ath9k_hw_common(_ah)->ops->read((_ah), (_reg))
32 sc->debug.stats.istats.sync_cause_all++; in ath9k_debug_sync_cause()
34 sc->debug.stats.istats.sync_rtc_irq++; in ath9k_debug_sync_cause()
36 sc->debug.stats.istats.sync_mac_irq++; in ath9k_debug_sync_cause()
38 sc->debug.stats.istats.eeprom_illegal_access++; in ath9k_debug_sync_cause()
40 sc->debug.stats.istats.apb_timeout++; in ath9k_debug_sync_cause()
42 sc->debug.stats.istats.pci_mode_conflict++; in ath9k_debug_sync_cause()
44 sc->debug.stats.istats.host1_fatal++; in ath9k_debug_sync_cause()
46 sc->debug.stats.istats.host1_perr++; in ath9k_debug_sync_cause()
48 sc->debug.stats.istats.trcv_fifo_perr++; in ath9k_debug_sync_cause()
50 sc->debug.stats.istats.radm_cpl_ep++; in ath9k_debug_sync_cause()
52 sc->debug.stats.istats.radm_cpl_dllp_abort++; in ath9k_debug_sync_cause()
54 sc->debug.stats.istats.radm_cpl_tlp_abort++; in ath9k_debug_sync_cause()
56 sc->debug.stats.istats.radm_cpl_ecrc_err++; in ath9k_debug_sync_cause()
58 sc->debug.stats.istats.radm_cpl_timeout++; in ath9k_debug_sync_cause()
60 sc->debug.stats.istats.local_timeout++; in ath9k_debug_sync_cause()
62 sc->debug.stats.istats.pm_access++; in ath9k_debug_sync_cause()
64 sc->debug.stats.istats.mac_awake++; in ath9k_debug_sync_cause()
66 sc->debug.stats.istats.mac_asleep++; in ath9k_debug_sync_cause()
68 sc->debug.stats.istats.mac_sleep_access++; in ath9k_debug_sync_cause()
74 u8 *buf = file->private_data; in ath9k_debugfs_read_buf()
80 vfree(file->private_data); in ath9k_debugfs_release_buf()
89 struct ath_softc *sc = file->private_data; in read_file_debug()
90 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in read_file_debug()
94 len = sprintf(buf, "0x%08x\n", common->debug_mask); in read_file_debug()
101 struct ath_softc *sc = file->private_data; in write_file_debug()
102 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_debug()
110 common->debug_mask = mask; in write_file_debug()
130 struct ath_softc *sc = file->private_data; in read_file_ani()
131 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in read_file_ani()
132 struct ath_hw *ah = sc->sc_ah; in read_file_ani()
142 { "ANI RESET", ah->stats.ast_ani_reset }, in read_file_ani()
143 { "OFDM LEVEL", ah->ani.ofdmNoiseImmunityLevel }, in read_file_ani()
144 { "CCK LEVEL", ah->ani.cckNoiseImmunityLevel }, in read_file_ani()
145 { "SPUR UP", ah->stats.ast_ani_spurup }, in read_file_ani()
146 { "SPUR DOWN", ah->stats.ast_ani_spurdown }, in read_file_ani()
147 { "OFDM WS-DET ON", ah->stats.ast_ani_ofdmon }, in read_file_ani()
148 { "OFDM WS-DET OFF", ah->stats.ast_ani_ofdmoff }, in read_file_ani()
149 { "MRC-CCK ON", ah->stats.ast_ani_ccklow }, in read_file_ani()
150 { "MRC-CCK OFF", ah->stats.ast_ani_cckhigh }, in read_file_ani()
151 { "FIR-STEP UP", ah->stats.ast_ani_stepup }, in read_file_ani()
152 { "FIR-STEP DOWN", ah->stats.ast_ani_stepdown }, in read_file_ani()
153 { "INV LISTENTIME", ah->stats.ast_ani_lneg_or_lzero }, in read_file_ani()
154 { "OFDM ERRORS", ah->stats.ast_ani_ofdmerrs }, in read_file_ani()
155 { "CCK ERRORS", ah->stats.ast_ani_cckerrs }, in read_file_ani()
160 return -ENOMEM; in read_file_ani()
162 len += scnprintf(buf + len, size - len, "%15s: %s\n", "ANI", in read_file_ani()
163 common->disable_ani ? "DISABLED" : "ENABLED"); in read_file_ani()
165 if (common->disable_ani) in read_file_ani()
169 len += scnprintf(buf + len, size - len, "%15s: %u\n", in read_file_ani()
186 struct ath_softc *sc = file->private_data; in write_file_ani()
187 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_ani()
196 return -EINVAL; in write_file_ani()
198 common->disable_ani = !ani; in write_file_ani()
200 if (common->disable_ani) { in write_file_ani()
201 clear_bit(ATH_OP_ANI_RUN, &common->op_flags); in write_file_ani()
224 struct ath_softc *sc = file->private_data; in read_file_bt_ant_diversity()
225 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in read_file_bt_ant_diversity()
229 len = sprintf(buf, "%d\n", common->bt_ant_diversity); in read_file_bt_ant_diversity()
237 struct ath_softc *sc = file->private_data; in write_file_bt_ant_diversity()
238 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_bt_ant_diversity()
239 struct ath9k_hw_capabilities *pCap = &sc->sc_ah->caps; in write_file_bt_ant_diversity()
247 if (!(pCap->hw_caps & ATH9K_HW_CAP_BT_ANT_DIV)) in write_file_bt_ant_diversity()
250 common->bt_ant_diversity = !!bt_ant_diversity; in write_file_bt_ant_diversity()
252 ath9k_hw_set_bt_ant_diversity(sc->sc_ah, common->bt_ant_diversity); in write_file_bt_ant_diversity()
254 common->bt_ant_diversity); in write_file_bt_ant_diversity()
274 struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN]; in ath9k_debug_stat_ant()
275 struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT]; in ath9k_debug_stat_ant()
277 as_main->lna_attempt_cnt[div_ant_conf->main_lna_conf]++; in ath9k_debug_stat_ant()
278 as_alt->lna_attempt_cnt[div_ant_conf->alt_lna_conf]++; in ath9k_debug_stat_ant()
280 as_main->rssi_avg = main_rssi_avg; in ath9k_debug_stat_ant()
281 as_alt->rssi_avg = alt_rssi_avg; in ath9k_debug_stat_ant()
288 struct ath_softc *sc = file->private_data; in read_file_antenna_diversity()
289 struct ath_hw *ah = sc->sc_ah; in read_file_antenna_diversity()
290 struct ath9k_hw_capabilities *pCap = &ah->caps; in read_file_antenna_diversity()
291 struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN]; in read_file_antenna_diversity()
292 struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT]; in read_file_antenna_diversity()
304 return -ENOMEM; in read_file_antenna_diversity()
306 if (!(pCap->hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB)) { in read_file_antenna_diversity()
307 len += scnprintf(buf + len, size - len, "%s\n", in read_file_antenna_diversity()
314 len += scnprintf(buf + len, size - len, "Current MAIN config : %s\n", in read_file_antenna_diversity()
316 len += scnprintf(buf + len, size - len, "Current ALT config : %s\n", in read_file_antenna_diversity()
318 len += scnprintf(buf + len, size - len, "Average MAIN RSSI : %d\n", in read_file_antenna_diversity()
319 as_main->rssi_avg); in read_file_antenna_diversity()
320 len += scnprintf(buf + len, size - len, "Average ALT RSSI : %d\n\n", in read_file_antenna_diversity()
321 as_alt->rssi_avg); in read_file_antenna_diversity()
324 len += scnprintf(buf + len, size - len, "Packet Receive Cnt:\n"); in read_file_antenna_diversity()
325 len += scnprintf(buf + len, size - len, "-------------------\n"); in read_file_antenna_diversity()
327 len += scnprintf(buf + len, size - len, "%30s%15s\n", in read_file_antenna_diversity()
329 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
331 as_main->recv_cnt, in read_file_antenna_diversity()
332 as_alt->recv_cnt); in read_file_antenna_diversity()
333 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
335 as_main->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA1], in read_file_antenna_diversity()
336 as_alt->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA1]); in read_file_antenna_diversity()
337 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
339 as_main->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA2], in read_file_antenna_diversity()
340 as_alt->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA2]); in read_file_antenna_diversity()
341 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
343 as_main->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2], in read_file_antenna_diversity()
344 as_alt->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2]); in read_file_antenna_diversity()
345 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
346 "LNA1 - LNA2", in read_file_antenna_diversity()
347 as_main->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2], in read_file_antenna_diversity()
348 as_alt->lna_recv_cnt[ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2]); in read_file_antenna_diversity()
350 len += scnprintf(buf + len, size - len, "\nLNA Config Attempts:\n"); in read_file_antenna_diversity()
351 len += scnprintf(buf + len, size - len, "--------------------\n"); in read_file_antenna_diversity()
353 len += scnprintf(buf + len, size - len, "%30s%15s\n", in read_file_antenna_diversity()
355 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
357 as_main->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA1], in read_file_antenna_diversity()
358 as_alt->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA1]); in read_file_antenna_diversity()
359 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
361 as_main->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA2], in read_file_antenna_diversity()
362 as_alt->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA2]); in read_file_antenna_diversity()
363 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
365 as_main->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2], in read_file_antenna_diversity()
366 as_alt->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2]); in read_file_antenna_diversity()
367 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", in read_file_antenna_diversity()
368 "LNA1 - LNA2", in read_file_antenna_diversity()
369 as_main->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2], in read_file_antenna_diversity()
370 as_alt->lna_attempt_cnt[ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2]); in read_file_antenna_diversity()
391 struct ieee80211_hw *hw = dev_get_drvdata(file->private); in read_file_dma()
392 struct ath_softc *sc = hw->priv; in read_file_dma()
393 struct ath_hw *ah = sc->sc_ah; in read_file_dma()
462 sc->debug.stats.istats.total++; in ath_debug_stat_interrupt()
463 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { in ath_debug_stat_interrupt()
465 sc->debug.stats.istats.rxlp++; in ath_debug_stat_interrupt()
467 sc->debug.stats.istats.rxhp++; in ath_debug_stat_interrupt()
469 sc->debug.stats.istats.bb_watchdog++; in ath_debug_stat_interrupt()
472 sc->debug.stats.istats.rxok++; in ath_debug_stat_interrupt()
475 sc->debug.stats.istats.rxeol++; in ath_debug_stat_interrupt()
477 sc->debug.stats.istats.rxorn++; in ath_debug_stat_interrupt()
479 sc->debug.stats.istats.txok++; in ath_debug_stat_interrupt()
481 sc->debug.stats.istats.txurn++; in ath_debug_stat_interrupt()
483 sc->debug.stats.istats.rxphyerr++; in ath_debug_stat_interrupt()
485 sc->debug.stats.istats.rx_keycache_miss++; in ath_debug_stat_interrupt()
487 sc->debug.stats.istats.swba++; in ath_debug_stat_interrupt()
489 sc->debug.stats.istats.bmiss++; in ath_debug_stat_interrupt()
491 sc->debug.stats.istats.bnr++; in ath_debug_stat_interrupt()
493 sc->debug.stats.istats.cst++; in ath_debug_stat_interrupt()
495 sc->debug.stats.istats.gtt++; in ath_debug_stat_interrupt()
497 sc->debug.stats.istats.tim++; in ath_debug_stat_interrupt()
499 sc->debug.stats.istats.cabend++; in ath_debug_stat_interrupt()
501 sc->debug.stats.istats.dtimsync++; in ath_debug_stat_interrupt()
503 sc->debug.stats.istats.dtim++; in ath_debug_stat_interrupt()
505 sc->debug.stats.istats.tsfoor++; in ath_debug_stat_interrupt()
507 sc->debug.stats.istats.mci++; in ath_debug_stat_interrupt()
509 sc->debug.stats.istats.gen_timer++; in ath_debug_stat_interrupt()
514 struct ieee80211_hw *hw = dev_get_drvdata(file->private); in read_file_interrupt()
515 struct ath_softc *sc = hw->priv; in read_file_interrupt()
520 sc->debug.stats.istats.s); \ in read_file_interrupt()
523 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { in read_file_interrupt()
553 PR_IS("Sync-All", sync_cause_all); in read_file_interrupt()
554 PR_IS("RTC-IRQ", sync_rtc_irq); in read_file_interrupt()
555 PR_IS("MAC-IRQ", sync_mac_irq); in read_file_interrupt()
556 PR_IS("EEPROM-Illegal-Access", eeprom_illegal_access); in read_file_interrupt()
557 PR_IS("APB-Timeout", apb_timeout); in read_file_interrupt()
558 PR_IS("PCI-Mode-Conflict", pci_mode_conflict); in read_file_interrupt()
559 PR_IS("HOST1-Fatal", host1_fatal); in read_file_interrupt()
560 PR_IS("HOST1-Perr", host1_perr); in read_file_interrupt()
561 PR_IS("TRCV-FIFO-Perr", trcv_fifo_perr); in read_file_interrupt()
562 PR_IS("RADM-CPL-EP", radm_cpl_ep); in read_file_interrupt()
563 PR_IS("RADM-CPL-DLLP-Abort", radm_cpl_dllp_abort); in read_file_interrupt()
564 PR_IS("RADM-CPL-TLP-Abort", radm_cpl_tlp_abort); in read_file_interrupt()
565 PR_IS("RADM-CPL-ECRC-Err", radm_cpl_ecrc_err); in read_file_interrupt()
566 PR_IS("RADM-CPL-Timeout", radm_cpl_timeout); in read_file_interrupt()
567 PR_IS("Local-Bus-Timeout", local_timeout); in read_file_interrupt()
568 PR_IS("PM-Access", pm_access); in read_file_interrupt()
569 PR_IS("MAC-Awake", mac_awake); in read_file_interrupt()
570 PR_IS("MAC-Asleep", mac_asleep); in read_file_interrupt()
571 PR_IS("MAC-Sleep-Access", mac_sleep_access); in read_file_interrupt()
578 struct ieee80211_hw *hw = dev_get_drvdata(file->private); in read_file_xmit()
579 struct ath_softc *sc = hw->priv; in read_file_xmit()
598 PR("TX-Pkts-All: ", tx_pkts_all); in read_file_xmit()
599 PR("TX-Bytes-All: ", tx_bytes_all); in read_file_xmit()
600 PR("HW-put-tx-buf: ", puttxbuf); in read_file_xmit()
601 PR("HW-tx-start: ", txstart); in read_file_xmit()
602 PR("HW-tx-proc-desc: ", txprocdesc); in read_file_xmit()
603 PR("TX-Failed: ", txfailed); in read_file_xmit()
613 seq_printf(file, "%s: %d ", "qnum", txq->axq_qnum); in print_queue()
614 seq_printf(file, "%s: %2d ", "qdepth", txq->axq_depth); in print_queue()
615 seq_printf(file, "%s: %2d ", "ampdu-depth", txq->axq_ampdu_depth); in print_queue()
616 seq_printf(file, "%s: %3d\n", "pending", txq->pending_frames); in print_queue()
623 struct ieee80211_hw *hw = dev_get_drvdata(file->private); in read_file_queues()
624 struct ath_softc *sc = hw->priv; in read_file_queues()
632 txq = sc->tx.txq_map[i]; in read_file_queues()
638 print_queue(sc, sc->beacon.cabq, file); in read_file_queues()
645 struct ieee80211_hw *hw = dev_get_drvdata(file->private); in read_file_misc()
646 struct ath_softc *sc = hw->priv; in read_file_misc()
647 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in read_file_misc()
653 seq_printf(file, "BSSID: %pM\n", common->curbssid); in read_file_misc()
654 seq_printf(file, "BSSID-MASK: %pM\n", common->bssidmask); in read_file_misc()
656 ath_opmode_to_string(sc->sc_ah->opmode)); in read_file_misc()
659 rxfilter = ath9k_hw_getrxfilter(sc->sc_ah); in read_file_misc()
695 reg = sc->sc_ah->imask; in read_file_misc()
697 seq_printf(file, "INTERRUPT-MASK: 0x%x", reg); in read_file_misc()
718 if (list_empty(&ctx->vifs)) in read_file_misc()
724 i++, (int)(ctx->assigned), iter_data.naps, in read_file_misc()
727 seq_printf(file, " ADHOC: %i OCB: %i TOTAL: %hi BEACON-VIF: %hi\n", in read_file_misc()
728 iter_data.nadhocs, iter_data.nocbs, sc->cur_chan->nvifs, in read_file_misc()
729 sc->nbcnvifs); in read_file_misc()
737 struct ath_softc *sc = file->private; in read_file_reset()
761 sc->debug.stats.reset[i]); in read_file_reset()
769 return single_open(f, read_file_reset, inode->i_private); in open_file_reset()
776 struct ath_softc *sc = file_inode(file)->i_private; in write_file_reset()
777 struct ath_hw *ah = sc->sc_ah; in write_file_reset()
787 return -EINVAL; in write_file_reset()
790 mutex_lock(&sc->mutex); in write_file_reset()
791 if (test_bit(ATH_OP_INVALID, &common->op_flags)) { in write_file_reset()
792 mutex_unlock(&sc->mutex); in write_file_reset()
793 return -EBUSY; in write_file_reset()
797 mutex_unlock(&sc->mutex); in write_file_reset()
812 struct ath_tx_status *ts, struct ath_txq *txq, in ath_debug_stat_tx() argument
815 int qnum = txq->axq_qnum; in ath_debug_stat_tx()
818 sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len; in ath_debug_stat_tx()
826 if (ts->ts_status & ATH9K_TXERR_XRETRY) in ath_debug_stat_tx()
832 if (ts->ts_status & ATH9K_TXERR_FILT) in ath_debug_stat_tx()
834 if (ts->ts_status & ATH9K_TXERR_FIFO) in ath_debug_stat_tx()
836 if (ts->ts_status & ATH9K_TXERR_XTXOP) in ath_debug_stat_tx()
838 if (ts->ts_status & ATH9K_TXERR_TIMER_EXPIRED) in ath_debug_stat_tx()
840 if (ts->ts_flags & ATH9K_TX_DESC_CFG_ERR) in ath_debug_stat_tx()
842 if (ts->ts_flags & ATH9K_TX_DATA_UNDERRUN) in ath_debug_stat_tx()
844 if (ts->ts_flags & ATH9K_TX_DELIM_UNDERRUN) in ath_debug_stat_tx()
850 ath9k_cmn_debug_stat_rx(&sc->debug.stats.rxstats, rs); in ath_debug_stat_rx()
856 struct ath_softc *sc = file->private_data; in read_file_regidx()
860 len = sprintf(buf, "0x%08x\n", sc->debug.regidx); in read_file_regidx()
867 struct ath_softc *sc = file->private_data; in write_file_regidx()
875 sc->debug.regidx = regidx; in write_file_regidx()
890 struct ath_softc *sc = file->private_data; in read_file_regval()
891 struct ath_hw *ah = sc->sc_ah; in read_file_regval()
897 regval = REG_READ_D(ah, sc->debug.regidx); in read_file_regval()
906 struct ath_softc *sc = file->private_data; in write_file_regval()
907 struct ath_hw *ah = sc->sc_ah; in write_file_regval()
916 REG_WRITE_D(ah, sc->debug.regidx, regval); in write_file_regval()
933 struct ath_softc *sc = inode->i_private; in open_file_regdump()
950 max_reg_offset = AR_SREV_9300_20_OR_LATER(sc->sc_ah) ? 0x8800 : 0xb500; in open_file_regdump()
955 return -ENOMEM; in open_file_regdump()
965 len += scnprintf(buf + len, regdump_len - len, in open_file_regdump()
966 "0x%06x 0x%08x\n", i << 2, REG_READ(sc->sc_ah, i << 2)); in open_file_regdump()
970 file->private_data = buf; in open_file_regdump()
985 struct ieee80211_hw *hw = dev_get_drvdata(file->private); in read_file_dump_nfcal()
986 struct ath_softc *sc = hw->priv; in read_file_dump_nfcal()
987 struct ath_hw *ah = sc->sc_ah; in read_file_dump_nfcal()
988 struct ath9k_nfcal_hist *h = sc->cur_chan->caldata.nfCalHist; in read_file_dump_nfcal()
990 struct ieee80211_conf *conf = &common->hw->conf; in read_file_dump_nfcal()
992 u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask; in read_file_dump_nfcal()
995 seq_printf(file, "Channel Noise Floor : %d\n", ah->noise); in read_file_dump_nfcal()
1002 nread = AR_PHY_CCA_FILTERWINDOW_LENGTH - h[i].invalidNFcount; in read_file_dump_nfcal()
1016 struct ath_softc *sc = file->private_data; in read_file_btcoex()
1023 return -ENOMEM; in read_file_btcoex()
1025 if (!sc->sc_ah->common.btcoex_enabled) { in read_file_btcoex()
1051 struct ath_softc *sc = file->private_data; in read_file_ackto()
1052 struct ath_hw *ah = sc->sc_ah; in read_file_ackto()
1056 len = sprintf(buf, "%u %c\n", ah->dynack.ackto, in read_file_ackto()
1057 (ah->dynack.enabled) ? 'A' : 'S'); in read_file_ackto()
1075 struct ath_softc *sc = file->private_data; in read_file_wow()
1082 return -ENOMEM; in read_file_wow()
1084 len += scnprintf(buf + len, size - len, "WOW: %s\n", in read_file_wow()
1085 sc->force_wow ? "ENABLED" : "DISABLED"); in read_file_wow()
1099 struct ath_softc *sc = file->private_data; in write_file_wow()
1108 return -EINVAL; in write_file_wow()
1110 if (!sc->force_wow) { in write_file_wow()
1111 sc->force_wow = true; in write_file_wow()
1112 ath9k_init_wow(sc->hw); in write_file_wow()
1131 struct ath_softc *sc = file->private_data; in read_file_tpc()
1132 struct ath_hw *ah = sc->sc_ah; in read_file_tpc()
1139 return -ENOMEM; in read_file_tpc()
1141 len += scnprintf(buf + len, size - len, "%s\n", in read_file_tpc()
1142 ah->tpc_enabled ? "ENABLED" : "DISABLED"); in read_file_tpc()
1156 struct ath_softc *sc = file->private_data; in write_file_tpc()
1157 struct ath_hw *ah = sc->sc_ah; in write_file_tpc()
1167 return -EINVAL; in write_file_tpc()
1171 if (tpc_enabled != ah->tpc_enabled) { in write_file_tpc()
1172 ah->tpc_enabled = tpc_enabled; in write_file_tpc()
1174 mutex_lock(&sc->mutex); in write_file_tpc()
1176 mutex_unlock(&sc->mutex); in write_file_tpc()
1194 struct ath_softc *sc = file->private_data; in read_file_nf_override()
1195 struct ath_hw *ah = sc->sc_ah; in read_file_nf_override()
1199 if (ah->nf_override == 0) in read_file_nf_override()
1202 len = sprintf(buf, "%d\n", ah->nf_override); in read_file_nf_override()
1211 struct ath_softc *sc = file->private_data; in write_file_nf_override()
1212 struct ath_hw *ah = sc->sc_ah; in write_file_nf_override()
1217 len = min(count, sizeof(buf) - 1); in write_file_nf_override()
1219 return -EFAULT; in write_file_nf_override()
1225 return -EINVAL; in write_file_nf_override()
1228 return -EINVAL; in write_file_nf_override()
1230 if (val < -120) in write_file_nf_override()
1231 return -EINVAL; in write_file_nf_override()
1233 ah->nf_override = val; in write_file_nf_override()
1235 if (ah->curchan) { in write_file_nf_override()
1237 ath9k_hw_loadnf(ah, ah->curchan); in write_file_nf_override()
1252 /* Ethtool support for get-stats */
1310 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].elem; \
1311 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].elem; \
1312 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].elem; \
1313 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].elem; \
1318 data[i++] = sc->debug.stats.rxstats.elem; \
1325 struct ath_softc *sc = hw->priv; in ath9k_get_et_stats()
1328 data[i++] = ((u64)sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].tx_pkts_all + in ath9k_get_et_stats()
1329 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].tx_pkts_all + in ath9k_get_et_stats()
1330 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].tx_pkts_all + in ath9k_get_et_stats()
1331 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].tx_pkts_all); in ath9k_get_et_stats()
1332 data[i++] = ((u64)sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].tx_bytes_all + in ath9k_get_et_stats()
1333 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].tx_bytes_all + in ath9k_get_et_stats()
1334 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].tx_bytes_all + in ath9k_get_et_stats()
1335 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].tx_bytes_all); in ath9k_get_et_stats()
1373 ath9k_cmn_spectral_deinit_debug(&sc->spec_priv); in ath9k_deinit_debug()
1379 struct ath_softc *sc = common->priv; in ath9k_init_debug()
1381 sc->debug.debugfs_phy = debugfs_create_dir("ath9k", in ath9k_init_debug()
1382 sc->hw->wiphy->debugfsdir); in ath9k_init_debug()
1385 debugfs_create_file("debug", 0600, sc->debug.debugfs_phy, in ath9k_init_debug()
1391 ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy); in ath9k_init_debug()
1393 debugfs_create_devm_seqfile(sc->dev, "dma", sc->debug.debugfs_phy, in ath9k_init_debug()
1395 debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy, in ath9k_init_debug()
1397 debugfs_create_devm_seqfile(sc->dev, "xmit", sc->debug.debugfs_phy, in ath9k_init_debug()
1399 debugfs_create_devm_seqfile(sc->dev, "queues", sc->debug.debugfs_phy, in ath9k_init_debug()
1401 debugfs_create_devm_seqfile(sc->dev, "misc", sc->debug.debugfs_phy, in ath9k_init_debug()
1403 debugfs_create_file("reset", 0600, sc->debug.debugfs_phy, in ath9k_init_debug()
1406 ath9k_cmn_debug_recv(sc->debug.debugfs_phy, &sc->debug.stats.rxstats); in ath9k_init_debug()
1407 ath9k_cmn_debug_phy_err(sc->debug.debugfs_phy, &sc->debug.stats.rxstats); in ath9k_init_debug()
1409 debugfs_create_u8("rx_chainmask", 0400, sc->debug.debugfs_phy, in ath9k_init_debug()
1410 &ah->rxchainmask); in ath9k_init_debug()
1411 debugfs_create_u8("tx_chainmask", 0400, sc->debug.debugfs_phy, in ath9k_init_debug()
1412 &ah->txchainmask); in ath9k_init_debug()
1414 sc->debug.debugfs_phy, sc, &fops_ani); in ath9k_init_debug()
1415 debugfs_create_bool("paprd", 0600, sc->debug.debugfs_phy, in ath9k_init_debug()
1416 &sc->sc_ah->config.enable_paprd); in ath9k_init_debug()
1417 debugfs_create_file("regidx", 0600, sc->debug.debugfs_phy, in ath9k_init_debug()
1419 debugfs_create_file("regval", 0600, sc->debug.debugfs_phy, in ath9k_init_debug()
1422 sc->debug.debugfs_phy, in ath9k_init_debug()
1423 &ah->config.cwm_ignore_extcca); in ath9k_init_debug()
1424 debugfs_create_file("regdump", 0400, sc->debug.debugfs_phy, sc, in ath9k_init_debug()
1426 debugfs_create_devm_seqfile(sc->dev, "dump_nfcal", in ath9k_init_debug()
1427 sc->debug.debugfs_phy, in ath9k_init_debug()
1430 ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah); in ath9k_init_debug()
1431 ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah); in ath9k_init_debug()
1434 sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); in ath9k_init_debug()
1436 sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); in ath9k_init_debug()
1438 sc->debug.debugfs_phy, sc, &fops_antenna_diversity); in ath9k_init_debug()
1441 sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity); in ath9k_init_debug()
1442 debugfs_create_file("btcoex", 0400, sc->debug.debugfs_phy, sc, in ath9k_init_debug()
1447 debugfs_create_file("wow", 0600, sc->debug.debugfs_phy, sc, &fops_wow); in ath9k_init_debug()
1451 debugfs_create_file("ack_to", 0400, sc->debug.debugfs_phy, in ath9k_init_debug()
1454 debugfs_create_file("tpc", 0600, sc->debug.debugfs_phy, sc, &fops_tpc); in ath9k_init_debug()
1457 sc->debug.debugfs_phy, sc, &fops_nf_override); in ath9k_init_debug()