Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wl12xx: implement fw status debugfs entries

Implement the operations that are necessary to fetch the
wl12xx-specific FW statistics. Re-add some of the code removed from
wlcore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>

+496 -1
+1 -1
drivers/net/wireless/ti/wl12xx/Makefile
··· 1 - wl12xx-objs = main.o cmd.o acx.o 1 + wl12xx-objs = main.o cmd.o acx.o debugfs.o 2 2 3 3 obj-$(CONFIG_WL12XX) += wl12xx.o
+223
drivers/net/wireless/ti/wl12xx/acx.h
··· 24 24 #define __WL12XX_ACX_H__ 25 25 26 26 #include "../wlcore/wlcore.h" 27 + #include "../wlcore/acx.h" 27 28 28 29 struct wl1271_acx_host_config_bitmap { 29 30 struct acx_header header; 30 31 31 32 __le32 host_cfg_bitmap; 33 + } __packed; 34 + 35 + struct wl12xx_acx_tx_statistics { 36 + __le32 internal_desc_overflow; 37 + } __packed; 38 + 39 + struct wl12xx_acx_rx_statistics { 40 + __le32 out_of_mem; 41 + __le32 hdr_overflow; 42 + __le32 hw_stuck; 43 + __le32 dropped; 44 + __le32 fcs_err; 45 + __le32 xfr_hint_trig; 46 + __le32 path_reset; 47 + __le32 reset_counter; 48 + } __packed; 49 + 50 + struct wl12xx_acx_dma_statistics { 51 + __le32 rx_requested; 52 + __le32 rx_errors; 53 + __le32 tx_requested; 54 + __le32 tx_errors; 55 + } __packed; 56 + 57 + struct wl12xx_acx_isr_statistics { 58 + /* host command complete */ 59 + __le32 cmd_cmplt; 60 + 61 + /* fiqisr() */ 62 + __le32 fiqs; 63 + 64 + /* (INT_STS_ND & INT_TRIG_RX_HEADER) */ 65 + __le32 rx_headers; 66 + 67 + /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */ 68 + __le32 rx_completes; 69 + 70 + /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */ 71 + __le32 rx_mem_overflow; 72 + 73 + /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */ 74 + __le32 rx_rdys; 75 + 76 + /* irqisr() */ 77 + __le32 irqs; 78 + 79 + /* (INT_STS_ND & INT_TRIG_TX_PROC) */ 80 + __le32 tx_procs; 81 + 82 + /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */ 83 + __le32 decrypt_done; 84 + 85 + /* (INT_STS_ND & INT_TRIG_DMA0) */ 86 + __le32 dma0_done; 87 + 88 + /* (INT_STS_ND & INT_TRIG_DMA1) */ 89 + __le32 dma1_done; 90 + 91 + /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */ 92 + __le32 tx_exch_complete; 93 + 94 + /* (INT_STS_ND & INT_TRIG_COMMAND) */ 95 + __le32 commands; 96 + 97 + /* (INT_STS_ND & INT_TRIG_RX_PROC) */ 98 + __le32 rx_procs; 99 + 100 + /* (INT_STS_ND & INT_TRIG_PM_802) */ 101 + __le32 hw_pm_mode_changes; 102 + 103 + /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */ 104 + __le32 host_acknowledges; 105 + 106 + /* (INT_STS_ND & INT_TRIG_PM_PCI) */ 107 + __le32 pci_pm; 108 + 109 + /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */ 110 + __le32 wakeups; 111 + 112 + /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */ 113 + __le32 low_rssi; 114 + } __packed; 115 + 116 + struct wl12xx_acx_wep_statistics { 117 + /* WEP address keys configured */ 118 + __le32 addr_key_count; 119 + 120 + /* default keys configured */ 121 + __le32 default_key_count; 122 + 123 + __le32 reserved; 124 + 125 + /* number of times that WEP key not found on lookup */ 126 + __le32 key_not_found; 127 + 128 + /* number of times that WEP key decryption failed */ 129 + __le32 decrypt_fail; 130 + 131 + /* WEP packets decrypted */ 132 + __le32 packets; 133 + 134 + /* WEP decrypt interrupts */ 135 + __le32 interrupt; 136 + } __packed; 137 + 138 + #define ACX_MISSED_BEACONS_SPREAD 10 139 + 140 + struct wl12xx_acx_pwr_statistics { 141 + /* the amount of enters into power save mode (both PD & ELP) */ 142 + __le32 ps_enter; 143 + 144 + /* the amount of enters into ELP mode */ 145 + __le32 elp_enter; 146 + 147 + /* the amount of missing beacon interrupts to the host */ 148 + __le32 missing_bcns; 149 + 150 + /* the amount of wake on host-access times */ 151 + __le32 wake_on_host; 152 + 153 + /* the amount of wake on timer-expire */ 154 + __le32 wake_on_timer_exp; 155 + 156 + /* the number of packets that were transmitted with PS bit set */ 157 + __le32 tx_with_ps; 158 + 159 + /* the number of packets that were transmitted with PS bit clear */ 160 + __le32 tx_without_ps; 161 + 162 + /* the number of received beacons */ 163 + __le32 rcvd_beacons; 164 + 165 + /* the number of entering into PowerOn (power save off) */ 166 + __le32 power_save_off; 167 + 168 + /* the number of entries into power save mode */ 169 + __le16 enable_ps; 170 + 171 + /* 172 + * the number of exits from power save, not including failed PS 173 + * transitions 174 + */ 175 + __le16 disable_ps; 176 + 177 + /* 178 + * the number of times the TSF counter was adjusted because 179 + * of drift 180 + */ 181 + __le32 fix_tsf_ps; 182 + 183 + /* Gives statistics about the spread continuous missed beacons. 184 + * The 16 LSB are dedicated for the PS mode. 185 + * The 16 MSB are dedicated for the PS mode. 186 + * cont_miss_bcns_spread[0] - single missed beacon. 187 + * cont_miss_bcns_spread[1] - two continuous missed beacons. 188 + * cont_miss_bcns_spread[2] - three continuous missed beacons. 189 + * ... 190 + * cont_miss_bcns_spread[9] - ten and more continuous missed beacons. 191 + */ 192 + __le32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD]; 193 + 194 + /* the number of beacons in awake mode */ 195 + __le32 rcvd_awake_beacons; 196 + } __packed; 197 + 198 + struct wl12xx_acx_mic_statistics { 199 + __le32 rx_pkts; 200 + __le32 calc_failure; 201 + } __packed; 202 + 203 + struct wl12xx_acx_aes_statistics { 204 + __le32 encrypt_fail; 205 + __le32 decrypt_fail; 206 + __le32 encrypt_packets; 207 + __le32 decrypt_packets; 208 + __le32 encrypt_interrupt; 209 + __le32 decrypt_interrupt; 210 + } __packed; 211 + 212 + struct wl12xx_acx_event_statistics { 213 + __le32 heart_beat; 214 + __le32 calibration; 215 + __le32 rx_mismatch; 216 + __le32 rx_mem_empty; 217 + __le32 rx_pool; 218 + __le32 oom_late; 219 + __le32 phy_transmit_error; 220 + __le32 tx_stuck; 221 + } __packed; 222 + 223 + struct wl12xx_acx_ps_statistics { 224 + __le32 pspoll_timeouts; 225 + __le32 upsd_timeouts; 226 + __le32 upsd_max_sptime; 227 + __le32 upsd_max_apturn; 228 + __le32 pspoll_max_apturn; 229 + __le32 pspoll_utilization; 230 + __le32 upsd_utilization; 231 + } __packed; 232 + 233 + struct wl12xx_acx_rxpipe_statistics { 234 + __le32 rx_prep_beacon_drop; 235 + __le32 descr_host_int_trig_rx_data; 236 + __le32 beacon_buffer_thres_host_int_trig_rx_data; 237 + __le32 missed_beacon_host_int_trig_rx_data; 238 + __le32 tx_xfr_host_int_trig_rx_data; 239 + } __packed; 240 + 241 + struct wl12xx_acx_statistics { 242 + struct acx_header header; 243 + 244 + struct wl12xx_acx_tx_statistics tx; 245 + struct wl12xx_acx_rx_statistics rx; 246 + struct wl12xx_acx_dma_statistics dma; 247 + struct wl12xx_acx_isr_statistics isr; 248 + struct wl12xx_acx_wep_statistics wep; 249 + struct wl12xx_acx_pwr_statistics pwr; 250 + struct wl12xx_acx_aes_statistics aes; 251 + struct wl12xx_acx_mic_statistics mic; 252 + struct wl12xx_acx_event_statistics event; 253 + struct wl12xx_acx_ps_statistics ps; 254 + struct wl12xx_acx_rxpipe_statistics rxpipe; 32 255 } __packed; 33 256 34 257 int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap);
+236
drivers/net/wireless/ti/wl12xx/debugfs.c
··· 1 + /* 2 + * This file is part of wl12xx 3 + * 4 + * Copyright (C) 2009 Nokia Corporation 5 + * Copyright (C) 2011-2012 Texas Instruments 6 + * 7 + * This program is free software; you can redistribute it and/or 8 + * modify it under the terms of the GNU General Public License 9 + * version 2 as published by the Free Software Foundation. 10 + * 11 + * This program is distributed in the hope that it will be useful, but 12 + * WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 + * General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 + * 02110-1301 USA 20 + * 21 + */ 22 + 23 + #include "../wlcore/debugfs.h" 24 + #include "../wlcore/wlcore.h" 25 + 26 + #include "wl12xx.h" 27 + #include "acx.h" 28 + 29 + #define WL12XX_DEBUGFS_FWSTATS_FILE(a, b, c) \ 30 + DEBUGFS_FWSTATS_FILE(a, b, c, wl12xx_acx_statistics) 31 + 32 + WL12XX_DEBUGFS_FWSTATS_FILE(tx, internal_desc_overflow, "%u"); 33 + 34 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, out_of_mem, "%u"); 35 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, hdr_overflow, "%u"); 36 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, hw_stuck, "%u"); 37 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, dropped, "%u"); 38 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, fcs_err, "%u"); 39 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, xfr_hint_trig, "%u"); 40 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, path_reset, "%u"); 41 + WL12XX_DEBUGFS_FWSTATS_FILE(rx, reset_counter, "%u"); 42 + 43 + WL12XX_DEBUGFS_FWSTATS_FILE(dma, rx_requested, "%u"); 44 + WL12XX_DEBUGFS_FWSTATS_FILE(dma, rx_errors, "%u"); 45 + WL12XX_DEBUGFS_FWSTATS_FILE(dma, tx_requested, "%u"); 46 + WL12XX_DEBUGFS_FWSTATS_FILE(dma, tx_errors, "%u"); 47 + 48 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, cmd_cmplt, "%u"); 49 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, fiqs, "%u"); 50 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, rx_headers, "%u"); 51 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, rx_mem_overflow, "%u"); 52 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, rx_rdys, "%u"); 53 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, irqs, "%u"); 54 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, tx_procs, "%u"); 55 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, decrypt_done, "%u"); 56 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, dma0_done, "%u"); 57 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, dma1_done, "%u"); 58 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, tx_exch_complete, "%u"); 59 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, commands, "%u"); 60 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, rx_procs, "%u"); 61 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, hw_pm_mode_changes, "%u"); 62 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, host_acknowledges, "%u"); 63 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, pci_pm, "%u"); 64 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, wakeups, "%u"); 65 + WL12XX_DEBUGFS_FWSTATS_FILE(isr, low_rssi, "%u"); 66 + 67 + WL12XX_DEBUGFS_FWSTATS_FILE(wep, addr_key_count, "%u"); 68 + WL12XX_DEBUGFS_FWSTATS_FILE(wep, default_key_count, "%u"); 69 + /* skipping wep.reserved */ 70 + WL12XX_DEBUGFS_FWSTATS_FILE(wep, key_not_found, "%u"); 71 + WL12XX_DEBUGFS_FWSTATS_FILE(wep, decrypt_fail, "%u"); 72 + WL12XX_DEBUGFS_FWSTATS_FILE(wep, packets, "%u"); 73 + WL12XX_DEBUGFS_FWSTATS_FILE(wep, interrupt, "%u"); 74 + 75 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, ps_enter, "%u"); 76 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, elp_enter, "%u"); 77 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, missing_bcns, "%u"); 78 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, wake_on_host, "%u"); 79 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, wake_on_timer_exp, "%u"); 80 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, tx_with_ps, "%u"); 81 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, tx_without_ps, "%u"); 82 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, rcvd_beacons, "%u"); 83 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, power_save_off, "%u"); 84 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, enable_ps, "%u"); 85 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, disable_ps, "%u"); 86 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, fix_tsf_ps, "%u"); 87 + /* skipping cont_miss_bcns_spread for now */ 88 + WL12XX_DEBUGFS_FWSTATS_FILE(pwr, rcvd_awake_beacons, "%u"); 89 + 90 + WL12XX_DEBUGFS_FWSTATS_FILE(mic, rx_pkts, "%u"); 91 + WL12XX_DEBUGFS_FWSTATS_FILE(mic, calc_failure, "%u"); 92 + 93 + WL12XX_DEBUGFS_FWSTATS_FILE(aes, encrypt_fail, "%u"); 94 + WL12XX_DEBUGFS_FWSTATS_FILE(aes, decrypt_fail, "%u"); 95 + WL12XX_DEBUGFS_FWSTATS_FILE(aes, encrypt_packets, "%u"); 96 + WL12XX_DEBUGFS_FWSTATS_FILE(aes, decrypt_packets, "%u"); 97 + WL12XX_DEBUGFS_FWSTATS_FILE(aes, encrypt_interrupt, "%u"); 98 + WL12XX_DEBUGFS_FWSTATS_FILE(aes, decrypt_interrupt, "%u"); 99 + 100 + WL12XX_DEBUGFS_FWSTATS_FILE(event, heart_beat, "%u"); 101 + WL12XX_DEBUGFS_FWSTATS_FILE(event, calibration, "%u"); 102 + WL12XX_DEBUGFS_FWSTATS_FILE(event, rx_mismatch, "%u"); 103 + WL12XX_DEBUGFS_FWSTATS_FILE(event, rx_mem_empty, "%u"); 104 + WL12XX_DEBUGFS_FWSTATS_FILE(event, rx_pool, "%u"); 105 + WL12XX_DEBUGFS_FWSTATS_FILE(event, oom_late, "%u"); 106 + WL12XX_DEBUGFS_FWSTATS_FILE(event, phy_transmit_error, "%u"); 107 + WL12XX_DEBUGFS_FWSTATS_FILE(event, tx_stuck, "%u"); 108 + 109 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, pspoll_timeouts, "%u"); 110 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, upsd_timeouts, "%u"); 111 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, upsd_max_sptime, "%u"); 112 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, upsd_max_apturn, "%u"); 113 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, pspoll_max_apturn, "%u"); 114 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, pspoll_utilization, "%u"); 115 + WL12XX_DEBUGFS_FWSTATS_FILE(ps, upsd_utilization, "%u"); 116 + 117 + WL12XX_DEBUGFS_FWSTATS_FILE(rxpipe, rx_prep_beacon_drop, "%u"); 118 + WL12XX_DEBUGFS_FWSTATS_FILE(rxpipe, descr_host_int_trig_rx_data, "%u"); 119 + WL12XX_DEBUGFS_FWSTATS_FILE(rxpipe, beacon_buffer_thres_host_int_trig_rx_data, 120 + "%u"); 121 + WL12XX_DEBUGFS_FWSTATS_FILE(rxpipe, missed_beacon_host_int_trig_rx_data, "%u"); 122 + WL12XX_DEBUGFS_FWSTATS_FILE(rxpipe, tx_xfr_host_int_trig_rx_data, "%u"); 123 + 124 + int wl12xx_debugfs_add_files(struct wl1271 *wl, 125 + struct dentry *rootdir) 126 + { 127 + int ret = 0; 128 + struct dentry *entry, *stats; 129 + 130 + stats = debugfs_create_dir("wl12xx_fw_stats", rootdir); 131 + if (!stats || IS_ERR(stats)) { 132 + entry = stats; 133 + goto err; 134 + } 135 + 136 + DEBUGFS_FWSTATS_ADD(tx, internal_desc_overflow); 137 + 138 + DEBUGFS_FWSTATS_ADD(rx, out_of_mem); 139 + DEBUGFS_FWSTATS_ADD(rx, hdr_overflow); 140 + DEBUGFS_FWSTATS_ADD(rx, hw_stuck); 141 + DEBUGFS_FWSTATS_ADD(rx, dropped); 142 + DEBUGFS_FWSTATS_ADD(rx, fcs_err); 143 + DEBUGFS_FWSTATS_ADD(rx, xfr_hint_trig); 144 + DEBUGFS_FWSTATS_ADD(rx, path_reset); 145 + DEBUGFS_FWSTATS_ADD(rx, reset_counter); 146 + 147 + DEBUGFS_FWSTATS_ADD(dma, rx_requested); 148 + DEBUGFS_FWSTATS_ADD(dma, rx_errors); 149 + DEBUGFS_FWSTATS_ADD(dma, tx_requested); 150 + DEBUGFS_FWSTATS_ADD(dma, tx_errors); 151 + 152 + DEBUGFS_FWSTATS_ADD(isr, cmd_cmplt); 153 + DEBUGFS_FWSTATS_ADD(isr, fiqs); 154 + DEBUGFS_FWSTATS_ADD(isr, rx_headers); 155 + DEBUGFS_FWSTATS_ADD(isr, rx_mem_overflow); 156 + DEBUGFS_FWSTATS_ADD(isr, rx_rdys); 157 + DEBUGFS_FWSTATS_ADD(isr, irqs); 158 + DEBUGFS_FWSTATS_ADD(isr, tx_procs); 159 + DEBUGFS_FWSTATS_ADD(isr, decrypt_done); 160 + DEBUGFS_FWSTATS_ADD(isr, dma0_done); 161 + DEBUGFS_FWSTATS_ADD(isr, dma1_done); 162 + DEBUGFS_FWSTATS_ADD(isr, tx_exch_complete); 163 + DEBUGFS_FWSTATS_ADD(isr, commands); 164 + DEBUGFS_FWSTATS_ADD(isr, rx_procs); 165 + DEBUGFS_FWSTATS_ADD(isr, hw_pm_mode_changes); 166 + DEBUGFS_FWSTATS_ADD(isr, host_acknowledges); 167 + DEBUGFS_FWSTATS_ADD(isr, pci_pm); 168 + DEBUGFS_FWSTATS_ADD(isr, wakeups); 169 + DEBUGFS_FWSTATS_ADD(isr, low_rssi); 170 + 171 + DEBUGFS_FWSTATS_ADD(wep, addr_key_count); 172 + DEBUGFS_FWSTATS_ADD(wep, default_key_count); 173 + /* skipping wep.reserved */ 174 + DEBUGFS_FWSTATS_ADD(wep, key_not_found); 175 + DEBUGFS_FWSTATS_ADD(wep, decrypt_fail); 176 + DEBUGFS_FWSTATS_ADD(wep, packets); 177 + DEBUGFS_FWSTATS_ADD(wep, interrupt); 178 + 179 + DEBUGFS_FWSTATS_ADD(pwr, ps_enter); 180 + DEBUGFS_FWSTATS_ADD(pwr, elp_enter); 181 + DEBUGFS_FWSTATS_ADD(pwr, missing_bcns); 182 + DEBUGFS_FWSTATS_ADD(pwr, wake_on_host); 183 + DEBUGFS_FWSTATS_ADD(pwr, wake_on_timer_exp); 184 + DEBUGFS_FWSTATS_ADD(pwr, tx_with_ps); 185 + DEBUGFS_FWSTATS_ADD(pwr, tx_without_ps); 186 + DEBUGFS_FWSTATS_ADD(pwr, rcvd_beacons); 187 + DEBUGFS_FWSTATS_ADD(pwr, power_save_off); 188 + DEBUGFS_FWSTATS_ADD(pwr, enable_ps); 189 + DEBUGFS_FWSTATS_ADD(pwr, disable_ps); 190 + DEBUGFS_FWSTATS_ADD(pwr, fix_tsf_ps); 191 + /* skipping cont_miss_bcns_spread for now */ 192 + DEBUGFS_FWSTATS_ADD(pwr, rcvd_awake_beacons); 193 + 194 + DEBUGFS_FWSTATS_ADD(mic, rx_pkts); 195 + DEBUGFS_FWSTATS_ADD(mic, calc_failure); 196 + 197 + DEBUGFS_FWSTATS_ADD(aes, encrypt_fail); 198 + DEBUGFS_FWSTATS_ADD(aes, decrypt_fail); 199 + DEBUGFS_FWSTATS_ADD(aes, encrypt_packets); 200 + DEBUGFS_FWSTATS_ADD(aes, decrypt_packets); 201 + DEBUGFS_FWSTATS_ADD(aes, encrypt_interrupt); 202 + DEBUGFS_FWSTATS_ADD(aes, decrypt_interrupt); 203 + 204 + DEBUGFS_FWSTATS_ADD(event, heart_beat); 205 + DEBUGFS_FWSTATS_ADD(event, calibration); 206 + DEBUGFS_FWSTATS_ADD(event, rx_mismatch); 207 + DEBUGFS_FWSTATS_ADD(event, rx_mem_empty); 208 + DEBUGFS_FWSTATS_ADD(event, rx_pool); 209 + DEBUGFS_FWSTATS_ADD(event, oom_late); 210 + DEBUGFS_FWSTATS_ADD(event, phy_transmit_error); 211 + DEBUGFS_FWSTATS_ADD(event, tx_stuck); 212 + 213 + DEBUGFS_FWSTATS_ADD(ps, pspoll_timeouts); 214 + DEBUGFS_FWSTATS_ADD(ps, upsd_timeouts); 215 + DEBUGFS_FWSTATS_ADD(ps, upsd_max_sptime); 216 + DEBUGFS_FWSTATS_ADD(ps, upsd_max_apturn); 217 + DEBUGFS_FWSTATS_ADD(ps, pspoll_max_apturn); 218 + DEBUGFS_FWSTATS_ADD(ps, pspoll_utilization); 219 + DEBUGFS_FWSTATS_ADD(ps, upsd_utilization); 220 + 221 + DEBUGFS_FWSTATS_ADD(rxpipe, rx_prep_beacon_drop); 222 + DEBUGFS_FWSTATS_ADD(rxpipe, descr_host_int_trig_rx_data); 223 + DEBUGFS_FWSTATS_ADD(rxpipe, beacon_buffer_thres_host_int_trig_rx_data); 224 + DEBUGFS_FWSTATS_ADD(rxpipe, missed_beacon_host_int_trig_rx_data); 225 + DEBUGFS_FWSTATS_ADD(rxpipe, tx_xfr_host_int_trig_rx_data); 226 + 227 + return 0; 228 + 229 + err: 230 + if (IS_ERR(entry)) 231 + ret = PTR_ERR(entry); 232 + else 233 + ret = -ENOMEM; 234 + 235 + return ret; 236 + }
+28
drivers/net/wireless/ti/wl12xx/debugfs.h
··· 1 + /* 2 + * This file is part of wl12xx 3 + * 4 + * Copyright (C) 2012 Texas Instruments. All rights reserved. 5 + * 6 + * This program is free software; you can redistribute it and/or 7 + * modify it under the terms of the GNU General Public License 8 + * version 2 as published by the Free Software Foundation. 9 + * 10 + * This program is distributed in the hope that it will be useful, but 11 + * WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 + * General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 + * 02110-1301 USA 19 + * 20 + */ 21 + 22 + #ifndef __WL12XX_DEBUGFS_H__ 23 + #define __WL12XX_DEBUGFS_H__ 24 + 25 + int wl12xx_debugfs_add_files(struct wl1271 *wl, 26 + struct dentry *rootdir); 27 + 28 + #endif /* __WL12XX_DEBUGFS_H__ */
+8
drivers/net/wireless/ti/wl12xx/main.c
··· 39 39 #include "reg.h" 40 40 #include "cmd.h" 41 41 #include "acx.h" 42 + #include "debugfs.h" 42 43 43 44 static char *fref_param; 44 45 static char *tcxo_param; ··· 1360 1359 return ret; 1361 1360 } 1362 1361 1362 + static int wl12xx_debugfs_init(struct wl1271 *wl, struct dentry *rootdir) 1363 + { 1364 + return wl12xx_debugfs_add_files(wl, rootdir); 1365 + } 1366 + 1363 1367 static struct wlcore_ops wl12xx_ops = { 1364 1368 .identify_chip = wl12xx_identify_chip, 1365 1369 .identify_fw = wl12xx_identify_fw, ··· 1387 1381 .set_tx_desc_csum = wl12xx_set_tx_desc_csum, 1388 1382 .set_rx_csum = NULL, 1389 1383 .ap_get_mimo_wide_rate_mask = NULL, 1384 + .debugfs_init = wl12xx_debugfs_init, 1390 1385 }; 1391 1386 1392 1387 static struct ieee80211_sta_ht_cap wl12xx_ht_cap = { ··· 1429 1422 wl->hw_tx_rate_tbl_size = WL12XX_CONF_HW_RXTX_RATE_MAX; 1430 1423 wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0; 1431 1424 wl->fw_status_priv_len = 0; 1425 + wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); 1432 1426 memcpy(&wl->ht_cap, &wl12xx_ht_cap, sizeof(wl12xx_ht_cap)); 1433 1427 wl12xx_conf_init(wl); 1434 1428