29 #include <linux/slab.h>
30 #include <linux/kernel.h>
31 #include <linux/module.h>
41 #define DEBUGFS_ADD_FILE(name, parent, mode) do { \
42 if (!debugfs_create_file(#name, mode, parent, priv, \
43 &iwl_dbgfs_##name##_ops)) \
47 #define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \
48 struct dentry *__tmp; \
49 __tmp = debugfs_create_bool(#name, S_IWUSR | S_IRUSR, \
51 if (IS_ERR(__tmp) || !__tmp) \
55 #define DEBUGFS_ADD_X32(name, parent, ptr) do { \
56 struct dentry *__tmp; \
57 __tmp = debugfs_create_x32(#name, S_IWUSR | S_IRUSR, \
59 if (IS_ERR(__tmp) || !__tmp) \
63 #define DEBUGFS_ADD_U32(name, parent, ptr, mode) do { \
64 struct dentry *__tmp; \
65 __tmp = debugfs_create_u32(#name, mode, \
67 if (IS_ERR(__tmp) || !__tmp) \
72 #define DEBUGFS_READ_FUNC(name) \
73 static ssize_t iwl_dbgfs_##name##_read(struct file *file, \
74 char __user *user_buf, \
75 size_t count, loff_t *ppos);
77 #define DEBUGFS_WRITE_FUNC(name) \
78 static ssize_t iwl_dbgfs_##name##_write(struct file *file, \
79 const char __user *user_buf, \
80 size_t count, loff_t *ppos);
83 #define DEBUGFS_READ_FILE_OPS(name) \
84 DEBUGFS_READ_FUNC(name); \
85 static const struct file_operations iwl_dbgfs_##name##_ops = { \
86 .read = iwl_dbgfs_##name##_read, \
87 .open = simple_open, \
88 .llseek = generic_file_llseek, \
91 #define DEBUGFS_WRITE_FILE_OPS(name) \
92 DEBUGFS_WRITE_FUNC(name); \
93 static const struct file_operations iwl_dbgfs_##name##_ops = { \
94 .write = iwl_dbgfs_##name##_write, \
95 .open = simple_open, \
96 .llseek = generic_file_llseek, \
100 #define DEBUGFS_READ_WRITE_FILE_OPS(name) \
101 DEBUGFS_READ_FUNC(name); \
102 DEBUGFS_WRITE_FUNC(name); \
103 static const struct file_operations iwl_dbgfs_##name##_ops = { \
104 .write = iwl_dbgfs_##name##_write, \
105 .read = iwl_dbgfs_##name##_read, \
106 .open = simple_open, \
107 .llseek = generic_file_llseek, \
111 char __user *user_buf,
112 size_t count, loff_t *ppos)
118 bool device_format =
false;
127 if (!iwl_is_ready_rf(priv))
131 if (!priv->dbgfs_sram_offset && !priv->dbgfs_sram_len) {
132 priv->dbgfs_sram_offset = 0x800000;
138 len = priv->dbgfs_sram_len;
141 device_format =
true;
145 bufsz = 50 + len * 4;
150 pos +=
scnprintf(buf + pos, bufsz - pos,
"sram_len: 0x%x\n",
152 pos +=
scnprintf(buf + pos, bufsz - pos,
"sram_offset: 0x%x\n",
153 priv->dbgfs_sram_offset);
156 offset = priv->dbgfs_sram_offset & 0x3;
157 sram = priv->dbgfs_sram_offset & ~0x3;
166 "%08X: ", sram + offset);
170 "%02x", (val >> (8 * (3 - offset))) & 0xff);
173 "%02x ", (val >> (8 * offset)) & 0xff);
185 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
186 }
else if (!(i & 7)) {
187 pos +=
scnprintf(buf + pos, bufsz - pos,
" ");
188 }
else if (!(i & 3)) {
189 pos +=
scnprintf(buf + pos, bufsz - pos,
" ");
193 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
201 const char __user *user_buf,
202 size_t count, loff_t *ppos)
209 memset(buf, 0,
sizeof(buf));
210 buf_size =
min(count,
sizeof(buf) - 1);
214 if (
sscanf(buf,
"%x,%x", &offset, &len) == 2) {
215 priv->dbgfs_sram_offset =
offset;
216 priv->dbgfs_sram_len = len;
217 }
else if (
sscanf(buf,
"%x", &offset) == 1) {
218 priv->dbgfs_sram_offset =
offset;
219 priv->dbgfs_sram_len = -4;
221 priv->dbgfs_sram_offset = 0;
222 priv->dbgfs_sram_len = 0;
228 static ssize_t iwl_dbgfs_wowlan_sram_read(
struct file *file,
229 char __user *user_buf,
230 size_t count, loff_t *ppos)
235 if (!priv->wowlan_sram)
242 static ssize_t iwl_dbgfs_stations_read(
struct file *file,
char __user *user_buf,
243 size_t count, loff_t *ppos)
258 pos +=
scnprintf(buf + pos, bufsz - pos,
"num of stations: %d\n\n",
266 "station %d - addr: %pM, flags: %#x\n",
267 i, station->
sta.sta.addr,
268 station->
sta.station_flags_msk);
270 "TID seqno next_rclmd "
271 "rate_n_flags state txq\n");
276 "%d: 0x%.4x 0x%.4x 0x%.8x "
280 tid_data->
agg.rate_n_flags,
282 tid_data->
agg.txq_id);
284 if (tid_data->
agg.wait_for_ba)
287 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
290 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
298 static ssize_t iwl_dbgfs_nvm_read(
struct file *file,
299 char __user *user_buf,
305 int pos = 0, ofs = 0, buf_size = 0;
310 buf_size = 4 * eeprom_len + 256;
325 pos +=
scnprintf(buf + pos, buf_size - pos,
326 "NVM version: 0x%x\n", eeprom_ver);
327 for (ofs = 0 ; ofs < eeprom_len ; ofs += 16) {
328 pos +=
scnprintf(buf + pos, buf_size - pos,
"0x%.4x ", ofs);
332 if (buf_size - pos > 0)
341 static ssize_t iwl_dbgfs_channels_read(
struct file *file,
char __user *user_buf,
342 size_t count, loff_t *ppos)
360 "Displaying %d channels in 2.4GHz band 802.11bg):\n",
365 "%d: %ddBm: BSS%s%s, %s.\n",
366 channels[i].hw_value,
369 " (IEEE 802.11h required)" :
"",
371 || (channels[i].
flags &
372 IEEE80211_CHAN_RADAR)) ?
"" :
376 "passive only" :
"active/passive");
383 "Displaying %d channels in 5.2GHz band (802.11a)\n",
388 "%d: %ddBm: BSS%s%s, %s.\n",
389 channels[i].hw_value,
390 channels[i].max_power,
391 channels[i].
flags & IEEE80211_CHAN_RADAR ?
392 " (IEEE 802.11h required)" :
"",
393 ((channels[i].
flags & IEEE80211_CHAN_NO_IBSS)
394 || (channels[i].
flags &
395 IEEE80211_CHAN_RADAR)) ?
"" :
399 "passive only" :
"active/passive");
406 static ssize_t iwl_dbgfs_status_read(
struct file *file,
407 char __user *user_buf,
408 size_t count, loff_t *ppos) {
413 const size_t bufsz =
sizeof(
buf);
415 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_RF_KILL_HW:\t %d\n",
417 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_CT_KILL:\t\t %d\n",
419 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_ALIVE:\t\t %d\n",
421 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_READY:\t\t %d\n",
423 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_EXIT_PENDING:\t %d\n",
425 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_STATISTICS:\t %d\n",
427 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_SCANNING:\t %d\n",
429 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_SCAN_ABORTING:\t %d\n",
431 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_SCAN_HW:\t\t %d\n",
433 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_POWER_PMI:\t %d\n",
435 pos +=
scnprintf(buf + pos, bufsz - pos,
"STATUS_FW_ERROR:\t %d\n",
440 static ssize_t iwl_dbgfs_rx_handlers_read(
struct file *file,
441 char __user *user_buf,
442 size_t count, loff_t *ppos) {
459 "\tRx handler[%36s]:\t\t %u\n",
460 iwl_dvm_get_cmd_string(cnt),
469 static ssize_t iwl_dbgfs_rx_handlers_write(
struct file *file,
470 const char __user *user_buf,
471 size_t count, loff_t *ppos)
479 memset(buf, 0,
sizeof(buf));
480 buf_size =
min(count,
sizeof(buf) - 1);
483 if (
sscanf(buf,
"%x", &reset_flag) != 1)
492 static ssize_t iwl_dbgfs_qos_read(
struct file *file,
char __user *user_buf,
493 size_t count, loff_t *ppos)
499 const size_t bufsz =
sizeof(
buf);
502 pos +=
scnprintf(buf + pos, bufsz - pos,
"context %d:\n",
504 for (i = 0; i <
AC_NUM; i++) {
506 "\tcw_min\tcw_max\taifsn\ttxop\n");
508 "AC[%d]\t%u\t%u\t%u\t%u\n", i,
509 ctx->
qos_data.def_qos_parm.ac[i].cw_min,
510 ctx->
qos_data.def_qos_parm.ac[i].cw_max,
511 ctx->
qos_data.def_qos_parm.ac[i].aifsn,
512 ctx->
qos_data.def_qos_parm.ac[i].edca_txop);
514 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
519 static ssize_t iwl_dbgfs_thermal_throttling_read(
struct file *file,
520 char __user *user_buf,
521 size_t count, loff_t *ppos)
528 const size_t bufsz =
sizeof(
buf);
531 "Thermal Throttling Mode: %s\n",
534 "Thermal Throttling State: %d\n",
551 static ssize_t iwl_dbgfs_disable_ht40_write(
struct file *file,
552 const char __user *user_buf,
553 size_t count, loff_t *ppos)
560 memset(buf, 0,
sizeof(buf));
561 buf_size =
min(count,
sizeof(buf) - 1);
564 if (
sscanf(buf,
"%d", &ht40) != 1)
566 if (!iwl_is_any_associated(priv))
567 priv->disable_ht40 = ht40 ?
true :
false;
574 static ssize_t iwl_dbgfs_disable_ht40_read(
struct file *file,
575 char __user *user_buf,
576 size_t count, loff_t *ppos)
581 const size_t bufsz =
sizeof(
buf);
584 "11n 40MHz Mode: %s\n",
585 priv->disable_ht40 ?
"Disabled" :
"Enabled");
589 static ssize_t iwl_dbgfs_temperature_read(
struct file *file,
590 char __user *user_buf,
591 size_t count, loff_t *ppos)
596 const size_t bufsz =
sizeof(
buf);
603 static ssize_t iwl_dbgfs_sleep_level_override_write(
struct file *file,
604 const char __user *user_buf,
605 size_t count, loff_t *ppos)
612 memset(buf, 0,
sizeof(buf));
613 buf_size =
min(count,
sizeof(buf) - 1);
617 if (
sscanf(buf,
"%d", &value) != 1)
633 if (!iwl_is_ready_rf(priv))
645 static ssize_t iwl_dbgfs_sleep_level_override_read(
struct file *file,
646 char __user *user_buf,
647 size_t count, loff_t *ppos)
652 const size_t bufsz =
sizeof(
buf);
655 value = priv->
power_data.debug_sleep_level_override;
659 pos =
scnprintf(buf, bufsz,
"%d\n", value);
663 static ssize_t iwl_dbgfs_current_sleep_command_read(
struct file *file,
664 char __user *user_buf,
665 size_t count, loff_t *ppos)
670 const size_t bufsz =
sizeof(
buf);
676 "RX/TX timeout: %d/%d usec\n",
681 "sleep_interval[%d]: %d\n", i,
701 static const char *fmt_value =
" %-30s %10u\n";
702 static const char *fmt_hex =
" %-30s 0x%02X\n";
703 static const char *fmt_table =
" %-30s %10u %10u %10u %10u\n";
704 static const char *fmt_header =
705 "%-32s current cumulative delta max\n";
707 static int iwl_statistics_flag(
struct iwl_priv *priv,
char *buf,
int bufsz)
716 p +=
scnprintf(buf + p, bufsz - p,
"Statistics Flag(0x%X):\n", flag);
719 "\tStatistics have been cleared\n");
720 p +=
scnprintf(buf + p, bufsz - p,
"\tOperational Frequency: %s\n",
722 ?
"2.4 GHz" :
"5.2 GHz");
723 p +=
scnprintf(buf + p, bufsz - p,
"\tTGj Narrow Band: %s\n",
725 ?
"enabled" :
"disabled");
730 static ssize_t iwl_dbgfs_ucode_rx_stats_read(
struct file *file,
731 char __user *user_buf,
732 size_t count, loff_t *ppos)
747 if (!iwl_is_alive(priv))
764 accum_ofdm = &priv->accum_stats.
rx_ofdm;
765 accum_cck = &priv->accum_stats.
rx_cck;
766 accum_general = &priv->accum_stats.
rx_non_phy;
768 delta_ofdm = &priv->delta_stats.
rx_ofdm;
769 delta_cck = &priv->delta_stats.
rx_cck;
770 delta_general = &priv->delta_stats.
rx_non_phy;
772 max_ofdm = &priv->max_delta_stats.
rx_ofdm;
773 max_cck = &priv->max_delta_stats.
rx_cck;
774 max_general = &priv->max_delta_stats.
rx_non_phy;
777 pos += iwl_statistics_flag(priv, buf, bufsz);
779 fmt_header,
"Statistics_Rx - OFDM:");
781 fmt_table,
"ina_cnt:",
786 fmt_table,
"fina_cnt:",
790 fmt_table,
"plcp_err:",
794 fmt_table,
"crc32_err:",
798 fmt_table,
"overrun_err:",
803 fmt_table,
"early_overrun_err:",
809 fmt_table,
"crc32_good:",
814 fmt_table,
"false_alarm_cnt:",
820 fmt_table,
"fina_sync_err_cnt:",
826 fmt_table,
"sfd_timeout:",
831 fmt_table,
"fina_timeout:",
836 fmt_table,
"unresponded_rts:",
842 fmt_table,
"rxe_frame_lmt_ovrun:",
848 fmt_table,
"sent_ack_cnt:",
853 fmt_table,
"sent_cts_cnt:",
858 fmt_table,
"sent_ba_rsp_cnt:",
864 fmt_table,
"dsp_self_kill:",
870 fmt_table,
"mh_format_err:",
876 fmt_table,
"re_acq_main_rssi_sum:",
883 fmt_header,
"Statistics_Rx - CCK:");
885 fmt_table,
"ina_cnt:",
889 fmt_table,
"fina_cnt:",
893 fmt_table,
"plcp_err:",
897 fmt_table,
"crc32_err:",
901 fmt_table,
"overrun_err:",
906 fmt_table,
"early_overrun_err:",
912 fmt_table,
"crc32_good:",
916 fmt_table,
"false_alarm_cnt:",
921 fmt_table,
"fina_sync_err_cnt:",
927 fmt_table,
"sfd_timeout:",
932 fmt_table,
"fina_timeout:",
937 fmt_table,
"unresponded_rts:",
942 fmt_table,
"rxe_frame_lmt_ovrun:",
948 fmt_table,
"sent_ack_cnt:",
953 fmt_table,
"sent_cts_cnt:",
958 fmt_table,
"sent_ba_rsp_cnt:",
964 fmt_table,
"dsp_self_kill:",
969 fmt_table,
"mh_format_err:",
974 fmt_table,
"re_acq_main_rssi_sum:",
981 fmt_header,
"Statistics_Rx - GENERAL:");
983 fmt_table,
"bogus_cts:",
988 fmt_table,
"bogus_ack:",
993 fmt_table,
"non_bssid_frames:",
999 fmt_table,
"filtered_frames:",
1004 pos +=
scnprintf(buf + pos, bufsz - pos,
1005 fmt_table,
"non_channel_beacons:",
1010 pos +=
scnprintf(buf + pos, bufsz - pos,
1011 fmt_table,
"channel_beacons:",
1016 pos +=
scnprintf(buf + pos, bufsz - pos,
1017 fmt_table,
"num_missed_bcon:",
1022 pos +=
scnprintf(buf + pos, bufsz - pos,
1023 fmt_table,
"adc_rx_saturation_time:",
1028 pos +=
scnprintf(buf + pos, bufsz - pos,
1029 fmt_table,
"ina_detect_search_tm:",
1034 pos +=
scnprintf(buf + pos, bufsz - pos,
1035 fmt_table,
"beacon_silence_rssi_a:",
1040 pos +=
scnprintf(buf + pos, bufsz - pos,
1041 fmt_table,
"beacon_silence_rssi_b:",
1046 pos +=
scnprintf(buf + pos, bufsz - pos,
1047 fmt_table,
"beacon_silence_rssi_c:",
1052 pos +=
scnprintf(buf + pos, bufsz - pos,
1053 fmt_table,
"interference_data_flag:",
1058 pos +=
scnprintf(buf + pos, bufsz - pos,
1059 fmt_table,
"channel_load:",
1064 pos +=
scnprintf(buf + pos, bufsz - pos,
1065 fmt_table,
"dsp_false_alarms:",
1070 pos +=
scnprintf(buf + pos, bufsz - pos,
1071 fmt_table,
"beacon_rssi_a:",
1076 pos +=
scnprintf(buf + pos, bufsz - pos,
1077 fmt_table,
"beacon_rssi_b:",
1082 pos +=
scnprintf(buf + pos, bufsz - pos,
1083 fmt_table,
"beacon_rssi_c:",
1088 pos +=
scnprintf(buf + pos, bufsz - pos,
1089 fmt_table,
"beacon_energy_a:",
1094 pos +=
scnprintf(buf + pos, bufsz - pos,
1095 fmt_table,
"beacon_energy_b:",
1100 pos +=
scnprintf(buf + pos, bufsz - pos,
1101 fmt_table,
"beacon_energy_c:",
1107 pos +=
scnprintf(buf + pos, bufsz - pos,
1108 fmt_header,
"Statistics_Rx - OFDM_HT:");
1109 pos +=
scnprintf(buf + pos, bufsz - pos,
1110 fmt_table,
"plcp_err:",
1113 pos +=
scnprintf(buf + pos, bufsz - pos,
1114 fmt_table,
"overrun_err:",
1117 pos +=
scnprintf(buf + pos, bufsz - pos,
1118 fmt_table,
"early_overrun_err:",
1123 pos +=
scnprintf(buf + pos, bufsz - pos,
1124 fmt_table,
"crc32_good:",
1127 pos +=
scnprintf(buf + pos, bufsz - pos,
1128 fmt_table,
"crc32_err:",
1131 pos +=
scnprintf(buf + pos, bufsz - pos,
1132 fmt_table,
"mh_format_err:",
1136 pos +=
scnprintf(buf + pos, bufsz - pos,
1137 fmt_table,
"agg_crc32_good:",
1141 pos +=
scnprintf(buf + pos, bufsz - pos,
1142 fmt_table,
"agg_mpdu_cnt:",
1146 pos +=
scnprintf(buf + pos, bufsz - pos,
1147 fmt_table,
"agg_cnt:",
1150 pos +=
scnprintf(buf + pos, bufsz - pos,
1151 fmt_table,
"unsupport_mcs:",
1163 static ssize_t iwl_dbgfs_ucode_tx_stats_read(
struct file *file,
1164 char __user *user_buf,
1165 size_t count, loff_t *ppos)
1174 if (!iwl_is_alive(priv))
1188 accum_tx = &priv->accum_stats.
tx;
1189 delta_tx = &priv->delta_stats.
tx;
1190 max_tx = &priv->max_delta_stats.
tx;
1192 pos += iwl_statistics_flag(priv, buf, bufsz);
1193 pos +=
scnprintf(buf + pos, bufsz - pos,
1194 fmt_header,
"Statistics_Tx:");
1195 pos +=
scnprintf(buf + pos, bufsz - pos,
1196 fmt_table,
"preamble:",
1200 pos +=
scnprintf(buf + pos, bufsz - pos,
1201 fmt_table,
"rx_detected_cnt:",
1205 pos +=
scnprintf(buf + pos, bufsz - pos,
1206 fmt_table,
"bt_prio_defer_cnt:",
1211 pos +=
scnprintf(buf + pos, bufsz - pos,
1212 fmt_table,
"bt_prio_kill_cnt:",
1217 pos +=
scnprintf(buf + pos, bufsz - pos,
1218 fmt_table,
"few_bytes_cnt:",
1222 pos +=
scnprintf(buf + pos, bufsz - pos,
1223 fmt_table,
"cts_timeout:",
1226 pos +=
scnprintf(buf + pos, bufsz - pos,
1227 fmt_table,
"ack_timeout:",
1231 pos +=
scnprintf(buf + pos, bufsz - pos,
1232 fmt_table,
"expected_ack_cnt:",
1237 pos +=
scnprintf(buf + pos, bufsz - pos,
1238 fmt_table,
"actual_ack_cnt:",
1243 pos +=
scnprintf(buf + pos, bufsz - pos,
1244 fmt_table,
"dump_msdu_cnt:",
1249 pos +=
scnprintf(buf + pos, bufsz - pos,
1250 fmt_table,
"abort_nxt_frame_mismatch:",
1255 pos +=
scnprintf(buf + pos, bufsz - pos,
1256 fmt_table,
"abort_missing_nxt_frame:",
1261 pos +=
scnprintf(buf + pos, bufsz - pos,
1262 fmt_table,
"cts_timeout_collision:",
1267 pos +=
scnprintf(buf + pos, bufsz - pos,
1268 fmt_table,
"ack_ba_timeout_collision:",
1273 pos +=
scnprintf(buf + pos, bufsz - pos,
1274 fmt_table,
"agg ba_timeout:",
1276 accum_tx->
agg.ba_timeout,
1277 delta_tx->
agg.ba_timeout,
1278 max_tx->
agg.ba_timeout);
1279 pos +=
scnprintf(buf + pos, bufsz - pos,
1280 fmt_table,
"agg ba_resched_frames:",
1282 accum_tx->
agg.ba_reschedule_frames,
1283 delta_tx->
agg.ba_reschedule_frames,
1284 max_tx->
agg.ba_reschedule_frames);
1285 pos +=
scnprintf(buf + pos, bufsz - pos,
1286 fmt_table,
"agg scd_query_agg_frame:",
1288 accum_tx->
agg.scd_query_agg_frame_cnt,
1289 delta_tx->
agg.scd_query_agg_frame_cnt,
1290 max_tx->
agg.scd_query_agg_frame_cnt);
1291 pos +=
scnprintf(buf + pos, bufsz - pos,
1292 fmt_table,
"agg scd_query_no_agg:",
1294 accum_tx->
agg.scd_query_no_agg,
1295 delta_tx->
agg.scd_query_no_agg,
1296 max_tx->
agg.scd_query_no_agg);
1297 pos +=
scnprintf(buf + pos, bufsz - pos,
1298 fmt_table,
"agg scd_query_agg:",
1300 accum_tx->
agg.scd_query_agg,
1301 delta_tx->
agg.scd_query_agg,
1302 max_tx->
agg.scd_query_agg);
1303 pos +=
scnprintf(buf + pos, bufsz - pos,
1304 fmt_table,
"agg scd_query_mismatch:",
1306 accum_tx->
agg.scd_query_mismatch,
1307 delta_tx->
agg.scd_query_mismatch,
1308 max_tx->
agg.scd_query_mismatch);
1309 pos +=
scnprintf(buf + pos, bufsz - pos,
1310 fmt_table,
"agg frame_not_ready:",
1312 accum_tx->
agg.frame_not_ready,
1313 delta_tx->
agg.frame_not_ready,
1314 max_tx->
agg.frame_not_ready);
1315 pos +=
scnprintf(buf + pos, bufsz - pos,
1316 fmt_table,
"agg underrun:",
1318 accum_tx->
agg.underrun,
1319 delta_tx->
agg.underrun, max_tx->
agg.underrun);
1320 pos +=
scnprintf(buf + pos, bufsz - pos,
1321 fmt_table,
"agg bt_prio_kill:",
1323 accum_tx->
agg.bt_prio_kill,
1324 delta_tx->
agg.bt_prio_kill,
1325 max_tx->
agg.bt_prio_kill);
1326 pos +=
scnprintf(buf + pos, bufsz - pos,
1327 fmt_table,
"agg rx_ba_rsp_cnt:",
1329 accum_tx->
agg.rx_ba_rsp_cnt,
1330 delta_tx->
agg.rx_ba_rsp_cnt,
1331 max_tx->
agg.rx_ba_rsp_cnt);
1334 pos +=
scnprintf(buf + pos, bufsz - pos,
1335 "tx power: (1/2 dB step)\n");
1338 pos +=
scnprintf(buf + pos, bufsz - pos,
1339 fmt_hex,
"antenna A:",
1343 pos +=
scnprintf(buf + pos, bufsz - pos,
1344 fmt_hex,
"antenna B:",
1348 pos +=
scnprintf(buf + pos, bufsz - pos,
1349 fmt_hex,
"antenna C:",
1360 static ssize_t iwl_dbgfs_ucode_general_stats_read(
struct file *file,
1361 char __user *user_buf,
1362 size_t count, loff_t *ppos)
1374 if (!iwl_is_alive(priv))
1391 accum_general = &priv->accum_stats.
common;
1392 accum_dbg = &priv->accum_stats.
common.dbg;
1393 accum_div = &priv->accum_stats.
common.div;
1394 delta_general = &priv->delta_stats.
common;
1395 max_general = &priv->max_delta_stats.
common;
1396 delta_dbg = &priv->delta_stats.
common.dbg;
1397 max_dbg = &priv->max_delta_stats.
common.dbg;
1398 delta_div = &priv->delta_stats.
common.div;
1399 max_div = &priv->max_delta_stats.
common.div;
1401 pos += iwl_statistics_flag(priv, buf, bufsz);
1402 pos +=
scnprintf(buf + pos, bufsz - pos,
1403 fmt_header,
"Statistics_General:");
1404 pos +=
scnprintf(buf + pos, bufsz - pos,
1405 fmt_value,
"temperature:",
1407 pos +=
scnprintf(buf + pos, bufsz - pos,
1408 fmt_value,
"temperature_m:",
1410 pos +=
scnprintf(buf + pos, bufsz - pos,
1411 fmt_value,
"ttl_timestamp:",
1413 pos +=
scnprintf(buf + pos, bufsz - pos,
1414 fmt_table,
"burst_check:",
1418 pos +=
scnprintf(buf + pos, bufsz - pos,
1419 fmt_table,
"burst_count:",
1423 pos +=
scnprintf(buf + pos, bufsz - pos,
1424 fmt_table,
"wait_for_silence_timeout_count:",
1429 pos +=
scnprintf(buf + pos, bufsz - pos,
1430 fmt_table,
"sleep_time:",
1434 pos +=
scnprintf(buf + pos, bufsz - pos,
1435 fmt_table,
"slots_out:",
1439 pos +=
scnprintf(buf + pos, bufsz - pos,
1440 fmt_table,
"slots_idle:",
1444 pos +=
scnprintf(buf + pos, bufsz - pos,
1445 fmt_table,
"tx_on_a:",
1448 pos +=
scnprintf(buf + pos, bufsz - pos,
1449 fmt_table,
"tx_on_b:",
1452 pos +=
scnprintf(buf + pos, bufsz - pos,
1453 fmt_table,
"exec_time:",
1456 pos +=
scnprintf(buf + pos, bufsz - pos,
1457 fmt_table,
"probe_time:",
1460 pos +=
scnprintf(buf + pos, bufsz - pos,
1461 fmt_table,
"rx_enable_counter:",
1466 pos +=
scnprintf(buf + pos, bufsz - pos,
1467 fmt_table,
"num_of_sos_states:",
1480 static ssize_t iwl_dbgfs_ucode_bt_stats_read(
struct file *file,
1481 char __user *user_buf,
1482 size_t count, loff_t *ppos)
1491 if (!iwl_is_alive(priv))
1517 accum_bt = &priv->accum_stats.bt_activity;
1519 pos += iwl_statistics_flag(priv, buf, bufsz);
1520 pos +=
scnprintf(buf + pos, bufsz - pos,
"Statistics_BT:\n");
1521 pos +=
scnprintf(buf + pos, bufsz - pos,
1522 "\t\t\tcurrent\t\t\taccumulative\n");
1523 pos +=
scnprintf(buf + pos, bufsz - pos,
1524 "hi_priority_tx_req_cnt:\t\t%u\t\t\t%u\n",
1527 pos +=
scnprintf(buf + pos, bufsz - pos,
1528 "hi_priority_tx_denied_cnt:\t%u\t\t\t%u\n",
1531 pos +=
scnprintf(buf + pos, bufsz - pos,
1532 "lo_priority_tx_req_cnt:\t\t%u\t\t\t%u\n",
1535 pos +=
scnprintf(buf + pos, bufsz - pos,
1536 "lo_priority_tx_denied_cnt:\t%u\t\t\t%u\n",
1539 pos +=
scnprintf(buf + pos, bufsz - pos,
1540 "hi_priority_rx_req_cnt:\t\t%u\t\t\t%u\n",
1543 pos +=
scnprintf(buf + pos, bufsz - pos,
1544 "hi_priority_rx_denied_cnt:\t%u\t\t\t%u\n",
1547 pos +=
scnprintf(buf + pos, bufsz - pos,
1548 "lo_priority_rx_req_cnt:\t\t%u\t\t\t%u\n",
1551 pos +=
scnprintf(buf + pos, bufsz - pos,
1552 "lo_priority_rx_denied_cnt:\t%u\t\t\t%u\n",
1556 pos +=
scnprintf(buf + pos, bufsz - pos,
1557 "(rx)num_bt_kills:\t\t%u\t\t\t%u\n",
1568 static ssize_t iwl_dbgfs_reply_tx_error_read(
struct file *file,
1569 char __user *user_buf,
1570 size_t count, loff_t *ppos)
1579 if (!iwl_is_alive(priv))
1586 pos +=
scnprintf(buf + pos, bufsz - pos,
"Statistics_TX_Error:\n");
1587 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t\t%u\n",
1590 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1593 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1596 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1599 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1602 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1603 iwl_get_tx_fail_reason(
1606 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1609 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1612 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1615 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1618 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1621 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1624 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1627 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1630 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1633 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1636 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1639 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1642 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1645 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1646 iwl_get_tx_fail_reason(
1649 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1652 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1653 iwl_get_tx_fail_reason(
1656 pos +=
scnprintf(buf + pos, bufsz - pos,
"UNKNOWN:\t\t\t%u\n",
1659 pos +=
scnprintf(buf + pos, bufsz - pos,
1660 "\nStatistics_Agg_TX_Error:\n");
1662 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1665 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1668 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1671 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1674 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1675 iwl_get_agg_tx_fail_reason(
1678 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1679 iwl_get_agg_tx_fail_reason(
1682 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1683 iwl_get_agg_tx_fail_reason(
1686 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1689 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t%u\n",
1690 iwl_get_agg_tx_fail_reason(
1693 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1696 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1699 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s:\t\t\t%u\n",
1702 pos +=
scnprintf(buf + pos, bufsz - pos,
"UNKNOWN:\t\t\t%u\n",
1710 static ssize_t iwl_dbgfs_sensitivity_read(
struct file *file,
1711 char __user *user_buf,
1712 size_t count, loff_t *ppos) {
1727 pos +=
scnprintf(buf + pos, bufsz - pos,
"auto_corr_ofdm:\t\t\t %u\n",
1729 pos +=
scnprintf(buf + pos, bufsz - pos,
1730 "auto_corr_ofdm_mrc:\t\t %u\n",
1732 pos +=
scnprintf(buf + pos, bufsz - pos,
"auto_corr_ofdm_x1:\t\t %u\n",
1734 pos +=
scnprintf(buf + pos, bufsz - pos,
1735 "auto_corr_ofdm_mrc_x1:\t\t %u\n",
1737 pos +=
scnprintf(buf + pos, bufsz - pos,
"auto_corr_cck:\t\t\t %u\n",
1739 pos +=
scnprintf(buf + pos, bufsz - pos,
"auto_corr_cck_mrc:\t\t %u\n",
1741 pos +=
scnprintf(buf + pos, bufsz - pos,
1742 "last_bad_plcp_cnt_ofdm:\t\t %u\n",
1744 pos +=
scnprintf(buf + pos, bufsz - pos,
"last_fa_cnt_ofdm:\t\t %u\n",
1746 pos +=
scnprintf(buf + pos, bufsz - pos,
1747 "last_bad_plcp_cnt_cck:\t\t %u\n",
1749 pos +=
scnprintf(buf + pos, bufsz - pos,
"last_fa_cnt_cck:\t\t %u\n",
1751 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_curr_state:\t\t\t %u\n",
1753 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_prev_state:\t\t\t %u\n",
1755 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_value:\t\t\t");
1756 for (cnt = 0; cnt < 10; cnt++) {
1757 pos +=
scnprintf(buf + pos, bufsz - pos,
" %u",
1760 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
1761 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_silence_rssi:\t\t");
1763 pos +=
scnprintf(buf + pos, bufsz - pos,
" %u",
1766 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
1767 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_silence_ref:\t\t %u\n",
1769 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_energy_idx:\t\t\t %u\n",
1771 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_silence_idx:\t\t %u\n",
1773 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_th_cck:\t\t\t %u\n",
1775 pos +=
scnprintf(buf + pos, bufsz - pos,
1776 "nrg_auto_corr_silence_diff:\t %u\n",
1778 pos +=
scnprintf(buf + pos, bufsz - pos,
"num_in_cck_no_fa:\t\t %u\n",
1780 pos +=
scnprintf(buf + pos, bufsz - pos,
"nrg_th_ofdm:\t\t\t %u\n",
1789 static ssize_t iwl_dbgfs_chain_noise_read(
struct file *file,
1790 char __user *user_buf,
1791 size_t count, loff_t *ppos) {
1806 pos +=
scnprintf(buf + pos, bufsz - pos,
"active_chains:\t\t\t %u\n",
1808 pos +=
scnprintf(buf + pos, bufsz - pos,
"chain_noise_a:\t\t\t %u\n",
1810 pos +=
scnprintf(buf + pos, bufsz - pos,
"chain_noise_b:\t\t\t %u\n",
1812 pos +=
scnprintf(buf + pos, bufsz - pos,
"chain_noise_c:\t\t\t %u\n",
1814 pos +=
scnprintf(buf + pos, bufsz - pos,
"chain_signal_a:\t\t\t %u\n",
1816 pos +=
scnprintf(buf + pos, bufsz - pos,
"chain_signal_b:\t\t\t %u\n",
1818 pos +=
scnprintf(buf + pos, bufsz - pos,
"chain_signal_c:\t\t\t %u\n",
1820 pos +=
scnprintf(buf + pos, bufsz - pos,
"beacon_count:\t\t\t %u\n",
1823 pos +=
scnprintf(buf + pos, bufsz - pos,
"disconn_array:\t\t\t");
1825 pos +=
scnprintf(buf + pos, bufsz - pos,
" %u",
1828 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
1829 pos +=
scnprintf(buf + pos, bufsz - pos,
"delta_gain_code:\t\t");
1831 pos +=
scnprintf(buf + pos, bufsz - pos,
" %u",
1834 pos +=
scnprintf(buf + pos, bufsz - pos,
"\n");
1835 pos +=
scnprintf(buf + pos, bufsz - pos,
"radio_write:\t\t\t %u\n",
1837 pos +=
scnprintf(buf + pos, bufsz - pos,
"state:\t\t\t\t %u\n",
1845 static ssize_t iwl_dbgfs_power_save_status_read(
struct file *file,
1846 char __user *user_buf,
1847 size_t count, loff_t *ppos)
1852 const size_t bufsz =
sizeof(
buf);
1858 pos +=
scnprintf(buf + pos, bufsz - pos,
"Power Save Status: ");
1859 pos +=
scnprintf(buf + pos, bufsz - pos,
"%s\n",
1868 static ssize_t iwl_dbgfs_clear_ucode_statistics_write(
struct file *file,
1869 const char __user *user_buf,
1870 size_t count, loff_t *ppos)
1877 memset(buf, 0,
sizeof(buf));
1878 buf_size =
min(count,
sizeof(buf) - 1);
1881 if (
sscanf(buf,
"%d", &clear) != 1)
1892 static ssize_t iwl_dbgfs_ucode_tracing_read(
struct file *file,
1893 char __user *user_buf,
1894 size_t count, loff_t *ppos) {
1899 const size_t bufsz =
sizeof(
buf);
1901 pos +=
scnprintf(buf + pos, bufsz - pos,
"ucode trace timer is %s\n",
1902 priv->
event_log.ucode_trace ?
"On" :
"Off");
1903 pos +=
scnprintf(buf + pos, bufsz - pos,
"non_wraps_count:\t\t %u\n",
1905 pos +=
scnprintf(buf + pos, bufsz - pos,
"wraps_once_count:\t\t %u\n",
1907 pos +=
scnprintf(buf + pos, bufsz - pos,
"wraps_more_count:\t\t %u\n",
1913 static ssize_t iwl_dbgfs_ucode_tracing_write(
struct file *file,
1914 const char __user *user_buf,
1915 size_t count, loff_t *ppos)
1922 memset(buf, 0,
sizeof(buf));
1923 buf_size =
min(count,
sizeof(buf) - 1);
1926 if (
sscanf(buf,
"%d", &trace) != 1)
1931 if (iwl_is_alive(priv)) {
1943 static ssize_t iwl_dbgfs_rxon_flags_read(
struct file *file,
1944 char __user *user_buf,
1945 size_t count, loff_t *ppos) {
1951 len =
sprintf(buf,
"0x%04X\n",
1956 static ssize_t iwl_dbgfs_rxon_filter_flags_read(
struct file *file,
1957 char __user *user_buf,
1958 size_t count, loff_t *ppos) {
1964 len =
sprintf(buf,
"0x%04X\n",
1969 static ssize_t iwl_dbgfs_missed_beacon_read(
struct file *file,
1970 char __user *user_buf,
1971 size_t count, loff_t *ppos) {
1976 const size_t bufsz =
sizeof(
buf);
1978 pos +=
scnprintf(buf + pos, bufsz - pos,
"%d\n",
1984 static ssize_t iwl_dbgfs_missed_beacon_write(
struct file *file,
1985 const char __user *user_buf,
1986 size_t count, loff_t *ppos)
1993 memset(buf, 0,
sizeof(buf));
1994 buf_size =
min(count,
sizeof(buf) - 1);
1997 if (
sscanf(buf,
"%d", &missed) != 1)
2010 static ssize_t iwl_dbgfs_plcp_delta_read(
struct file *file,
2011 char __user *user_buf,
2012 size_t count, loff_t *ppos) {
2017 const size_t bufsz =
sizeof(
buf);
2019 pos +=
scnprintf(buf + pos, bufsz - pos,
"%u\n",
2025 static ssize_t iwl_dbgfs_plcp_delta_write(
struct file *file,
2026 const char __user *user_buf,
2027 size_t count, loff_t *ppos) {
2034 memset(buf, 0,
sizeof(buf));
2035 buf_size =
min(count,
sizeof(buf) - 1);
2038 if (
sscanf(buf,
"%d", &plcp) != 1)
2049 static ssize_t iwl_dbgfs_rf_reset_read(
struct file *file,
2050 char __user *user_buf,
2051 size_t count, loff_t *ppos)
2056 const size_t bufsz =
sizeof(
buf);
2059 pos +=
scnprintf(buf + pos, bufsz - pos,
2060 "RF reset statistics\n");
2061 pos +=
scnprintf(buf + pos, bufsz - pos,
2062 "\tnumber of reset request: %d\n",
2064 pos +=
scnprintf(buf + pos, bufsz - pos,
2065 "\tnumber of reset request success: %d\n",
2067 pos +=
scnprintf(buf + pos, bufsz - pos,
2068 "\tnumber of reset request reject: %d\n",
2074 static ssize_t iwl_dbgfs_rf_reset_write(
struct file *file,
2075 const char __user *user_buf,
2076 size_t count, loff_t *ppos) {
2082 return ret ? ret :
count;
2085 static ssize_t iwl_dbgfs_txfifo_flush_write(
struct file *file,
2086 const char __user *user_buf,
2087 size_t count, loff_t *ppos) {
2094 memset(buf, 0,
sizeof(buf));
2095 buf_size =
min(count,
sizeof(buf) - 1);
2098 if (
sscanf(buf,
"%d", &flush) != 1)
2101 if (iwl_is_rfkill(priv))
2109 static ssize_t iwl_dbgfs_bt_traffic_read(
struct file *file,
2110 char __user *user_buf,
2111 size_t count, loff_t *ppos) {
2116 const size_t bufsz =
sizeof(buf);
2119 pos +=
scnprintf(buf + pos, bufsz - pos,
"BT coex disabled\n");
2122 pos +=
scnprintf(buf + pos, bufsz - pos,
"BT enable flag: 0x%x\n",
2124 pos +=
scnprintf(buf + pos, bufsz - pos,
"BT in %s mode\n",
2126 pos +=
scnprintf(buf + pos, bufsz - pos,
"BT status: %s, "
2127 "last traffic notif: %d\n",
2129 pos +=
scnprintf(buf + pos, bufsz - pos,
"ch_announcement: %d, "
2130 "kill_ack_mask: %x, kill_cts_mask: %x\n",
2134 pos +=
scnprintf(buf + pos, bufsz - pos,
"bluetooth traffic load: ");
2137 pos +=
scnprintf(buf + pos, bufsz - pos,
"Continuous\n");
2140 pos +=
scnprintf(buf + pos, bufsz - pos,
"High\n");
2143 pos +=
scnprintf(buf + pos, bufsz - pos,
"Low\n");
2147 pos +=
scnprintf(buf + pos, bufsz - pos,
"None\n");
2154 static ssize_t iwl_dbgfs_protection_mode_read(
struct file *file,
2155 char __user *user_buf,
2156 size_t count, loff_t *ppos)
2162 const size_t bufsz =
sizeof(buf);
2164 if (priv->
cfg->ht_params)
2165 pos +=
scnprintf(buf + pos, bufsz - pos,
2166 "use %s for aggregation\n",
2167 (priv->
hw_params.use_rts_for_aggregation) ?
2168 "rts/cts" :
"cts-to-self");
2170 pos +=
scnprintf(buf + pos, bufsz - pos,
"N/A");
2175 static ssize_t iwl_dbgfs_protection_mode_write(
struct file *file,
2176 const char __user *user_buf,
2177 size_t count, loff_t *ppos) {
2184 if (!priv->
cfg->ht_params)
2187 memset(buf, 0,
sizeof(buf));
2188 buf_size =
min(count,
sizeof(buf) - 1);
2191 if (
sscanf(buf,
"%d", &rts) != 1)
2194 priv->
hw_params.use_rts_for_aggregation =
true;
2196 priv->
hw_params.use_rts_for_aggregation =
false;
2200 static int iwl_cmd_echo_test(
struct iwl_priv *priv)
2211 IWL_ERR(priv,
"echo testing fail: 0X%x\n", ret);
2217 static ssize_t iwl_dbgfs_echo_test_write(
struct file *file,
2218 const char __user *user_buf,
2219 size_t count, loff_t *ppos)
2225 memset(buf, 0,
sizeof(buf));
2226 buf_size =
min(count,
sizeof(buf) - 1);
2230 iwl_cmd_echo_test(priv);
2234 #ifdef CONFIG_IWLWIFI_DEBUG
2235 static ssize_t iwl_dbgfs_log_event_read(
struct file *file,
2236 char __user *user_buf,
2237 size_t count, loff_t *ppos)
2252 static ssize_t iwl_dbgfs_log_event_write(
struct file *file,
2253 const char __user *user_buf,
2254 size_t count, loff_t *ppos)
2262 if (!iwl_is_ready(priv))
2265 memset(buf, 0,
sizeof(buf));
2266 buf_size =
min(count,
sizeof(buf) - 1);
2269 if (
sscanf(buf,
"%d", &event_log_flag) != 1)
2271 if (event_log_flag == 1)
2278 static ssize_t iwl_dbgfs_calib_disabled_read(
struct file *file,
2279 char __user *user_buf,
2280 size_t count, loff_t *ppos)
2285 const size_t bufsz =
sizeof(
buf);
2287 pos +=
scnprintf(buf + pos, bufsz - pos,
2288 "Sensitivity calibrations %s\n",
2291 "DISABLED" :
"ENABLED");
2292 pos +=
scnprintf(buf + pos, bufsz - pos,
2293 "Chain noise calibrations %s\n",
2296 "DISABLED" :
"ENABLED");
2297 pos +=
scnprintf(buf + pos, bufsz - pos,
2298 "Tx power calibrations %s\n",
2301 "DISABLED" :
"ENABLED");
2306 static ssize_t iwl_dbgfs_calib_disabled_write(
struct file *file,
2307 const char __user *user_buf,
2308 size_t count, loff_t *ppos)
2315 memset(buf, 0,
sizeof(buf));
2316 buf_size =
min(count,
sizeof(buf) - 1);
2319 if (
sscanf(buf,
"%x", &calib_disabled) != 1)
2346 #ifdef CONFIG_IWLWIFI_DEBUG
2357 struct dentry *dir_data, *dir_rf, *dir_debug;
2359 priv->debugfs_dir = dbgfs_dir;
2403 #ifdef CONFIG_IWLWIFI_DEBUG
2407 if (iwl_advanced_bt_coexist(priv))
2421 struct dentry *mac80211_dir, *dev_dir, *root_dir;
2425 mac80211_dir = priv->
hw->wiphy->debugfsdir;
2437 IWL_ERR(priv,
"failed to create the dvm debugfs entries\n");