Luciano Coelho | 8c0ea10 | 2012-05-10 12:14:09 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of wl18xx |
| 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 "wl18xx.h" |
| 27 | #include "acx.h" |
| 28 | #include "debugfs.h" |
| 29 | |
| 30 | #define WL18XX_DEBUGFS_FWSTATS_FILE(a, b, c) \ |
| 31 | DEBUGFS_FWSTATS_FILE(a, b, c, wl18xx_acx_statistics) |
| 32 | #define WL18XX_DEBUGFS_FWSTATS_FILE_ARRAY(a, b, c) \ |
| 33 | DEBUGFS_FWSTATS_FILE_ARRAY(a, b, c, wl18xx_acx_statistics) |
| 34 | |
| 35 | WL18XX_DEBUGFS_FWSTATS_FILE(debug, debug1, "%u"); |
| 36 | WL18XX_DEBUGFS_FWSTATS_FILE(debug, debug2, "%u"); |
| 37 | WL18XX_DEBUGFS_FWSTATS_FILE(debug, debug3, "%u"); |
| 38 | WL18XX_DEBUGFS_FWSTATS_FILE(debug, debug4, "%u"); |
| 39 | WL18XX_DEBUGFS_FWSTATS_FILE(debug, debug5, "%u"); |
| 40 | WL18XX_DEBUGFS_FWSTATS_FILE(debug, debug6, "%u"); |
| 41 | |
| 42 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, tx_procs, "%u"); |
| 43 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, prepared_descs, "%u"); |
| 44 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, tx_xfr, "%u"); |
| 45 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, tx_dma, "%u"); |
| 46 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, tx_cmplt, "%u"); |
| 47 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, rx_procs, "%u"); |
| 48 | WL18XX_DEBUGFS_FWSTATS_FILE(ring, rx_data, "%u"); |
| 49 | |
| 50 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_template_prepared, "%u"); |
| 51 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_data_prepared, "%u"); |
| 52 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_template_programmed, "%u"); |
| 53 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_data_programmed, "%u"); |
| 54 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_burst_programmed, "%u"); |
| 55 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_starts, "%u"); |
| 56 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_imm_resp, "%u"); |
| 57 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_start_templates, "%u"); |
| 58 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_start_int_templates, "%u"); |
| 59 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_start_fw_gen, "%u"); |
| 60 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_start_data, "%u"); |
| 61 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_start_null_frame, "%u"); |
| 62 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_exch, "%u"); |
| 63 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_retry_template, "%u"); |
| 64 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_retry_data, "%u"); |
| 65 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_exch_pending, "%u"); |
| 66 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_exch_expiry, "%u"); |
| 67 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_exch_mismatch, "%u"); |
| 68 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_done_template, "%u"); |
| 69 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_done_data, "%u"); |
| 70 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_done_int_template, "%u"); |
| 71 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_pre_xfr, "%u"); |
| 72 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_xfr, "%u"); |
| 73 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_xfr_out_of_mem, "%u"); |
| 74 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_dma_programmed, "%u"); |
| 75 | WL18XX_DEBUGFS_FWSTATS_FILE(tx, tx_dma_done, "%u"); |
| 76 | |
| 77 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_out_of_mem, "%u"); |
| 78 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_hdr_overflow, "%u"); |
| 79 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_hw_stuck, "%u"); |
| 80 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_dropped_frame, "%u"); |
| 81 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_complete_dropped_frame, "%u"); |
| 82 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_alloc_frame, "%u"); |
| 83 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_done_queue, "%u"); |
| 84 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_done, "%u"); |
| 85 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_defrag, "%u"); |
| 86 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_defrag_end, "%u"); |
| 87 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_mic, "%u"); |
| 88 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_mic_end, "%u"); |
| 89 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_xfr, "%u"); |
| 90 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_xfr_end, "%u"); |
| 91 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_cmplt, "%u"); |
| 92 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_pre_complt, "%u"); |
| 93 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_cmplt_task, "%u"); |
| 94 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_phy_hdr, "%u"); |
| 95 | WL18XX_DEBUGFS_FWSTATS_FILE(rx, rx_timeout, "%u"); |
| 96 | |
| 97 | WL18XX_DEBUGFS_FWSTATS_FILE(dma, rx_dma_errors, "%u"); |
| 98 | WL18XX_DEBUGFS_FWSTATS_FILE(dma, tx_dma_errors, "%u"); |
| 99 | |
| 100 | WL18XX_DEBUGFS_FWSTATS_FILE(isr, irqs, "%u"); |
| 101 | |
| 102 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_add_key_count, "%u"); |
| 103 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_default_key_count, "%u"); |
| 104 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_key_not_found, "%u"); |
| 105 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_decrypt_fail, "%u"); |
| 106 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_encrypt_fail, "%u"); |
| 107 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_dec_packets, "%u"); |
| 108 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_dec_interrupt, "%u"); |
| 109 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_enc_packets, "%u"); |
| 110 | WL18XX_DEBUGFS_FWSTATS_FILE(wep, wep_enc_interrupts, "%u"); |
| 111 | |
| 112 | WL18XX_DEBUGFS_FWSTATS_FILE(pwr, missing_bcns_cnt, "%u"); |
| 113 | WL18XX_DEBUGFS_FWSTATS_FILE(pwr, rcvd_bcns_cnt, "%u"); |
| 114 | WL18XX_DEBUGFS_FWSTATS_FILE(pwr, connection_out_of_sync, "%u"); |
| 115 | WL18XX_DEBUGFS_FWSTATS_FILE_ARRAY(pwr, cont_miss_bcns_spread, |
| 116 | PWR_STAT_MAX_CONT_MISSED_BCNS_SPREAD); |
| 117 | WL18XX_DEBUGFS_FWSTATS_FILE(pwr, rcvd_awake_bcns_cnt, "%u"); |
| 118 | |
| 119 | WL18XX_DEBUGFS_FWSTATS_FILE(mic, mic_rx_pkts, "%u"); |
| 120 | WL18XX_DEBUGFS_FWSTATS_FILE(mic, mic_calc_failure, "%u"); |
| 121 | |
| 122 | WL18XX_DEBUGFS_FWSTATS_FILE(aes, aes_encrypt_fail, "%u"); |
| 123 | WL18XX_DEBUGFS_FWSTATS_FILE(aes, aes_decrypt_fail, "%u"); |
| 124 | WL18XX_DEBUGFS_FWSTATS_FILE(aes, aes_encrypt_packets, "%u"); |
| 125 | WL18XX_DEBUGFS_FWSTATS_FILE(aes, aes_decrypt_packets, "%u"); |
| 126 | WL18XX_DEBUGFS_FWSTATS_FILE(aes, aes_encrypt_interrupt, "%u"); |
| 127 | WL18XX_DEBUGFS_FWSTATS_FILE(aes, aes_decrypt_interrupt, "%u"); |
| 128 | |
| 129 | WL18XX_DEBUGFS_FWSTATS_FILE(gem, gem_encrypt_fail, "%u"); |
| 130 | WL18XX_DEBUGFS_FWSTATS_FILE(gem, gem_decrypt_fail, "%u"); |
| 131 | WL18XX_DEBUGFS_FWSTATS_FILE(gem, gem_encrypt_packets, "%u"); |
| 132 | WL18XX_DEBUGFS_FWSTATS_FILE(gem, gem_decrypt_packets, "%u"); |
| 133 | WL18XX_DEBUGFS_FWSTATS_FILE(gem, gem_encrypt_interrupt, "%u"); |
| 134 | WL18XX_DEBUGFS_FWSTATS_FILE(gem, gem_decrypt_interrupt, "%u"); |
| 135 | |
| 136 | WL18XX_DEBUGFS_FWSTATS_FILE(event, calibration, "%u"); |
| 137 | WL18XX_DEBUGFS_FWSTATS_FILE(event, rx_mismatch, "%u"); |
| 138 | WL18XX_DEBUGFS_FWSTATS_FILE(event, rx_mem_empty, "%u"); |
| 139 | |
| 140 | WL18XX_DEBUGFS_FWSTATS_FILE(ps_poll, ps_poll_timeouts, "%u"); |
| 141 | WL18XX_DEBUGFS_FWSTATS_FILE(ps_poll, upsd_timeouts, "%u"); |
| 142 | WL18XX_DEBUGFS_FWSTATS_FILE(ps_poll, upsd_max_ap_turn, "%u"); |
| 143 | WL18XX_DEBUGFS_FWSTATS_FILE(ps_poll, ps_poll_max_ap_turn, "%u"); |
| 144 | WL18XX_DEBUGFS_FWSTATS_FILE(ps_poll, ps_poll_utilization, "%u"); |
| 145 | WL18XX_DEBUGFS_FWSTATS_FILE(ps_poll, upsd_utilization, "%u"); |
| 146 | |
| 147 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, beacon_filter, "%u"); |
| 148 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, arp_filter, "%u"); |
| 149 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, mc_filter, "%u"); |
| 150 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, dup_filter, "%u"); |
| 151 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, data_filter, "%u"); |
| 152 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, ibss_filter, "%u"); |
| 153 | WL18XX_DEBUGFS_FWSTATS_FILE(rx_filter, protection_filter, "%u"); |
| 154 | |
| 155 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, init_cal_total, "%u"); |
| 156 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, init_radio_bands_fail, "%u"); |
| 157 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, init_set_params, "%u"); |
| 158 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, init_tx_clpc_fail, "%u"); |
| 159 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, init_rx_iw_mm_fail, "%u"); |
| 160 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_cal_total, "%u"); |
| 161 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_rtrim_fail, "%u"); |
| 162 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_pd_buf_fail, "%u"); |
| 163 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_tx_mix_freq_fail, "%u"); |
| 164 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_ta_cal, "%u"); |
| 165 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_rx_if_2_gain, "%u"); |
| 166 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_rx_dac, "%u"); |
| 167 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_chan_tune, "%u"); |
| 168 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_rx_tx_lpf, "%u"); |
| 169 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_drpw_lna_tank, "%u"); |
| 170 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_tx_lo_leak_fail, "%u"); |
| 171 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_tx_iq_mm_fail, "%u"); |
| 172 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_tx_pdet_fail, "%u"); |
| 173 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_tx_ppa_fail, "%u"); |
| 174 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_tx_clpc_fail, "%u"); |
| 175 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_rx_ana_dc_fail, "%u"); |
| 176 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_rx_dig_dc_fail, "%u"); |
| 177 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, tune_rx_iq_mm_fail, "%u"); |
| 178 | WL18XX_DEBUGFS_FWSTATS_FILE(calibration, cal_state_fail, "%u"); |
| 179 | |
| 180 | int wl18xx_debugfs_add_files(struct wl1271 *wl, |
| 181 | struct dentry *rootdir) |
| 182 | { |
| 183 | int ret = 0; |
Luciano Coelho | ad62d81 | 2012-05-10 12:14:19 +0300 | [diff] [blame^] | 184 | struct dentry *entry, *stats, *moddir; |
Luciano Coelho | 8c0ea10 | 2012-05-10 12:14:09 +0300 | [diff] [blame] | 185 | |
Luciano Coelho | ad62d81 | 2012-05-10 12:14:19 +0300 | [diff] [blame^] | 186 | moddir = debugfs_create_dir(KBUILD_MODNAME, rootdir); |
| 187 | if (!moddir || IS_ERR(moddir)) { |
| 188 | entry = moddir; |
| 189 | goto err; |
| 190 | } |
| 191 | |
| 192 | stats = debugfs_create_dir("fw_stats", moddir); |
Luciano Coelho | 8c0ea10 | 2012-05-10 12:14:09 +0300 | [diff] [blame] | 193 | if (!stats || IS_ERR(stats)) { |
| 194 | entry = stats; |
| 195 | goto err; |
| 196 | } |
| 197 | |
| 198 | DEBUGFS_FWSTATS_ADD(debug, debug1); |
| 199 | DEBUGFS_FWSTATS_ADD(debug, debug2); |
| 200 | DEBUGFS_FWSTATS_ADD(debug, debug3); |
| 201 | DEBUGFS_FWSTATS_ADD(debug, debug4); |
| 202 | DEBUGFS_FWSTATS_ADD(debug, debug5); |
| 203 | DEBUGFS_FWSTATS_ADD(debug, debug6); |
| 204 | |
| 205 | DEBUGFS_FWSTATS_ADD(ring, tx_procs); |
| 206 | DEBUGFS_FWSTATS_ADD(ring, prepared_descs); |
| 207 | DEBUGFS_FWSTATS_ADD(ring, tx_xfr); |
| 208 | DEBUGFS_FWSTATS_ADD(ring, tx_dma); |
| 209 | DEBUGFS_FWSTATS_ADD(ring, tx_cmplt); |
| 210 | DEBUGFS_FWSTATS_ADD(ring, rx_procs); |
| 211 | DEBUGFS_FWSTATS_ADD(ring, rx_data); |
| 212 | |
| 213 | DEBUGFS_FWSTATS_ADD(tx, tx_template_prepared); |
| 214 | DEBUGFS_FWSTATS_ADD(tx, tx_data_prepared); |
| 215 | DEBUGFS_FWSTATS_ADD(tx, tx_template_programmed); |
| 216 | DEBUGFS_FWSTATS_ADD(tx, tx_data_programmed); |
| 217 | DEBUGFS_FWSTATS_ADD(tx, tx_burst_programmed); |
| 218 | DEBUGFS_FWSTATS_ADD(tx, tx_starts); |
| 219 | DEBUGFS_FWSTATS_ADD(tx, tx_imm_resp); |
| 220 | DEBUGFS_FWSTATS_ADD(tx, tx_start_templates); |
| 221 | DEBUGFS_FWSTATS_ADD(tx, tx_start_int_templates); |
| 222 | DEBUGFS_FWSTATS_ADD(tx, tx_start_fw_gen); |
| 223 | DEBUGFS_FWSTATS_ADD(tx, tx_start_data); |
| 224 | DEBUGFS_FWSTATS_ADD(tx, tx_start_null_frame); |
| 225 | DEBUGFS_FWSTATS_ADD(tx, tx_exch); |
| 226 | DEBUGFS_FWSTATS_ADD(tx, tx_retry_template); |
| 227 | DEBUGFS_FWSTATS_ADD(tx, tx_retry_data); |
| 228 | DEBUGFS_FWSTATS_ADD(tx, tx_exch_pending); |
| 229 | DEBUGFS_FWSTATS_ADD(tx, tx_exch_expiry); |
| 230 | DEBUGFS_FWSTATS_ADD(tx, tx_exch_mismatch); |
| 231 | DEBUGFS_FWSTATS_ADD(tx, tx_done_template); |
| 232 | DEBUGFS_FWSTATS_ADD(tx, tx_done_data); |
| 233 | DEBUGFS_FWSTATS_ADD(tx, tx_done_int_template); |
| 234 | DEBUGFS_FWSTATS_ADD(tx, tx_pre_xfr); |
| 235 | DEBUGFS_FWSTATS_ADD(tx, tx_xfr); |
| 236 | DEBUGFS_FWSTATS_ADD(tx, tx_xfr_out_of_mem); |
| 237 | DEBUGFS_FWSTATS_ADD(tx, tx_dma_programmed); |
| 238 | DEBUGFS_FWSTATS_ADD(tx, tx_dma_done); |
| 239 | |
| 240 | DEBUGFS_FWSTATS_ADD(rx, rx_out_of_mem); |
| 241 | DEBUGFS_FWSTATS_ADD(rx, rx_hdr_overflow); |
| 242 | DEBUGFS_FWSTATS_ADD(rx, rx_hw_stuck); |
| 243 | DEBUGFS_FWSTATS_ADD(rx, rx_dropped_frame); |
| 244 | DEBUGFS_FWSTATS_ADD(rx, rx_complete_dropped_frame); |
| 245 | DEBUGFS_FWSTATS_ADD(rx, rx_alloc_frame); |
| 246 | DEBUGFS_FWSTATS_ADD(rx, rx_done_queue); |
| 247 | DEBUGFS_FWSTATS_ADD(rx, rx_done); |
| 248 | DEBUGFS_FWSTATS_ADD(rx, rx_defrag); |
| 249 | DEBUGFS_FWSTATS_ADD(rx, rx_defrag_end); |
| 250 | DEBUGFS_FWSTATS_ADD(rx, rx_mic); |
| 251 | DEBUGFS_FWSTATS_ADD(rx, rx_mic_end); |
| 252 | DEBUGFS_FWSTATS_ADD(rx, rx_xfr); |
| 253 | DEBUGFS_FWSTATS_ADD(rx, rx_xfr_end); |
| 254 | DEBUGFS_FWSTATS_ADD(rx, rx_cmplt); |
| 255 | DEBUGFS_FWSTATS_ADD(rx, rx_pre_complt); |
| 256 | DEBUGFS_FWSTATS_ADD(rx, rx_cmplt_task); |
| 257 | DEBUGFS_FWSTATS_ADD(rx, rx_phy_hdr); |
| 258 | DEBUGFS_FWSTATS_ADD(rx, rx_timeout); |
| 259 | |
| 260 | DEBUGFS_FWSTATS_ADD(dma, rx_dma_errors); |
| 261 | DEBUGFS_FWSTATS_ADD(dma, tx_dma_errors); |
| 262 | |
| 263 | DEBUGFS_FWSTATS_ADD(isr, irqs); |
| 264 | |
| 265 | DEBUGFS_FWSTATS_ADD(wep, wep_add_key_count); |
| 266 | DEBUGFS_FWSTATS_ADD(wep, wep_default_key_count); |
| 267 | DEBUGFS_FWSTATS_ADD(wep, wep_key_not_found); |
| 268 | DEBUGFS_FWSTATS_ADD(wep, wep_decrypt_fail); |
| 269 | DEBUGFS_FWSTATS_ADD(wep, wep_encrypt_fail); |
| 270 | DEBUGFS_FWSTATS_ADD(wep, wep_dec_packets); |
| 271 | DEBUGFS_FWSTATS_ADD(wep, wep_dec_interrupt); |
| 272 | DEBUGFS_FWSTATS_ADD(wep, wep_enc_packets); |
| 273 | DEBUGFS_FWSTATS_ADD(wep, wep_enc_interrupts); |
| 274 | |
| 275 | DEBUGFS_FWSTATS_ADD(pwr, missing_bcns_cnt); |
| 276 | DEBUGFS_FWSTATS_ADD(pwr, rcvd_bcns_cnt); |
| 277 | DEBUGFS_FWSTATS_ADD(pwr, connection_out_of_sync); |
| 278 | DEBUGFS_FWSTATS_ADD(pwr, cont_miss_bcns_spread); |
| 279 | DEBUGFS_FWSTATS_ADD(pwr, rcvd_awake_bcns_cnt); |
| 280 | |
| 281 | DEBUGFS_FWSTATS_ADD(mic, mic_rx_pkts); |
| 282 | DEBUGFS_FWSTATS_ADD(mic, mic_calc_failure); |
| 283 | |
| 284 | DEBUGFS_FWSTATS_ADD(aes, aes_encrypt_fail); |
| 285 | DEBUGFS_FWSTATS_ADD(aes, aes_decrypt_fail); |
| 286 | DEBUGFS_FWSTATS_ADD(aes, aes_encrypt_packets); |
| 287 | DEBUGFS_FWSTATS_ADD(aes, aes_decrypt_packets); |
| 288 | DEBUGFS_FWSTATS_ADD(aes, aes_encrypt_interrupt); |
| 289 | DEBUGFS_FWSTATS_ADD(aes, aes_decrypt_interrupt); |
| 290 | |
| 291 | DEBUGFS_FWSTATS_ADD(gem, gem_encrypt_fail); |
| 292 | DEBUGFS_FWSTATS_ADD(gem, gem_decrypt_fail); |
| 293 | DEBUGFS_FWSTATS_ADD(gem, gem_encrypt_packets); |
| 294 | DEBUGFS_FWSTATS_ADD(gem, gem_decrypt_packets); |
| 295 | DEBUGFS_FWSTATS_ADD(gem, gem_encrypt_interrupt); |
| 296 | DEBUGFS_FWSTATS_ADD(gem, gem_decrypt_interrupt); |
| 297 | |
| 298 | DEBUGFS_FWSTATS_ADD(event, calibration); |
| 299 | DEBUGFS_FWSTATS_ADD(event, rx_mismatch); |
| 300 | DEBUGFS_FWSTATS_ADD(event, rx_mem_empty); |
| 301 | |
| 302 | DEBUGFS_FWSTATS_ADD(ps_poll, ps_poll_timeouts); |
| 303 | DEBUGFS_FWSTATS_ADD(ps_poll, upsd_timeouts); |
| 304 | DEBUGFS_FWSTATS_ADD(ps_poll, upsd_max_ap_turn); |
| 305 | DEBUGFS_FWSTATS_ADD(ps_poll, ps_poll_max_ap_turn); |
| 306 | DEBUGFS_FWSTATS_ADD(ps_poll, ps_poll_utilization); |
| 307 | DEBUGFS_FWSTATS_ADD(ps_poll, upsd_utilization); |
| 308 | |
| 309 | DEBUGFS_FWSTATS_ADD(rx_filter, beacon_filter); |
| 310 | DEBUGFS_FWSTATS_ADD(rx_filter, arp_filter); |
| 311 | DEBUGFS_FWSTATS_ADD(rx_filter, mc_filter); |
| 312 | DEBUGFS_FWSTATS_ADD(rx_filter, dup_filter); |
| 313 | DEBUGFS_FWSTATS_ADD(rx_filter, data_filter); |
| 314 | DEBUGFS_FWSTATS_ADD(rx_filter, ibss_filter); |
| 315 | DEBUGFS_FWSTATS_ADD(rx_filter, protection_filter); |
| 316 | |
| 317 | DEBUGFS_FWSTATS_ADD(calibration, init_cal_total); |
| 318 | DEBUGFS_FWSTATS_ADD(calibration, init_radio_bands_fail); |
| 319 | DEBUGFS_FWSTATS_ADD(calibration, init_set_params); |
| 320 | DEBUGFS_FWSTATS_ADD(calibration, init_tx_clpc_fail); |
| 321 | DEBUGFS_FWSTATS_ADD(calibration, init_rx_iw_mm_fail); |
| 322 | DEBUGFS_FWSTATS_ADD(calibration, tune_cal_total); |
| 323 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_rtrim_fail); |
| 324 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_pd_buf_fail); |
| 325 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_tx_mix_freq_fail); |
| 326 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_ta_cal); |
| 327 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_rx_if_2_gain); |
| 328 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_rx_dac); |
| 329 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_chan_tune); |
| 330 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_rx_tx_lpf); |
| 331 | DEBUGFS_FWSTATS_ADD(calibration, tune_drpw_lna_tank); |
| 332 | DEBUGFS_FWSTATS_ADD(calibration, tune_tx_lo_leak_fail); |
| 333 | DEBUGFS_FWSTATS_ADD(calibration, tune_tx_iq_mm_fail); |
| 334 | DEBUGFS_FWSTATS_ADD(calibration, tune_tx_pdet_fail); |
| 335 | DEBUGFS_FWSTATS_ADD(calibration, tune_tx_ppa_fail); |
| 336 | DEBUGFS_FWSTATS_ADD(calibration, tune_tx_clpc_fail); |
| 337 | DEBUGFS_FWSTATS_ADD(calibration, tune_rx_ana_dc_fail); |
| 338 | DEBUGFS_FWSTATS_ADD(calibration, tune_rx_dig_dc_fail); |
| 339 | DEBUGFS_FWSTATS_ADD(calibration, tune_rx_iq_mm_fail); |
| 340 | DEBUGFS_FWSTATS_ADD(calibration, cal_state_fail); |
| 341 | |
| 342 | return 0; |
| 343 | |
| 344 | err: |
| 345 | if (IS_ERR(entry)) |
| 346 | ret = PTR_ERR(entry); |
| 347 | else |
| 348 | ret = -ENOMEM; |
| 349 | |
| 350 | return ret; |
| 351 | } |