debugfs.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. /*
  2. * Intel Wireless Multicomm 3200 WiFi driver
  3. *
  4. * Copyright (C) 2009 Intel Corporation <ilw@linux.intel.com>
  5. * Samuel Ortiz <samuel.ortiz@intel.com>
  6. * Zhu Yi <yi.zhu@intel.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License version
  10. * 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20. * 02110-1301, USA.
  21. *
  22. */
  23. #include <linux/slab.h>
  24. #include <linux/kernel.h>
  25. #include <linux/bitops.h>
  26. #include <linux/debugfs.h>
  27. #include "iwm.h"
  28. #include "bus.h"
  29. #include "rx.h"
  30. #include "debug.h"
  31. static struct {
  32. u8 id;
  33. char *name;
  34. } iwm_debug_module[__IWM_DM_NR] = {
  35. {IWM_DM_BOOT, "boot"},
  36. {IWM_DM_FW, "fw"},
  37. {IWM_DM_SDIO, "sdio"},
  38. {IWM_DM_NTF, "ntf"},
  39. {IWM_DM_RX, "rx"},
  40. {IWM_DM_TX, "tx"},
  41. {IWM_DM_MLME, "mlme"},
  42. {IWM_DM_CMD, "cmd"},
  43. {IWM_DM_WEXT, "wext"},
  44. };
  45. #define add_dbg_module(dbg, name, id, initlevel) \
  46. do { \
  47. struct dentry *d; \
  48. dbg.dbg_module[id] = (initlevel); \
  49. d = debugfs_create_x8(name, 0600, dbg.dbgdir, \
  50. &(dbg.dbg_module[id])); \
  51. if (!IS_ERR(d)) \
  52. dbg.dbg_module_dentries[id] = d; \
  53. } while (0)
  54. static int iwm_debugfs_u32_read(void *data, u64 *val)
  55. {
  56. struct iwm_priv *iwm = data;
  57. *val = iwm->dbg.dbg_level;
  58. return 0;
  59. }
  60. static int iwm_debugfs_dbg_level_write(void *data, u64 val)
  61. {
  62. struct iwm_priv *iwm = data;
  63. int i;
  64. iwm->dbg.dbg_level = val;
  65. for (i = 0; i < __IWM_DM_NR; i++)
  66. iwm->dbg.dbg_module[i] = val;
  67. return 0;
  68. }
  69. DEFINE_SIMPLE_ATTRIBUTE(fops_iwm_dbg_level,
  70. iwm_debugfs_u32_read, iwm_debugfs_dbg_level_write,
  71. "%llu\n");
  72. static int iwm_debugfs_dbg_modules_write(void *data, u64 val)
  73. {
  74. struct iwm_priv *iwm = data;
  75. int i, bit;
  76. iwm->dbg.dbg_modules = val;
  77. for (i = 0; i < __IWM_DM_NR; i++)
  78. iwm->dbg.dbg_module[i] = 0;
  79. for_each_set_bit(bit, &iwm->dbg.dbg_modules, __IWM_DM_NR)
  80. iwm->dbg.dbg_module[bit] = iwm->dbg.dbg_level;
  81. return 0;
  82. }
  83. DEFINE_SIMPLE_ATTRIBUTE(fops_iwm_dbg_modules,
  84. iwm_debugfs_u32_read, iwm_debugfs_dbg_modules_write,
  85. "%llu\n");
  86. static int iwm_generic_open(struct inode *inode, struct file *filp)
  87. {
  88. filp->private_data = inode->i_private;
  89. return 0;
  90. }
  91. static ssize_t iwm_debugfs_txq_read(struct file *filp, char __user *buffer,
  92. size_t count, loff_t *ppos)
  93. {
  94. struct iwm_priv *iwm = filp->private_data;
  95. char *buf;
  96. int i, buf_len = 4096;
  97. size_t len = 0;
  98. ssize_t ret;
  99. if (*ppos != 0)
  100. return 0;
  101. if (count < sizeof(buf))
  102. return -ENOSPC;
  103. buf = kzalloc(buf_len, GFP_KERNEL);
  104. if (!buf)
  105. return -ENOMEM;
  106. for (i = 0; i < IWM_TX_QUEUES; i++) {
  107. struct iwm_tx_queue *txq = &iwm->txq[i];
  108. struct sk_buff *skb;
  109. int j;
  110. unsigned long flags;
  111. spin_lock_irqsave(&txq->queue.lock, flags);
  112. skb = (struct sk_buff *)&txq->queue;
  113. len += snprintf(buf + len, buf_len - len, "TXQ #%d\n", i);
  114. len += snprintf(buf + len, buf_len - len, "\tStopped: %d\n",
  115. __netif_subqueue_stopped(iwm_to_ndev(iwm),
  116. txq->id));
  117. len += snprintf(buf + len, buf_len - len, "\tConcat count:%d\n",
  118. txq->concat_count);
  119. len += snprintf(buf + len, buf_len - len, "\tQueue len: %d\n",
  120. skb_queue_len(&txq->queue));
  121. for (j = 0; j < skb_queue_len(&txq->queue); j++) {
  122. struct iwm_tx_info *tx_info;
  123. skb = skb->next;
  124. tx_info = skb_to_tx_info(skb);
  125. len += snprintf(buf + len, buf_len - len,
  126. "\tSKB #%d\n", j);
  127. len += snprintf(buf + len, buf_len - len,
  128. "\t\tsta: %d\n", tx_info->sta);
  129. len += snprintf(buf + len, buf_len - len,
  130. "\t\tcolor: %d\n", tx_info->color);
  131. len += snprintf(buf + len, buf_len - len,
  132. "\t\ttid: %d\n", tx_info->tid);
  133. }
  134. spin_unlock_irqrestore(&txq->queue.lock, flags);
  135. spin_lock_irqsave(&txq->stopped_queue.lock, flags);
  136. len += snprintf(buf + len, buf_len - len,
  137. "\tStopped Queue len: %d\n",
  138. skb_queue_len(&txq->stopped_queue));
  139. for (j = 0; j < skb_queue_len(&txq->stopped_queue); j++) {
  140. struct iwm_tx_info *tx_info;
  141. skb = skb->next;
  142. tx_info = skb_to_tx_info(skb);
  143. len += snprintf(buf + len, buf_len - len,
  144. "\tSKB #%d\n", j);
  145. len += snprintf(buf + len, buf_len - len,
  146. "\t\tsta: %d\n", tx_info->sta);
  147. len += snprintf(buf + len, buf_len - len,
  148. "\t\tcolor: %d\n", tx_info->color);
  149. len += snprintf(buf + len, buf_len - len,
  150. "\t\ttid: %d\n", tx_info->tid);
  151. }
  152. spin_unlock_irqrestore(&txq->stopped_queue.lock, flags);
  153. }
  154. ret = simple_read_from_buffer(buffer, len, ppos, buf, buf_len);
  155. kfree(buf);
  156. return ret;
  157. }
  158. static ssize_t iwm_debugfs_tx_credit_read(struct file *filp,
  159. char __user *buffer,
  160. size_t count, loff_t *ppos)
  161. {
  162. struct iwm_priv *iwm = filp->private_data;
  163. struct iwm_tx_credit *credit = &iwm->tx_credit;
  164. char *buf;
  165. int i, buf_len = 4096;
  166. size_t len = 0;
  167. ssize_t ret;
  168. if (*ppos != 0)
  169. return 0;
  170. if (count < sizeof(buf))
  171. return -ENOSPC;
  172. buf = kzalloc(buf_len, GFP_KERNEL);
  173. if (!buf)
  174. return -ENOMEM;
  175. len += snprintf(buf + len, buf_len - len,
  176. "NR pools: %d\n", credit->pool_nr);
  177. len += snprintf(buf + len, buf_len - len,
  178. "pools map: 0x%lx\n", credit->full_pools_map);
  179. len += snprintf(buf + len, buf_len - len, "\n### POOLS ###\n");
  180. for (i = 0; i < IWM_MACS_OUT_GROUPS; i++) {
  181. len += snprintf(buf + len, buf_len - len,
  182. "pools entry #%d\n", i);
  183. len += snprintf(buf + len, buf_len - len,
  184. "\tid: %d\n",
  185. credit->pools[i].id);
  186. len += snprintf(buf + len, buf_len - len,
  187. "\tsid: %d\n",
  188. credit->pools[i].sid);
  189. len += snprintf(buf + len, buf_len - len,
  190. "\tmin_pages: %d\n",
  191. credit->pools[i].min_pages);
  192. len += snprintf(buf + len, buf_len - len,
  193. "\tmax_pages: %d\n",
  194. credit->pools[i].max_pages);
  195. len += snprintf(buf + len, buf_len - len,
  196. "\talloc_pages: %d\n",
  197. credit->pools[i].alloc_pages);
  198. len += snprintf(buf + len, buf_len - len,
  199. "\tfreed_pages: %d\n",
  200. credit->pools[i].total_freed_pages);
  201. }
  202. len += snprintf(buf + len, buf_len - len, "\n### SPOOLS ###\n");
  203. for (i = 0; i < IWM_MACS_OUT_SGROUPS; i++) {
  204. len += snprintf(buf + len, buf_len - len,
  205. "spools entry #%d\n", i);
  206. len += snprintf(buf + len, buf_len - len,
  207. "\tid: %d\n",
  208. credit->spools[i].id);
  209. len += snprintf(buf + len, buf_len - len,
  210. "\tmax_pages: %d\n",
  211. credit->spools[i].max_pages);
  212. len += snprintf(buf + len, buf_len - len,
  213. "\talloc_pages: %d\n",
  214. credit->spools[i].alloc_pages);
  215. }
  216. ret = simple_read_from_buffer(buffer, len, ppos, buf, buf_len);
  217. kfree(buf);
  218. return ret;
  219. }
  220. static ssize_t iwm_debugfs_rx_ticket_read(struct file *filp,
  221. char __user *buffer,
  222. size_t count, loff_t *ppos)
  223. {
  224. struct iwm_priv *iwm = filp->private_data;
  225. struct iwm_rx_ticket_node *ticket, *next;
  226. char *buf;
  227. int buf_len = 4096, i;
  228. size_t len = 0;
  229. ssize_t ret;
  230. if (*ppos != 0)
  231. return 0;
  232. if (count < sizeof(buf))
  233. return -ENOSPC;
  234. buf = kzalloc(buf_len, GFP_KERNEL);
  235. if (!buf)
  236. return -ENOMEM;
  237. list_for_each_entry_safe(ticket, next, &iwm->rx_tickets, node) {
  238. len += snprintf(buf + len, buf_len - len, "Ticket #%d\n",
  239. ticket->ticket->id);
  240. len += snprintf(buf + len, buf_len - len, "\taction: 0x%x\n",
  241. ticket->ticket->action);
  242. len += snprintf(buf + len, buf_len - len, "\tflags: 0x%x\n",
  243. ticket->ticket->flags);
  244. }
  245. for (i = 0; i < IWM_RX_ID_HASH; i++) {
  246. struct iwm_rx_packet *packet, *nxt;
  247. struct list_head *pkt_list = &iwm->rx_packets[i];
  248. if (!list_empty(pkt_list)) {
  249. len += snprintf(buf + len, buf_len - len,
  250. "Packet hash #%d\n", i);
  251. list_for_each_entry_safe(packet, nxt, pkt_list, node) {
  252. len += snprintf(buf + len, buf_len - len,
  253. "\tPacket id: %d\n",
  254. packet->id);
  255. len += snprintf(buf + len, buf_len - len,
  256. "\tPacket length: %lu\n",
  257. packet->pkt_size);
  258. }
  259. }
  260. }
  261. ret = simple_read_from_buffer(buffer, len, ppos, buf, buf_len);
  262. kfree(buf);
  263. return ret;
  264. }
  265. static ssize_t iwm_debugfs_fw_err_read(struct file *filp,
  266. char __user *buffer,
  267. size_t count, loff_t *ppos)
  268. {
  269. struct iwm_priv *iwm = filp->private_data;
  270. char buf[512];
  271. int buf_len = 512;
  272. size_t len = 0;
  273. if (*ppos != 0)
  274. return 0;
  275. if (count < sizeof(buf))
  276. return -ENOSPC;
  277. if (!iwm->last_fw_err)
  278. return -ENOMEM;
  279. if (iwm->last_fw_err->line_num == 0)
  280. goto out;
  281. len += snprintf(buf + len, buf_len - len, "%cMAC FW ERROR:\n",
  282. (le32_to_cpu(iwm->last_fw_err->category) == UMAC_SYS_ERR_CAT_LMAC)
  283. ? 'L' : 'U');
  284. len += snprintf(buf + len, buf_len - len,
  285. "\tCategory: %d\n",
  286. le32_to_cpu(iwm->last_fw_err->category));
  287. len += snprintf(buf + len, buf_len - len,
  288. "\tStatus: 0x%x\n",
  289. le32_to_cpu(iwm->last_fw_err->status));
  290. len += snprintf(buf + len, buf_len - len,
  291. "\tPC: 0x%x\n",
  292. le32_to_cpu(iwm->last_fw_err->pc));
  293. len += snprintf(buf + len, buf_len - len,
  294. "\tblink1: %d\n",
  295. le32_to_cpu(iwm->last_fw_err->blink1));
  296. len += snprintf(buf + len, buf_len - len,
  297. "\tblink2: %d\n",
  298. le32_to_cpu(iwm->last_fw_err->blink2));
  299. len += snprintf(buf + len, buf_len - len,
  300. "\tilink1: %d\n",
  301. le32_to_cpu(iwm->last_fw_err->ilink1));
  302. len += snprintf(buf + len, buf_len - len,
  303. "\tilink2: %d\n",
  304. le32_to_cpu(iwm->last_fw_err->ilink2));
  305. len += snprintf(buf + len, buf_len - len,
  306. "\tData1: 0x%x\n",
  307. le32_to_cpu(iwm->last_fw_err->data1));
  308. len += snprintf(buf + len, buf_len - len,
  309. "\tData2: 0x%x\n",
  310. le32_to_cpu(iwm->last_fw_err->data2));
  311. len += snprintf(buf + len, buf_len - len,
  312. "\tLine number: %d\n",
  313. le32_to_cpu(iwm->last_fw_err->line_num));
  314. len += snprintf(buf + len, buf_len - len,
  315. "\tUMAC status: 0x%x\n",
  316. le32_to_cpu(iwm->last_fw_err->umac_status));
  317. len += snprintf(buf + len, buf_len - len,
  318. "\tLMAC status: 0x%x\n",
  319. le32_to_cpu(iwm->last_fw_err->lmac_status));
  320. len += snprintf(buf + len, buf_len - len,
  321. "\tSDIO status: 0x%x\n",
  322. le32_to_cpu(iwm->last_fw_err->sdio_status));
  323. out:
  324. return simple_read_from_buffer(buffer, len, ppos, buf, buf_len);
  325. }
  326. static const struct file_operations iwm_debugfs_txq_fops = {
  327. .owner = THIS_MODULE,
  328. .open = iwm_generic_open,
  329. .read = iwm_debugfs_txq_read,
  330. };
  331. static const struct file_operations iwm_debugfs_tx_credit_fops = {
  332. .owner = THIS_MODULE,
  333. .open = iwm_generic_open,
  334. .read = iwm_debugfs_tx_credit_read,
  335. };
  336. static const struct file_operations iwm_debugfs_rx_ticket_fops = {
  337. .owner = THIS_MODULE,
  338. .open = iwm_generic_open,
  339. .read = iwm_debugfs_rx_ticket_read,
  340. };
  341. static const struct file_operations iwm_debugfs_fw_err_fops = {
  342. .owner = THIS_MODULE,
  343. .open = iwm_generic_open,
  344. .read = iwm_debugfs_fw_err_read,
  345. };
  346. int iwm_debugfs_init(struct iwm_priv *iwm)
  347. {
  348. int i, result;
  349. char devdir[16];
  350. iwm->dbg.rootdir = debugfs_create_dir(KBUILD_MODNAME, NULL);
  351. result = PTR_ERR(iwm->dbg.rootdir);
  352. if (!result || IS_ERR(iwm->dbg.rootdir)) {
  353. if (result == -ENODEV) {
  354. IWM_ERR(iwm, "DebugFS (CONFIG_DEBUG_FS) not "
  355. "enabled in kernel config\n");
  356. result = 0; /* No debugfs support */
  357. }
  358. IWM_ERR(iwm, "Couldn't create rootdir: %d\n", result);
  359. goto error;
  360. }
  361. snprintf(devdir, sizeof(devdir), "%s", wiphy_name(iwm_to_wiphy(iwm)));
  362. iwm->dbg.devdir = debugfs_create_dir(devdir, iwm->dbg.rootdir);
  363. result = PTR_ERR(iwm->dbg.devdir);
  364. if (IS_ERR(iwm->dbg.devdir) && (result != -ENODEV)) {
  365. IWM_ERR(iwm, "Couldn't create devdir: %d\n", result);
  366. goto error;
  367. }
  368. iwm->dbg.dbgdir = debugfs_create_dir("debug", iwm->dbg.devdir);
  369. result = PTR_ERR(iwm->dbg.dbgdir);
  370. if (IS_ERR(iwm->dbg.dbgdir) && (result != -ENODEV)) {
  371. IWM_ERR(iwm, "Couldn't create dbgdir: %d\n", result);
  372. goto error;
  373. }
  374. iwm->dbg.rxdir = debugfs_create_dir("rx", iwm->dbg.devdir);
  375. result = PTR_ERR(iwm->dbg.rxdir);
  376. if (IS_ERR(iwm->dbg.rxdir) && (result != -ENODEV)) {
  377. IWM_ERR(iwm, "Couldn't create rx dir: %d\n", result);
  378. goto error;
  379. }
  380. iwm->dbg.txdir = debugfs_create_dir("tx", iwm->dbg.devdir);
  381. result = PTR_ERR(iwm->dbg.txdir);
  382. if (IS_ERR(iwm->dbg.txdir) && (result != -ENODEV)) {
  383. IWM_ERR(iwm, "Couldn't create tx dir: %d\n", result);
  384. goto error;
  385. }
  386. iwm->dbg.busdir = debugfs_create_dir("bus", iwm->dbg.devdir);
  387. result = PTR_ERR(iwm->dbg.busdir);
  388. if (IS_ERR(iwm->dbg.busdir) && (result != -ENODEV)) {
  389. IWM_ERR(iwm, "Couldn't create bus dir: %d\n", result);
  390. goto error;
  391. }
  392. if (iwm->bus_ops->debugfs_init) {
  393. result = iwm->bus_ops->debugfs_init(iwm, iwm->dbg.busdir);
  394. if (result < 0) {
  395. IWM_ERR(iwm, "Couldn't create bus entry: %d\n", result);
  396. goto error;
  397. }
  398. }
  399. iwm->dbg.dbg_level = IWM_DL_NONE;
  400. iwm->dbg.dbg_level_dentry =
  401. debugfs_create_file("level", 0200, iwm->dbg.dbgdir, iwm,
  402. &fops_iwm_dbg_level);
  403. result = PTR_ERR(iwm->dbg.dbg_level_dentry);
  404. if (IS_ERR(iwm->dbg.dbg_level_dentry) && (result != -ENODEV)) {
  405. IWM_ERR(iwm, "Couldn't create dbg_level: %d\n", result);
  406. goto error;
  407. }
  408. iwm->dbg.dbg_modules = IWM_DM_DEFAULT;
  409. iwm->dbg.dbg_modules_dentry =
  410. debugfs_create_file("modules", 0200, iwm->dbg.dbgdir, iwm,
  411. &fops_iwm_dbg_modules);
  412. result = PTR_ERR(iwm->dbg.dbg_modules_dentry);
  413. if (IS_ERR(iwm->dbg.dbg_modules_dentry) && (result != -ENODEV)) {
  414. IWM_ERR(iwm, "Couldn't create dbg_modules: %d\n", result);
  415. goto error;
  416. }
  417. for (i = 0; i < __IWM_DM_NR; i++)
  418. add_dbg_module(iwm->dbg, iwm_debug_module[i].name,
  419. iwm_debug_module[i].id, IWM_DL_DEFAULT);
  420. iwm->dbg.txq_dentry = debugfs_create_file("queues", 0200,
  421. iwm->dbg.txdir, iwm,
  422. &iwm_debugfs_txq_fops);
  423. result = PTR_ERR(iwm->dbg.txq_dentry);
  424. if (IS_ERR(iwm->dbg.txq_dentry) && (result != -ENODEV)) {
  425. IWM_ERR(iwm, "Couldn't create tx queue: %d\n", result);
  426. goto error;
  427. }
  428. iwm->dbg.tx_credit_dentry = debugfs_create_file("credits", 0200,
  429. iwm->dbg.txdir, iwm,
  430. &iwm_debugfs_tx_credit_fops);
  431. result = PTR_ERR(iwm->dbg.tx_credit_dentry);
  432. if (IS_ERR(iwm->dbg.tx_credit_dentry) && (result != -ENODEV)) {
  433. IWM_ERR(iwm, "Couldn't create tx credit: %d\n", result);
  434. goto error;
  435. }
  436. iwm->dbg.rx_ticket_dentry = debugfs_create_file("tickets", 0200,
  437. iwm->dbg.rxdir, iwm,
  438. &iwm_debugfs_rx_ticket_fops);
  439. result = PTR_ERR(iwm->dbg.rx_ticket_dentry);
  440. if (IS_ERR(iwm->dbg.rx_ticket_dentry) && (result != -ENODEV)) {
  441. IWM_ERR(iwm, "Couldn't create rx ticket: %d\n", result);
  442. goto error;
  443. }
  444. iwm->dbg.fw_err_dentry = debugfs_create_file("last_fw_err", 0200,
  445. iwm->dbg.dbgdir, iwm,
  446. &iwm_debugfs_fw_err_fops);
  447. result = PTR_ERR(iwm->dbg.fw_err_dentry);
  448. if (IS_ERR(iwm->dbg.fw_err_dentry) && (result != -ENODEV)) {
  449. IWM_ERR(iwm, "Couldn't create last FW err: %d\n", result);
  450. goto error;
  451. }
  452. return 0;
  453. error:
  454. return result;
  455. }
  456. void iwm_debugfs_exit(struct iwm_priv *iwm)
  457. {
  458. int i;
  459. for (i = 0; i < __IWM_DM_NR; i++)
  460. debugfs_remove(iwm->dbg.dbg_module_dentries[i]);
  461. debugfs_remove(iwm->dbg.dbg_modules_dentry);
  462. debugfs_remove(iwm->dbg.dbg_level_dentry);
  463. debugfs_remove(iwm->dbg.txq_dentry);
  464. debugfs_remove(iwm->dbg.tx_credit_dentry);
  465. debugfs_remove(iwm->dbg.rx_ticket_dentry);
  466. debugfs_remove(iwm->dbg.fw_err_dentry);
  467. if (iwm->bus_ops->debugfs_exit)
  468. iwm->bus_ops->debugfs_exit(iwm);
  469. debugfs_remove(iwm->dbg.busdir);
  470. debugfs_remove(iwm->dbg.dbgdir);
  471. debugfs_remove(iwm->dbg.txdir);
  472. debugfs_remove(iwm->dbg.rxdir);
  473. debugfs_remove(iwm->dbg.devdir);
  474. debugfs_remove(iwm->dbg.rootdir);
  475. }