debugfs.c 15 KB

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