iwl-3945-debugfs.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. /******************************************************************************
  2. *
  3. * GPL LICENSE SUMMARY
  4. *
  5. * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of version 2 of the GNU General Public License as
  9. * 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 Street, Fifth Floor, Boston, MA 02110,
  19. * USA
  20. *
  21. * The full GNU General Public License is included in this distribution
  22. * in the file called LICENSE.GPL.
  23. *
  24. * Contact Information:
  25. * Intel Linux Wireless <ilw@linux.intel.com>
  26. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  27. *****************************************************************************/
  28. #include "iwl-3945-debugfs.h"
  29. ssize_t iwl3945_ucode_rx_stats_read(struct file *file,
  30. char __user *user_buf,
  31. size_t count, loff_t *ppos)
  32. {
  33. struct iwl_priv *priv = file->private_data;
  34. int pos = 0;
  35. char *buf;
  36. int bufsz = sizeof(struct iwl39_statistics_rx_phy) * 40 +
  37. sizeof(struct iwl39_statistics_rx_non_phy) * 40 + 400;
  38. ssize_t ret;
  39. struct iwl39_statistics_rx_phy *ofdm, *accum_ofdm, *delta_ofdm, *max_ofdm;
  40. struct iwl39_statistics_rx_phy *cck, *accum_cck, *delta_cck, *max_cck;
  41. struct iwl39_statistics_rx_non_phy *general, *accum_general;
  42. struct iwl39_statistics_rx_non_phy *delta_general, *max_general;
  43. if (!iwl_is_alive(priv))
  44. return -EAGAIN;
  45. buf = kzalloc(bufsz, GFP_KERNEL);
  46. if (!buf) {
  47. IWL_ERR(priv, "Can not allocate Buffer\n");
  48. return -ENOMEM;
  49. }
  50. /*
  51. * The statistic information display here is based on
  52. * the last statistics notification from uCode
  53. * might not reflect the current uCode activity
  54. */
  55. ofdm = &priv->_3945.statistics.rx.ofdm;
  56. cck = &priv->_3945.statistics.rx.cck;
  57. general = &priv->_3945.statistics.rx.general;
  58. accum_ofdm = &priv->_3945.accum_statistics.rx.ofdm;
  59. accum_cck = &priv->_3945.accum_statistics.rx.cck;
  60. accum_general = &priv->_3945.accum_statistics.rx.general;
  61. delta_ofdm = &priv->_3945.delta_statistics.rx.ofdm;
  62. delta_cck = &priv->_3945.delta_statistics.rx.cck;
  63. delta_general = &priv->_3945.delta_statistics.rx.general;
  64. max_ofdm = &priv->_3945.max_delta.rx.ofdm;
  65. max_cck = &priv->_3945.max_delta.rx.cck;
  66. max_general = &priv->_3945.max_delta.rx.general;
  67. pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
  68. pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
  69. "acumulative delta max\n",
  70. "Statistics_Rx - OFDM:");
  71. pos += scnprintf(buf + pos, bufsz - pos,
  72. " %-30s %10u %10u %10u %10u\n",
  73. "ina_cnt:", le32_to_cpu(ofdm->ina_cnt),
  74. accum_ofdm->ina_cnt,
  75. delta_ofdm->ina_cnt, max_ofdm->ina_cnt);
  76. pos += scnprintf(buf + pos, bufsz - pos,
  77. " %-30s %10u %10u %10u %10u\n",
  78. "fina_cnt:",
  79. le32_to_cpu(ofdm->fina_cnt), accum_ofdm->fina_cnt,
  80. delta_ofdm->fina_cnt, max_ofdm->fina_cnt);
  81. pos += scnprintf(buf + pos, bufsz - pos,
  82. " %-30s %10u %10u %10u %10u\n", "plcp_err:",
  83. le32_to_cpu(ofdm->plcp_err), accum_ofdm->plcp_err,
  84. delta_ofdm->plcp_err, max_ofdm->plcp_err);
  85. pos += scnprintf(buf + pos, bufsz - pos,
  86. " %-30s %10u %10u %10u %10u\n", "crc32_err:",
  87. le32_to_cpu(ofdm->crc32_err), accum_ofdm->crc32_err,
  88. delta_ofdm->crc32_err, max_ofdm->crc32_err);
  89. pos += scnprintf(buf + pos, bufsz - pos,
  90. " %-30s %10u %10u %10u %10u\n", "overrun_err:",
  91. le32_to_cpu(ofdm->overrun_err),
  92. accum_ofdm->overrun_err, delta_ofdm->overrun_err,
  93. max_ofdm->overrun_err);
  94. pos += scnprintf(buf + pos, bufsz - pos,
  95. " %-30s %10u %10u %10u %10u\n",
  96. "early_overrun_err:",
  97. le32_to_cpu(ofdm->early_overrun_err),
  98. accum_ofdm->early_overrun_err,
  99. delta_ofdm->early_overrun_err,
  100. max_ofdm->early_overrun_err);
  101. pos += scnprintf(buf + pos, bufsz - pos,
  102. " %-30s %10u %10u %10u %10u\n",
  103. "crc32_good:", le32_to_cpu(ofdm->crc32_good),
  104. accum_ofdm->crc32_good, delta_ofdm->crc32_good,
  105. max_ofdm->crc32_good);
  106. pos += scnprintf(buf + pos, bufsz - pos,
  107. " %-30s %10u %10u %10u %10u\n", "false_alarm_cnt:",
  108. le32_to_cpu(ofdm->false_alarm_cnt),
  109. accum_ofdm->false_alarm_cnt,
  110. delta_ofdm->false_alarm_cnt,
  111. max_ofdm->false_alarm_cnt);
  112. pos += scnprintf(buf + pos, bufsz - pos,
  113. " %-30s %10u %10u %10u %10u\n",
  114. "fina_sync_err_cnt:",
  115. le32_to_cpu(ofdm->fina_sync_err_cnt),
  116. accum_ofdm->fina_sync_err_cnt,
  117. delta_ofdm->fina_sync_err_cnt,
  118. max_ofdm->fina_sync_err_cnt);
  119. pos += scnprintf(buf + pos, bufsz - pos,
  120. " %-30s %10u %10u %10u %10u\n",
  121. "sfd_timeout:",
  122. le32_to_cpu(ofdm->sfd_timeout),
  123. accum_ofdm->sfd_timeout,
  124. delta_ofdm->sfd_timeout,
  125. max_ofdm->sfd_timeout);
  126. pos += scnprintf(buf + pos, bufsz - pos,
  127. " %-30s %10u %10u %10u %10u\n",
  128. "fina_timeout:",
  129. le32_to_cpu(ofdm->fina_timeout),
  130. accum_ofdm->fina_timeout,
  131. delta_ofdm->fina_timeout,
  132. max_ofdm->fina_timeout);
  133. pos += scnprintf(buf + pos, bufsz - pos,
  134. " %-30s %10u %10u %10u %10u\n",
  135. "unresponded_rts:",
  136. le32_to_cpu(ofdm->unresponded_rts),
  137. accum_ofdm->unresponded_rts,
  138. delta_ofdm->unresponded_rts,
  139. max_ofdm->unresponded_rts);
  140. pos += scnprintf(buf + pos, bufsz - pos,
  141. " %-30s %10u %10u %10u %10u\n",
  142. "rxe_frame_lmt_ovrun:",
  143. le32_to_cpu(ofdm->rxe_frame_limit_overrun),
  144. accum_ofdm->rxe_frame_limit_overrun,
  145. delta_ofdm->rxe_frame_limit_overrun,
  146. max_ofdm->rxe_frame_limit_overrun);
  147. pos += scnprintf(buf + pos, bufsz - pos,
  148. " %-30s %10u %10u %10u %10u\n",
  149. "sent_ack_cnt:",
  150. le32_to_cpu(ofdm->sent_ack_cnt),
  151. accum_ofdm->sent_ack_cnt,
  152. delta_ofdm->sent_ack_cnt,
  153. max_ofdm->sent_ack_cnt);
  154. pos += scnprintf(buf + pos, bufsz - pos,
  155. " %-30s %10u %10u %10u %10u\n",
  156. "sent_cts_cnt:",
  157. le32_to_cpu(ofdm->sent_cts_cnt),
  158. accum_ofdm->sent_cts_cnt,
  159. delta_ofdm->sent_cts_cnt, max_ofdm->sent_cts_cnt);
  160. pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
  161. "acumulative delta max\n",
  162. "Statistics_Rx - CCK:");
  163. pos += scnprintf(buf + pos, bufsz - pos,
  164. " %-30s %10u %10u %10u %10u\n",
  165. "ina_cnt:",
  166. le32_to_cpu(cck->ina_cnt), accum_cck->ina_cnt,
  167. delta_cck->ina_cnt, max_cck->ina_cnt);
  168. pos += scnprintf(buf + pos, bufsz - pos,
  169. " %-30s %10u %10u %10u %10u\n",
  170. "fina_cnt:",
  171. le32_to_cpu(cck->fina_cnt), accum_cck->fina_cnt,
  172. delta_cck->fina_cnt, max_cck->fina_cnt);
  173. pos += scnprintf(buf + pos, bufsz - pos,
  174. " %-30s %10u %10u %10u %10u\n",
  175. "plcp_err:",
  176. le32_to_cpu(cck->plcp_err), accum_cck->plcp_err,
  177. delta_cck->plcp_err, max_cck->plcp_err);
  178. pos += scnprintf(buf + pos, bufsz - pos,
  179. " %-30s %10u %10u %10u %10u\n",
  180. "crc32_err:",
  181. le32_to_cpu(cck->crc32_err), accum_cck->crc32_err,
  182. delta_cck->crc32_err, max_cck->crc32_err);
  183. pos += scnprintf(buf + pos, bufsz - pos,
  184. " %-30s %10u %10u %10u %10u\n",
  185. "overrun_err:",
  186. le32_to_cpu(cck->overrun_err),
  187. accum_cck->overrun_err,
  188. delta_cck->overrun_err, max_cck->overrun_err);
  189. pos += scnprintf(buf + pos, bufsz - pos,
  190. " %-30s %10u %10u %10u %10u\n",
  191. "early_overrun_err:",
  192. le32_to_cpu(cck->early_overrun_err),
  193. accum_cck->early_overrun_err,
  194. delta_cck->early_overrun_err,
  195. max_cck->early_overrun_err);
  196. pos += scnprintf(buf + pos, bufsz - pos,
  197. " %-30s %10u %10u %10u %10u\n",
  198. "crc32_good:",
  199. le32_to_cpu(cck->crc32_good), accum_cck->crc32_good,
  200. delta_cck->crc32_good,
  201. max_cck->crc32_good);
  202. pos += scnprintf(buf + pos, bufsz - pos,
  203. " %-30s %10u %10u %10u %10u\n",
  204. "false_alarm_cnt:",
  205. le32_to_cpu(cck->false_alarm_cnt),
  206. accum_cck->false_alarm_cnt,
  207. delta_cck->false_alarm_cnt, max_cck->false_alarm_cnt);
  208. pos += scnprintf(buf + pos, bufsz - pos,
  209. " %-30s %10u %10u %10u %10u\n",
  210. "fina_sync_err_cnt:",
  211. le32_to_cpu(cck->fina_sync_err_cnt),
  212. accum_cck->fina_sync_err_cnt,
  213. delta_cck->fina_sync_err_cnt,
  214. max_cck->fina_sync_err_cnt);
  215. pos += scnprintf(buf + pos, bufsz - pos,
  216. " %-30s %10u %10u %10u %10u\n",
  217. "sfd_timeout:",
  218. le32_to_cpu(cck->sfd_timeout),
  219. accum_cck->sfd_timeout,
  220. delta_cck->sfd_timeout, max_cck->sfd_timeout);
  221. pos += scnprintf(buf + pos, bufsz - pos,
  222. " %-30s %10u %10u %10u %10u\n",
  223. "fina_timeout:",
  224. le32_to_cpu(cck->fina_timeout),
  225. accum_cck->fina_timeout,
  226. delta_cck->fina_timeout, max_cck->fina_timeout);
  227. pos += scnprintf(buf + pos, bufsz - pos,
  228. " %-30s %10u %10u %10u %10u\n",
  229. "unresponded_rts:",
  230. le32_to_cpu(cck->unresponded_rts),
  231. accum_cck->unresponded_rts,
  232. delta_cck->unresponded_rts,
  233. max_cck->unresponded_rts);
  234. pos += scnprintf(buf + pos, bufsz - pos,
  235. " %-30s %10u %10u %10u %10u\n",
  236. "rxe_frame_lmt_ovrun:",
  237. le32_to_cpu(cck->rxe_frame_limit_overrun),
  238. accum_cck->rxe_frame_limit_overrun,
  239. delta_cck->rxe_frame_limit_overrun,
  240. max_cck->rxe_frame_limit_overrun);
  241. pos += scnprintf(buf + pos, bufsz - pos,
  242. " %-30s %10u %10u %10u %10u\n",
  243. "sent_ack_cnt:",
  244. le32_to_cpu(cck->sent_ack_cnt),
  245. accum_cck->sent_ack_cnt,
  246. delta_cck->sent_ack_cnt,
  247. max_cck->sent_ack_cnt);
  248. pos += scnprintf(buf + pos, bufsz - pos,
  249. " %-30s %10u %10u %10u %10u\n",
  250. "sent_cts_cnt:",
  251. le32_to_cpu(cck->sent_cts_cnt),
  252. accum_cck->sent_cts_cnt,
  253. delta_cck->sent_cts_cnt,
  254. max_cck->sent_cts_cnt);
  255. pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
  256. "acumulative delta max\n",
  257. "Statistics_Rx - GENERAL:");
  258. pos += scnprintf(buf + pos, bufsz - pos,
  259. " %-30s %10u %10u %10u %10u\n",
  260. "bogus_cts:",
  261. le32_to_cpu(general->bogus_cts),
  262. accum_general->bogus_cts,
  263. delta_general->bogus_cts, max_general->bogus_cts);
  264. pos += scnprintf(buf + pos, bufsz - pos,
  265. " %-30s %10u %10u %10u %10u\n",
  266. "bogus_ack:",
  267. le32_to_cpu(general->bogus_ack),
  268. accum_general->bogus_ack,
  269. delta_general->bogus_ack, max_general->bogus_ack);
  270. pos += scnprintf(buf + pos, bufsz - pos,
  271. " %-30s %10u %10u %10u %10u\n",
  272. "non_bssid_frames:",
  273. le32_to_cpu(general->non_bssid_frames),
  274. accum_general->non_bssid_frames,
  275. delta_general->non_bssid_frames,
  276. max_general->non_bssid_frames);
  277. pos += scnprintf(buf + pos, bufsz - pos,
  278. " %-30s %10u %10u %10u %10u\n",
  279. "filtered_frames:",
  280. le32_to_cpu(general->filtered_frames),
  281. accum_general->filtered_frames,
  282. delta_general->filtered_frames,
  283. max_general->filtered_frames);
  284. pos += scnprintf(buf + pos, bufsz - pos,
  285. " %-30s %10u %10u %10u %10u\n",
  286. "non_channel_beacons:",
  287. le32_to_cpu(general->non_channel_beacons),
  288. accum_general->non_channel_beacons,
  289. delta_general->non_channel_beacons,
  290. max_general->non_channel_beacons);
  291. ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
  292. kfree(buf);
  293. return ret;
  294. }
  295. ssize_t iwl3945_ucode_tx_stats_read(struct file *file,
  296. char __user *user_buf,
  297. size_t count, loff_t *ppos)
  298. {
  299. struct iwl_priv *priv = file->private_data;
  300. int pos = 0;
  301. char *buf;
  302. int bufsz = (sizeof(struct iwl39_statistics_tx) * 48) + 250;
  303. ssize_t ret;
  304. struct iwl39_statistics_tx *tx, *accum_tx, *delta_tx, *max_tx;
  305. if (!iwl_is_alive(priv))
  306. return -EAGAIN;
  307. buf = kzalloc(bufsz, GFP_KERNEL);
  308. if (!buf) {
  309. IWL_ERR(priv, "Can not allocate Buffer\n");
  310. return -ENOMEM;
  311. }
  312. /*
  313. * The statistic information display here is based on
  314. * the last statistics notification from uCode
  315. * might not reflect the current uCode activity
  316. */
  317. tx = &priv->_3945.statistics.tx;
  318. accum_tx = &priv->_3945.accum_statistics.tx;
  319. delta_tx = &priv->_3945.delta_statistics.tx;
  320. max_tx = &priv->_3945.max_delta.tx;
  321. pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
  322. pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
  323. "acumulative delta max\n",
  324. "Statistics_Tx:");
  325. pos += scnprintf(buf + pos, bufsz - pos,
  326. " %-30s %10u %10u %10u %10u\n",
  327. "preamble:",
  328. le32_to_cpu(tx->preamble_cnt),
  329. accum_tx->preamble_cnt,
  330. delta_tx->preamble_cnt, max_tx->preamble_cnt);
  331. pos += scnprintf(buf + pos, bufsz - pos,
  332. " %-30s %10u %10u %10u %10u\n",
  333. "rx_detected_cnt:",
  334. le32_to_cpu(tx->rx_detected_cnt),
  335. accum_tx->rx_detected_cnt,
  336. delta_tx->rx_detected_cnt, max_tx->rx_detected_cnt);
  337. pos += scnprintf(buf + pos, bufsz - pos,
  338. " %-30s %10u %10u %10u %10u\n",
  339. "bt_prio_defer_cnt:",
  340. le32_to_cpu(tx->bt_prio_defer_cnt),
  341. accum_tx->bt_prio_defer_cnt,
  342. delta_tx->bt_prio_defer_cnt,
  343. max_tx->bt_prio_defer_cnt);
  344. pos += scnprintf(buf + pos, bufsz - pos,
  345. " %-30s %10u %10u %10u %10u\n",
  346. "bt_prio_kill_cnt:",
  347. le32_to_cpu(tx->bt_prio_kill_cnt),
  348. accum_tx->bt_prio_kill_cnt,
  349. delta_tx->bt_prio_kill_cnt,
  350. max_tx->bt_prio_kill_cnt);
  351. pos += scnprintf(buf + pos, bufsz - pos,
  352. " %-30s %10u %10u %10u %10u\n",
  353. "few_bytes_cnt:",
  354. le32_to_cpu(tx->few_bytes_cnt),
  355. accum_tx->few_bytes_cnt,
  356. delta_tx->few_bytes_cnt, max_tx->few_bytes_cnt);
  357. pos += scnprintf(buf + pos, bufsz - pos,
  358. " %-30s %10u %10u %10u %10u\n",
  359. "cts_timeout:",
  360. le32_to_cpu(tx->cts_timeout), accum_tx->cts_timeout,
  361. delta_tx->cts_timeout, max_tx->cts_timeout);
  362. pos += scnprintf(buf + pos, bufsz - pos,
  363. " %-30s %10u %10u %10u %10u\n",
  364. "ack_timeout:",
  365. le32_to_cpu(tx->ack_timeout),
  366. accum_tx->ack_timeout,
  367. delta_tx->ack_timeout, max_tx->ack_timeout);
  368. pos += scnprintf(buf + pos, bufsz - pos,
  369. " %-30s %10u %10u %10u %10u\n",
  370. "expected_ack_cnt:",
  371. le32_to_cpu(tx->expected_ack_cnt),
  372. accum_tx->expected_ack_cnt,
  373. delta_tx->expected_ack_cnt,
  374. max_tx->expected_ack_cnt);
  375. pos += scnprintf(buf + pos, bufsz - pos,
  376. " %-30s %10u %10u %10u %10u\n",
  377. "actual_ack_cnt:",
  378. le32_to_cpu(tx->actual_ack_cnt),
  379. accum_tx->actual_ack_cnt,
  380. delta_tx->actual_ack_cnt,
  381. max_tx->actual_ack_cnt);
  382. ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
  383. kfree(buf);
  384. return ret;
  385. }
  386. ssize_t iwl3945_ucode_general_stats_read(struct file *file,
  387. char __user *user_buf,
  388. size_t count, loff_t *ppos)
  389. {
  390. struct iwl_priv *priv = file->private_data;
  391. int pos = 0;
  392. char *buf;
  393. int bufsz = sizeof(struct iwl39_statistics_general) * 10 + 300;
  394. ssize_t ret;
  395. struct iwl39_statistics_general *general, *accum_general;
  396. struct iwl39_statistics_general *delta_general, *max_general;
  397. struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg;
  398. struct iwl39_statistics_div *div, *accum_div, *delta_div, *max_div;
  399. if (!iwl_is_alive(priv))
  400. return -EAGAIN;
  401. buf = kzalloc(bufsz, GFP_KERNEL);
  402. if (!buf) {
  403. IWL_ERR(priv, "Can not allocate Buffer\n");
  404. return -ENOMEM;
  405. }
  406. /*
  407. * The statistic information display here is based on
  408. * the last statistics notification from uCode
  409. * might not reflect the current uCode activity
  410. */
  411. general = &priv->_3945.statistics.general;
  412. dbg = &priv->_3945.statistics.general.dbg;
  413. div = &priv->_3945.statistics.general.div;
  414. accum_general = &priv->_3945.accum_statistics.general;
  415. delta_general = &priv->_3945.delta_statistics.general;
  416. max_general = &priv->_3945.max_delta.general;
  417. accum_dbg = &priv->_3945.accum_statistics.general.dbg;
  418. delta_dbg = &priv->_3945.delta_statistics.general.dbg;
  419. max_dbg = &priv->_3945.max_delta.general.dbg;
  420. accum_div = &priv->_3945.accum_statistics.general.div;
  421. delta_div = &priv->_3945.delta_statistics.general.div;
  422. max_div = &priv->_3945.max_delta.general.div;
  423. pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
  424. pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
  425. "acumulative delta max\n",
  426. "Statistics_General:");
  427. pos += scnprintf(buf + pos, bufsz - pos,
  428. " %-30s %10u %10u %10u %10u\n",
  429. "burst_check:",
  430. le32_to_cpu(dbg->burst_check),
  431. accum_dbg->burst_check,
  432. delta_dbg->burst_check, max_dbg->burst_check);
  433. pos += scnprintf(buf + pos, bufsz - pos,
  434. " %-30s %10u %10u %10u %10u\n",
  435. "burst_count:",
  436. le32_to_cpu(dbg->burst_count),
  437. accum_dbg->burst_count,
  438. delta_dbg->burst_count, max_dbg->burst_count);
  439. pos += scnprintf(buf + pos, bufsz - pos,
  440. " %-30s %10u %10u %10u %10u\n",
  441. "sleep_time:",
  442. le32_to_cpu(general->sleep_time),
  443. accum_general->sleep_time,
  444. delta_general->sleep_time, max_general->sleep_time);
  445. pos += scnprintf(buf + pos, bufsz - pos,
  446. " %-30s %10u %10u %10u %10u\n",
  447. "slots_out:",
  448. le32_to_cpu(general->slots_out),
  449. accum_general->slots_out,
  450. delta_general->slots_out, max_general->slots_out);
  451. pos += scnprintf(buf + pos, bufsz - pos,
  452. " %-30s %10u %10u %10u %10u\n",
  453. "slots_idle:",
  454. le32_to_cpu(general->slots_idle),
  455. accum_general->slots_idle,
  456. delta_general->slots_idle, max_general->slots_idle);
  457. pos += scnprintf(buf + pos, bufsz - pos, "ttl_timestamp:\t\t\t%u\n",
  458. le32_to_cpu(general->ttl_timestamp));
  459. pos += scnprintf(buf + pos, bufsz - pos,
  460. " %-30s %10u %10u %10u %10u\n",
  461. "tx_on_a:",
  462. le32_to_cpu(div->tx_on_a), accum_div->tx_on_a,
  463. delta_div->tx_on_a, max_div->tx_on_a);
  464. pos += scnprintf(buf + pos, bufsz - pos,
  465. " %-30s %10u %10u %10u %10u\n",
  466. "tx_on_b:",
  467. le32_to_cpu(div->tx_on_b), accum_div->tx_on_b,
  468. delta_div->tx_on_b, max_div->tx_on_b);
  469. pos += scnprintf(buf + pos, bufsz - pos,
  470. " %-30s %10u %10u %10u %10u\n",
  471. "exec_time:",
  472. le32_to_cpu(div->exec_time), accum_div->exec_time,
  473. delta_div->exec_time, max_div->exec_time);
  474. pos += scnprintf(buf + pos, bufsz - pos,
  475. " %-30s %10u %10u %10u %10u\n",
  476. "probe_time:",
  477. le32_to_cpu(div->probe_time), accum_div->probe_time,
  478. delta_div->probe_time, max_div->probe_time);
  479. ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
  480. kfree(buf);
  481. return ret;
  482. }