Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
63fefa0
Documentation
arch
block
certs
crypto
drivers
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma-buf
dma
edac
eisa
extcon
firewire
firmware
fmc
fpga
gpio
gpu
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
ide
idle
iio
infiniband
input
iommu
ipack
irqchip
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
mtd
net
appletalk
arcnet
bonding
caif
can
cris
dsa
ethernet
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipvlan
irda
phy
plip
ppp
slip
team
usb
vmxnet3
wan
wimax
wireless
admtek
ath
ar5523
ath10k
ath5k
ath6kl
ath9k
Kconfig
Makefile
ahb.c
ani.c
ani.h
antenna.c
ar5008_initvals.h
ar5008_phy.c
ar9001_initvals.h
ar9002_calib.c
ar9002_hw.c
ar9002_initvals.h
ar9002_mac.c
ar9002_phy.c
ar9002_phy.h
ar9003_2p2_initvals.h
ar9003_aic.c
ar9003_aic.h
ar9003_buffalo_initvals.h
ar9003_calib.c
ar9003_eeprom.c
ar9003_eeprom.h
ar9003_hw.c
ar9003_mac.c
ar9003_mac.h
ar9003_mci.c
ar9003_mci.h
ar9003_paprd.c
ar9003_phy.c
ar9003_phy.h
ar9003_rtt.c
ar9003_rtt.h
ar9003_wow.c
ar9330_1p1_initvals.h
ar9330_1p2_initvals.h
ar9340_initvals.h
ar9462_2p0_initvals.h
ar9462_2p1_initvals.h
ar9485_initvals.h
ar953x_initvals.h
ar955x_1p0_initvals.h
ar9565_1p0_initvals.h
ar9565_1p1_initvals.h
ar956x_initvals.h
ar9580_1p0_initvals.h
ath9k.h
beacon.c
btcoex.c
btcoex.h
calib.c
calib.h
channel.c
common-beacon.c
common-beacon.h
common-debug.c
common-debug.h
common-init.c
common-init.h
common-spectral.c
common-spectral.h
common.c
common.h
debug.c
debug.h
debug_sta.c
dfs.c
dfs.h
dfs_debug.c
dfs_debug.h
dynack.c
dynack.h
eeprom.c
eeprom.h
eeprom_4k.c
eeprom_9287.c
eeprom_def.c
gpio.c
hif_usb.c
hif_usb.h
htc.h
htc_drv_beacon.c
htc_drv_debug.c
htc_drv_gpio.c
htc_drv_init.c
htc_drv_main.c
htc_drv_txrx.c
htc_hst.c
htc_hst.h
hw-ops.h
hw.c
hw.h
init.c
link.c
mac.c
mac.h
main.c
mci.c
mci.h
pci.c
phy.h
recv.c
reg.h
reg_aic.h
reg_mci.h
reg_wow.h
rng.c
tx99.c
wmi.c
wmi.h
wow.c
xmit.c
carl9170
wcn36xx
wil6210
Kconfig
Makefile
ath.h
debug.c
dfs_pattern_detector.c
dfs_pattern_detector.h
dfs_pri_detector.c
dfs_pri_detector.h
hw.c
key.c
main.c
reg.h
regd.c
regd.h
regd_common.h
spectral_common.h
trace.c
trace.h
atmel
broadcom
cisco
intel
intersil
marvell
mediatek
ralink
realtek
rsi
st
ti
zydas
Kconfig
Makefile
mac80211_hwsim.c
mac80211_hwsim.h
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c
wl3501.h
wl3501_cs.c
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tun.c
veth.c
virtio_net.c
vrf.c
vxlan.c
xen-netfront.c
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
sn
soc
spi
spmi
ssb
staging
target
tc
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
drivers
/
net
/
wireless
/
ath
/
ath9k
/
debug.h
Copy path
Blame
Blame
Latest commit
History
History
338 lines (309 loc) · 8.76 KB
Breadcrumbs
linux
/
drivers
/
net
/
wireless
/
ath
/
ath9k
/
debug.h
Top
File metadata and controls
Code
Blame
338 lines (309 loc) · 8.76 KB
Raw
/* * Copyright (c) 2008-2011 Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef DEBUG_H #define DEBUG_H #include "hw.h" #include "dfs_debug.h" struct ath_txq; struct ath_buf; struct fft_sample_tlv; #ifdef CONFIG_ATH9K_DEBUGFS #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++ #define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++) #define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++ #define ANT_STAT_INC(i, c) sc->debug.stats.ant_stats[i].c++ #define ANT_LNA_INC(i, c) sc->debug.stats.ant_stats[i].lna_recv_cnt[c]++; #else #define TX_STAT_INC(q, c) do { } while (0) #define RX_STAT_INC(c) #define RESET_STAT_INC(sc, type) do { } while (0) #define ANT_STAT_INC(i, c) do { } while (0) #define ANT_LNA_INC(i, c) do { } while (0) #endif enum ath_reset_type { RESET_TYPE_BB_HANG, RESET_TYPE_BB_WATCHDOG, RESET_TYPE_FATAL_INT, RESET_TYPE_TX_ERROR, RESET_TYPE_TX_GTT, RESET_TYPE_TX_HANG, RESET_TYPE_PLL_HANG, RESET_TYPE_MAC_HANG, RESET_TYPE_BEACON_STUCK, RESET_TYPE_MCI, RESET_TYPE_CALIBRATION, RESET_TX_DMA_ERROR, RESET_RX_DMA_ERROR, __RESET_TYPE_MAX }; #ifdef CONFIG_ATH9K_DEBUGFS /** * struct ath_interrupt_stats - Contains statistics about interrupts * @total: Total no. of interrupts generated so far * @rxok: RX with no errors * @rxlp: RX with low priority RX * @rxhp: RX with high priority, uapsd only * @rxeol: RX with no more RXDESC available * @rxorn: RX FIFO overrun * @txok: TX completed at the requested rate * @txurn: TX FIFO underrun * @mib: MIB regs reaching its threshold * @rxphyerr: RX with phy errors * @rx_keycache_miss: RX with key cache misses * @swba: Software Beacon Alert * @bmiss: Beacon Miss * @bnr: Beacon Not Ready * @cst: Carrier Sense TImeout * @gtt: Global TX Timeout * @tim: RX beacon TIM occurrence * @cabend: RX End of CAB traffic * @dtimsync: DTIM sync lossage * @dtim: RX Beacon with DTIM * @bb_watchdog: Baseband watchdog * @tsfoor: TSF out of range, indicates that the corrected TSF received * from a beacon differs from the PCU's internal TSF by more than a * (programmable) threshold * @local_timeout: Internal bus timeout. * @mci: MCI interrupt, specific to MCI based BTCOEX chipsets * @gen_timer: Generic hardware timer interrupt */ struct ath_interrupt_stats { u32 total; u32 rxok; u32 rxlp; u32 rxhp; u32 rxeol; u32 rxorn; u32 txok; u32 txeol; u32 txurn; u32 mib; u32 rxphyerr; u32 rx_keycache_miss; u32 swba; u32 bmiss; u32 bnr; u32 cst; u32 gtt; u32 tim; u32 cabend; u32 dtimsync; u32 dtim; u32 bb_watchdog; u32 tsfoor; u32 mci; u32 gen_timer; /* Sync-cause stats */ u32 sync_cause_all; u32 sync_rtc_irq; u32 sync_mac_irq; u32 eeprom_illegal_access; u32 apb_timeout; u32 pci_mode_conflict; u32 host1_fatal; u32 host1_perr; u32 trcv_fifo_perr; u32 radm_cpl_ep; u32 radm_cpl_dllp_abort; u32 radm_cpl_tlp_abort; u32 radm_cpl_ecrc_err; u32 radm_cpl_timeout; u32 local_timeout; u32 pm_access; u32 mac_awake; u32 mac_asleep; u32 mac_sleep_access; }; /** * struct ath_tx_stats - Statistics about TX * @tx_pkts_all: No. of total frames transmitted, including ones that may have had errors. * @tx_bytes_all: No. of total bytes transmitted, including ones that may have had errors. * @queued: Total MPDUs (non-aggr) queued * @completed: Total MPDUs (non-aggr) completed * @a_aggr: Total no. of aggregates queued * @a_queued_hw: Total AMPDUs queued to hardware * @a_completed: Total AMPDUs completed * @a_retries: No. of AMPDUs retried (SW) * @a_xretries: No. of AMPDUs dropped due to xretries * @txerr_filtered: No. of frames with TXERR_FILT flag set. * @fifo_underrun: FIFO underrun occurrences Valid only for: - non-aggregate condition. - first packet of aggregate. * @xtxop: No. of frames filtered because of TXOP limit * @timer_exp: Transmit timer expiry * @desc_cfg_err: Descriptor configuration errors * @data_urn: TX data underrun errors * @delim_urn: TX delimiter underrun errors * @puttxbuf: Number of times hardware was given txbuf to write. * @txstart: Number of times hardware was told to start tx. * @txprocdesc: Number of times tx descriptor was processed * @txfailed: Out-of-memory or other errors in xmit path. */ struct ath_tx_stats { u32 tx_pkts_all; u32 tx_bytes_all; u32 queued; u32 completed; u32 xretries; u32 a_aggr; u32 a_queued_hw; u32 a_completed; u32 a_retries; u32 a_xretries; u32 txerr_filtered; u32 fifo_underrun; u32 xtxop; u32 timer_exp; u32 desc_cfg_err; u32 data_underrun; u32 delim_underrun; u32 puttxbuf; u32 txstart; u32 txprocdesc; u32 txfailed; }; /* * Various utility macros to print TX/Queue counters. */ #define PR_QNUM(_n) sc->tx.txq_map[_n]->axq_qnum #define TXSTATS sc->debug.stats.txstats #define PR(str, elem) \ do { \ seq_printf(file, "%s%13u%11u%10u%10u\n", str, \ TXSTATS[PR_QNUM(IEEE80211_AC_BE)].elem,\ TXSTATS[PR_QNUM(IEEE80211_AC_BK)].elem,\ TXSTATS[PR_QNUM(IEEE80211_AC_VI)].elem,\ TXSTATS[PR_QNUM(IEEE80211_AC_VO)].elem); \ } while(0) struct ath_rx_rate_stats { struct { u32 ht20_cnt; u32 ht40_cnt; u32 sgi_cnt; u32 lgi_cnt; } ht_stats[24]; struct { u32 ofdm_cnt; } ofdm_stats[8]; struct { u32 cck_lp_cnt; u32 cck_sp_cnt; } cck_stats[4]; }; struct ath_airtime_stats { u32 rx_airtime; u32 tx_airtime; }; #define ANT_MAIN 0 #define ANT_ALT 1 struct ath_antenna_stats { u32 recv_cnt; u32 rssi_avg; u32 lna_recv_cnt[4]; u32 lna_attempt_cnt[4]; }; struct ath_stats { struct ath_interrupt_stats istats; struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; struct ath_rx_stats rxstats; struct ath_dfs_stats dfs_stats; struct ath_antenna_stats ant_stats[2]; u32 reset[__RESET_TYPE_MAX]; }; struct ath9k_debug { struct dentry *debugfs_phy; u32 regidx; struct ath_stats stats; }; int ath9k_init_debug(struct ath_hw *ah); void ath9k_deinit_debug(struct ath_softc *sc); void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, struct ath_tx_status *ts, struct ath_txq *txq, unsigned int flags); void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs); int ath9k_get_et_sset_count(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int sset); void ath9k_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ethtool_stats *stats, u64 *data); void ath9k_get_et_strings(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 sset, u8 *data); void ath9k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct dentry *dir); void ath9k_debug_stat_ant(struct ath_softc *sc, struct ath_hw_antcomb_conf *div_ant_conf, int main_rssi_avg, int alt_rssi_avg); void ath9k_debug_sync_cause(struct ath_softc *sc, u32 sync_cause); #else static inline int ath9k_init_debug(struct ath_hw *ah) { return 0; } static inline void ath9k_deinit_debug(struct ath_softc *sc) { } static inline void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) { } static inline void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, struct ath_tx_status *ts, struct ath_txq *txq, unsigned int flags) { } static inline void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) { } static inline void ath9k_debug_stat_ant(struct ath_softc *sc, struct ath_hw_antcomb_conf *div_ant_conf, int main_rssi_avg, int alt_rssi_avg) { } static inline void ath9k_debug_sync_cause(struct ath_softc *sc, u32 sync_cause) { } #endif /* CONFIG_ATH9K_DEBUGFS */ #ifdef CONFIG_ATH9K_STATION_STATISTICS void ath_debug_rate_stats(struct ath_softc *sc, struct ath_rx_status *rs, struct sk_buff *skb); void ath_debug_airtime(struct ath_softc *sc, struct ath_node *an, u32 rx, u32 tx); #else static inline void ath_debug_rate_stats(struct ath_softc *sc, struct ath_rx_status *rs, struct sk_buff *skb) { } static inline void ath_debug_airtime(struct ath_softc *sc, struct ath_node *an, u32 rx, u32 tx) { } #endif /* CONFIG_ATH9K_STATION_STATISTICS */ #endif /* DEBUG_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
You can’t perform that action at this time.
While the code is focused, press Alt+F1 for a menu of operations.