2 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #include <linux/module.h>
18 #include <linux/debugfs.h>
19 #include <linux/seq_file.h>
20 #include <linux/pci.h>
21 #include <linux/rtnetlink.h>
22 #include <linux/power_supply.h>
29 /* Nasty hack. Better have per device instances */
31 static u32 dbg_txdesc_index
;
32 static u32 dbg_vring_index
; /* 24+ for Rx, 0..23 for Tx */
33 u32 vring_idle_trsh
= 16; /* HW fetches up to 16 descriptors at once */
47 enum dbg_off_type type
;
50 static void wil_print_vring(struct seq_file
*s
, struct wil6210_priv
*wil
,
51 const char *name
, struct vring
*vring
,
54 void __iomem
*x
= wmi_addr(wil
, vring
->hwtail
);
57 seq_printf(s
, "VRING %s = {\n", name
);
58 seq_printf(s
, " pa = %pad\n", &vring
->pa
);
59 seq_printf(s
, " va = 0x%p\n", vring
->va
);
60 seq_printf(s
, " size = %d\n", vring
->size
);
61 seq_printf(s
, " swtail = %d\n", vring
->swtail
);
62 seq_printf(s
, " swhead = %d\n", vring
->swhead
);
63 seq_printf(s
, " hwtail = [0x%08x] -> ", vring
->hwtail
);
66 seq_printf(s
, "0x%08x = %d\n", v
, v
);
71 if (vring
->va
&& (vring
->size
< 1025)) {
74 for (i
= 0; i
< vring
->size
; i
++) {
75 volatile struct vring_tx_desc
*d
= &vring
->va
[i
].tx
;
77 if ((i
% 64) == 0 && (i
!= 0))
79 seq_printf(s
, "%c", (d
->dma
.status
& BIT(0)) ?
80 _s
: (vring
->ctx
[i
].skb
? _h
: 'h'));
87 static int wil_vring_debugfs_show(struct seq_file
*s
, void *data
)
90 struct wil6210_priv
*wil
= s
->private;
92 wil_print_vring(s
, wil
, "rx", &wil
->vring_rx
, 'S', '_');
94 for (i
= 0; i
< ARRAY_SIZE(wil
->vring_tx
); i
++) {
95 struct vring
*vring
= &wil
->vring_tx
[i
];
96 struct vring_tx_data
*txdata
= &wil
->vring_tx_data
[i
];
99 int cid
= wil
->vring2cid_tid
[i
][0];
100 int tid
= wil
->vring2cid_tid
[i
][1];
101 u32 swhead
= vring
->swhead
;
102 u32 swtail
= vring
->swtail
;
103 int used
= (vring
->size
+ swhead
- swtail
)
105 int avail
= vring
->size
- used
- 1;
108 /* performance monitoring */
109 cycles_t now
= get_cycles();
110 uint64_t idle
= txdata
->idle
* 100;
111 uint64_t total
= now
- txdata
->begin
;
115 snprintf(sidle
, sizeof(sidle
), "%3d%%",
118 snprintf(sidle
, sizeof(sidle
), "N/A");
123 snprintf(name
, sizeof(name
), "tx_%2d", i
);
125 if (cid
< WIL6210_MAX_CID
)
127 "\n%pM CID %d TID %d BACK([%u] %u TU A%s) [%3d|%3d] idle %s\n",
128 wil
->sta
[cid
].addr
, cid
, tid
,
131 txdata
->agg_amsdu
? "+" : "-",
135 "\nBroadcast [%3d|%3d] idle %s\n",
138 wil_print_vring(s
, wil
, name
, vring
, '_', 'H');
145 static int wil_vring_seq_open(struct inode
*inode
, struct file
*file
)
147 return single_open(file
, wil_vring_debugfs_show
, inode
->i_private
);
150 static const struct file_operations fops_vring
= {
151 .open
= wil_vring_seq_open
,
152 .release
= single_release
,
157 static void wil_print_ring(struct seq_file
*s
, const char *prefix
,
160 struct wil6210_priv
*wil
= s
->private;
161 struct wil6210_mbox_ring r
;
165 wil_memcpy_fromio_32(&r
, off
, sizeof(r
));
166 wil_mbox_ring_le2cpus(&r
);
168 * we just read memory block from NIC. This memory may be
169 * garbage. Check validity before using it.
171 rsize
= r
.size
/ sizeof(struct wil6210_mbox_ring_desc
);
173 seq_printf(s
, "ring %s = {\n", prefix
);
174 seq_printf(s
, " base = 0x%08x\n", r
.base
);
175 seq_printf(s
, " size = 0x%04x bytes -> %d entries\n", r
.size
, rsize
);
176 seq_printf(s
, " tail = 0x%08x\n", r
.tail
);
177 seq_printf(s
, " head = 0x%08x\n", r
.head
);
178 seq_printf(s
, " entry size = %d\n", r
.entry_size
);
180 if (r
.size
% sizeof(struct wil6210_mbox_ring_desc
)) {
181 seq_printf(s
, " ??? size is not multiple of %zd, garbage?\n",
182 sizeof(struct wil6210_mbox_ring_desc
));
186 if (!wmi_addr(wil
, r
.base
) ||
187 !wmi_addr(wil
, r
.tail
) ||
188 !wmi_addr(wil
, r
.head
)) {
189 seq_puts(s
, " ??? pointers are garbage?\n");
193 for (i
= 0; i
< rsize
; i
++) {
194 struct wil6210_mbox_ring_desc d
;
195 struct wil6210_mbox_hdr hdr
;
196 size_t delta
= i
* sizeof(d
);
197 void __iomem
*x
= wil
->csr
+ HOSTADDR(r
.base
) + delta
;
199 wil_memcpy_fromio_32(&d
, x
, sizeof(d
));
201 seq_printf(s
, " [%2x] %s %s%s 0x%08x", i
,
203 (r
.tail
- r
.base
== delta
) ? "t" : " ",
204 (r
.head
- r
.base
== delta
) ? "h" : " ",
205 le32_to_cpu(d
.addr
));
206 if (0 == wmi_read_hdr(wil
, d
.addr
, &hdr
)) {
207 u16 len
= le16_to_cpu(hdr
.len
);
209 seq_printf(s
, " -> %04x %04x %04x %02x\n",
210 le16_to_cpu(hdr
.seq
), len
,
211 le16_to_cpu(hdr
.type
), hdr
.flags
);
212 if (len
<= MAX_MBOXITEM_SIZE
) {
214 char printbuf
[16 * 3 + 2];
215 unsigned char databuf
[MAX_MBOXITEM_SIZE
];
216 void __iomem
*src
= wmi_buffer(wil
, d
.addr
) +
217 sizeof(struct wil6210_mbox_hdr
);
219 * No need to check @src for validity -
220 * we already validated @d.addr while
223 wil_memcpy_fromio_32(databuf
, src
, len
);
225 int l
= min(len
- n
, 16);
227 hex_dump_to_buffer(databuf
+ n
, l
,
231 seq_printf(s
, " : %s\n", printbuf
);
243 static int wil_mbox_debugfs_show(struct seq_file
*s
, void *data
)
245 struct wil6210_priv
*wil
= s
->private;
247 wil_print_ring(s
, "tx", wil
->csr
+ HOST_MBOX
+
248 offsetof(struct wil6210_mbox_ctl
, tx
));
249 wil_print_ring(s
, "rx", wil
->csr
+ HOST_MBOX
+
250 offsetof(struct wil6210_mbox_ctl
, rx
));
255 static int wil_mbox_seq_open(struct inode
*inode
, struct file
*file
)
257 return single_open(file
, wil_mbox_debugfs_show
, inode
->i_private
);
260 static const struct file_operations fops_mbox
= {
261 .open
= wil_mbox_seq_open
,
262 .release
= single_release
,
267 static int wil_debugfs_iomem_x32_set(void *data
, u64 val
)
269 iowrite32(val
, (void __iomem
*)data
);
270 wmb(); /* make sure write propagated to HW */
275 static int wil_debugfs_iomem_x32_get(void *data
, u64
*val
)
277 *val
= ioread32((void __iomem
*)data
);
282 DEFINE_SIMPLE_ATTRIBUTE(fops_iomem_x32
, wil_debugfs_iomem_x32_get
,
283 wil_debugfs_iomem_x32_set
, "0x%08llx\n");
285 static struct dentry
*wil_debugfs_create_iomem_x32(const char *name
,
287 struct dentry
*parent
,
290 return debugfs_create_file(name
, mode
, parent
, value
,
294 static int wil_debugfs_ulong_set(void *data
, u64 val
)
296 *(ulong
*)data
= val
;
300 static int wil_debugfs_ulong_get(void *data
, u64
*val
)
302 *val
= *(ulong
*)data
;
306 DEFINE_SIMPLE_ATTRIBUTE(wil_fops_ulong
, wil_debugfs_ulong_get
,
307 wil_debugfs_ulong_set
, "%llu\n");
309 static struct dentry
*wil_debugfs_create_ulong(const char *name
, umode_t mode
,
310 struct dentry
*parent
,
313 return debugfs_create_file(name
, mode
, parent
, value
, &wil_fops_ulong
);
317 * wil6210_debugfs_init_offset - create set of debugfs files
318 * @wil - driver's context, used for printing
319 * @dbg - directory on the debugfs, where files will be created
320 * @base - base address used in address calculation
321 * @tbl - table with file descriptions. Should be terminated with empty element.
323 * Creates files accordingly to the @tbl.
325 static void wil6210_debugfs_init_offset(struct wil6210_priv
*wil
,
326 struct dentry
*dbg
, void *base
,
327 const struct dbg_off
* const tbl
)
331 for (i
= 0; tbl
[i
].name
; i
++) {
334 switch (tbl
[i
].type
) {
336 f
= debugfs_create_u32(tbl
[i
].name
, tbl
[i
].mode
, dbg
,
340 f
= debugfs_create_x32(tbl
[i
].name
, tbl
[i
].mode
, dbg
,
344 f
= wil_debugfs_create_ulong(tbl
[i
].name
, tbl
[i
].mode
,
345 dbg
, base
+ tbl
[i
].off
);
348 f
= wil_debugfs_create_iomem_x32(tbl
[i
].name
,
353 f
= ERR_PTR(-EINVAL
);
355 if (IS_ERR_OR_NULL(f
))
356 wil_err(wil
, "Create file \"%s\": err %ld\n",
357 tbl
[i
].name
, PTR_ERR(f
));
361 static const struct dbg_off isr_off
[] = {
362 {"ICC", S_IRUGO
| S_IWUSR
, offsetof(struct RGF_ICR
, ICC
), doff_io32
},
363 {"ICR", S_IRUGO
| S_IWUSR
, offsetof(struct RGF_ICR
, ICR
), doff_io32
},
364 {"ICM", S_IRUGO
| S_IWUSR
, offsetof(struct RGF_ICR
, ICM
), doff_io32
},
365 {"ICS", S_IWUSR
, offsetof(struct RGF_ICR
, ICS
), doff_io32
},
366 {"IMV", S_IRUGO
| S_IWUSR
, offsetof(struct RGF_ICR
, IMV
), doff_io32
},
367 {"IMS", S_IWUSR
, offsetof(struct RGF_ICR
, IMS
), doff_io32
},
368 {"IMC", S_IWUSR
, offsetof(struct RGF_ICR
, IMC
), doff_io32
},
372 static int wil6210_debugfs_create_ISR(struct wil6210_priv
*wil
,
374 struct dentry
*parent
, u32 off
)
376 struct dentry
*d
= debugfs_create_dir(name
, parent
);
378 if (IS_ERR_OR_NULL(d
))
381 wil6210_debugfs_init_offset(wil
, d
, (void * __force
)wil
->csr
+ off
,
387 static const struct dbg_off pseudo_isr_off
[] = {
388 {"CAUSE", S_IRUGO
, HOSTADDR(RGF_DMA_PSEUDO_CAUSE
), doff_io32
},
389 {"MASK_SW", S_IRUGO
, HOSTADDR(RGF_DMA_PSEUDO_CAUSE_MASK_SW
), doff_io32
},
390 {"MASK_FW", S_IRUGO
, HOSTADDR(RGF_DMA_PSEUDO_CAUSE_MASK_FW
), doff_io32
},
394 static int wil6210_debugfs_create_pseudo_ISR(struct wil6210_priv
*wil
,
395 struct dentry
*parent
)
397 struct dentry
*d
= debugfs_create_dir("PSEUDO_ISR", parent
);
399 if (IS_ERR_OR_NULL(d
))
402 wil6210_debugfs_init_offset(wil
, d
, (void * __force
)wil
->csr
,
408 static const struct dbg_off lgc_itr_cnt_off
[] = {
409 {"TRSH", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_CNT_TRSH
), doff_io32
},
410 {"DATA", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_CNT_DATA
), doff_io32
},
411 {"CTL", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_CNT_CRL
), doff_io32
},
415 static const struct dbg_off tx_itr_cnt_off
[] = {
416 {"TRSH", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_TX_CNT_TRSH
),
418 {"DATA", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_TX_CNT_DATA
),
420 {"CTL", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_TX_CNT_CTL
),
422 {"IDL_TRSH", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_TX_IDL_CNT_TRSH
),
424 {"IDL_DATA", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_TX_IDL_CNT_DATA
),
426 {"IDL_CTL", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_TX_IDL_CNT_CTL
),
431 static const struct dbg_off rx_itr_cnt_off
[] = {
432 {"TRSH", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_RX_CNT_TRSH
),
434 {"DATA", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_RX_CNT_DATA
),
436 {"CTL", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_RX_CNT_CTL
),
438 {"IDL_TRSH", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_RX_IDL_CNT_TRSH
),
440 {"IDL_DATA", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_RX_IDL_CNT_DATA
),
442 {"IDL_CTL", S_IRUGO
| S_IWUSR
, HOSTADDR(RGF_DMA_ITR_RX_IDL_CNT_CTL
),
447 static int wil6210_debugfs_create_ITR_CNT(struct wil6210_priv
*wil
,
448 struct dentry
*parent
)
450 struct dentry
*d
, *dtx
, *drx
;
452 d
= debugfs_create_dir("ITR_CNT", parent
);
453 if (IS_ERR_OR_NULL(d
))
456 dtx
= debugfs_create_dir("TX", d
);
457 drx
= debugfs_create_dir("RX", d
);
458 if (IS_ERR_OR_NULL(dtx
) || IS_ERR_OR_NULL(drx
))
461 wil6210_debugfs_init_offset(wil
, d
, (void * __force
)wil
->csr
,
464 wil6210_debugfs_init_offset(wil
, dtx
, (void * __force
)wil
->csr
,
467 wil6210_debugfs_init_offset(wil
, drx
, (void * __force
)wil
->csr
,
472 static int wil_memread_debugfs_show(struct seq_file
*s
, void *data
)
474 struct wil6210_priv
*wil
= s
->private;
475 void __iomem
*a
= wmi_buffer(wil
, cpu_to_le32(mem_addr
));
478 seq_printf(s
, "[0x%08x] = 0x%08x\n", mem_addr
, ioread32(a
));
480 seq_printf(s
, "[0x%08x] = INVALID\n", mem_addr
);
485 static int wil_memread_seq_open(struct inode
*inode
, struct file
*file
)
487 return single_open(file
, wil_memread_debugfs_show
, inode
->i_private
);
490 static const struct file_operations fops_memread
= {
491 .open
= wil_memread_seq_open
,
492 .release
= single_release
,
497 static ssize_t
wil_read_file_ioblob(struct file
*file
, char __user
*user_buf
,
498 size_t count
, loff_t
*ppos
)
500 enum { max_count
= 4096 };
501 struct debugfs_blob_wrapper
*blob
= file
->private_data
;
503 size_t available
= blob
->size
;
510 if (pos
>= available
|| !count
)
513 if (count
> available
- pos
)
514 count
= available
- pos
;
515 if (count
> max_count
)
518 buf
= kmalloc(count
, GFP_KERNEL
);
522 wil_memcpy_fromio_32(buf
, (const volatile void __iomem
*)blob
->data
+
525 ret
= copy_to_user(user_buf
, buf
, count
);
536 static const struct file_operations fops_ioblob
= {
537 .read
= wil_read_file_ioblob
,
539 .llseek
= default_llseek
,
543 struct dentry
*wil_debugfs_create_ioblob(const char *name
,
545 struct dentry
*parent
,
546 struct debugfs_blob_wrapper
*blob
)
548 return debugfs_create_file(name
, mode
, parent
, blob
, &fops_ioblob
);
552 static ssize_t
wil_write_file_reset(struct file
*file
, const char __user
*buf
,
553 size_t len
, loff_t
*ppos
)
555 struct wil6210_priv
*wil
= file
->private_data
;
556 struct net_device
*ndev
= wil_to_ndev(wil
);
560 * this code does NOT sync device state with the rest of system
561 * use with care, debug only!!!
565 ndev
->flags
&= ~IFF_UP
;
567 wil_reset(wil
, true);
572 static const struct file_operations fops_reset
= {
573 .write
= wil_write_file_reset
,
577 /*---write channel 1..4 to rxon for it, 0 to rxoff---*/
578 static ssize_t
wil_write_file_rxon(struct file
*file
, const char __user
*buf
,
579 size_t len
, loff_t
*ppos
)
581 struct wil6210_priv
*wil
= file
->private_data
;
586 char *kbuf
= kmalloc(len
+ 1, GFP_KERNEL
);
590 if (copy_from_user(kbuf
, buf
, len
)) {
596 rc
= kstrtol(kbuf
, 0, &channel
);
601 if ((channel
< 0) || (channel
> 4)) {
602 wil_err(wil
, "Invalid channel %ld\n", channel
);
608 rc
= wmi_set_channel(wil
, (int)channel
);
613 rc
= wmi_rxon(wil
, on
);
620 static const struct file_operations fops_rxon
= {
621 .write
= wil_write_file_rxon
,
625 /* block ack control, write:
626 * - "add <ringid> <agg_size> <timeout>" to trigger ADDBA
627 * - "del_tx <ringid> <reason>" to trigger DELBA for Tx side
628 * - "del_rx <CID> <TID> <reason>" to trigger DELBA for Rx side
630 static ssize_t
wil_write_back(struct file
*file
, const char __user
*buf
,
631 size_t len
, loff_t
*ppos
)
633 struct wil6210_priv
*wil
= file
->private_data
;
635 char *kbuf
= kmalloc(len
+ 1, GFP_KERNEL
);
642 rc
= simple_write_to_buffer(kbuf
, len
, ppos
, buf
, len
);
645 return rc
>= 0 ? -EIO
: rc
;
649 rc
= sscanf(kbuf
, "%8s %d %d %d", cmd
, &p1
, &p2
, &p3
);
657 if (0 == strcmp(cmd
, "add")) {
659 wil_err(wil
, "BACK: add require at least 2 params\n");
664 wmi_addba(wil
, p1
, p2
, p3
);
665 } else if (0 == strcmp(cmd
, "del_tx")) {
667 p2
= WLAN_REASON_QSTA_LEAVE_QBSS
;
668 wmi_delba_tx(wil
, p1
, p2
);
669 } else if (0 == strcmp(cmd
, "del_rx")) {
672 "BACK: del_rx require at least 2 params\n");
676 p3
= WLAN_REASON_QSTA_LEAVE_QBSS
;
677 wmi_delba_rx(wil
, mk_cidxtid(p1
, p2
), p3
);
679 wil_err(wil
, "BACK: Unrecognized command \"%s\"\n", cmd
);
686 static ssize_t
wil_read_back(struct file
*file
, char __user
*user_buf
,
687 size_t count
, loff_t
*ppos
)
689 static const char text
[] = "block ack control, write:\n"
690 " - \"add <ringid> <agg_size> <timeout>\" to trigger ADDBA\n"
691 "If missing, <timeout> defaults to 0\n"
692 " - \"del_tx <ringid> <reason>\" to trigger DELBA for Tx side\n"
693 " - \"del_rx <CID> <TID> <reason>\" to trigger DELBA for Rx side\n"
694 "If missing, <reason> set to \"STA_LEAVING\" (36)\n";
696 return simple_read_from_buffer(user_buf
, count
, ppos
, text
,
700 static const struct file_operations fops_back
= {
701 .read
= wil_read_back
,
702 .write
= wil_write_back
,
706 /* pmc control, write:
707 * - "alloc <num descriptors> <descriptor_size>" to allocate PMC
708 * - "free" to release memory allocated for PMC
710 static ssize_t
wil_write_pmccfg(struct file
*file
, const char __user
*buf
,
711 size_t len
, loff_t
*ppos
)
713 struct wil6210_priv
*wil
= file
->private_data
;
715 char *kbuf
= kmalloc(len
+ 1, GFP_KERNEL
);
717 int num_descs
, desc_size
;
722 rc
= simple_write_to_buffer(kbuf
, len
, ppos
, buf
, len
);
725 return rc
>= 0 ? -EIO
: rc
;
729 rc
= sscanf(kbuf
, "%8s %d %d", cmd
, &num_descs
, &desc_size
);
736 wil_err(wil
, "pmccfg: no params given\n");
740 if (0 == strcmp(cmd
, "alloc")) {
742 wil_err(wil
, "pmccfg: alloc requires 2 params\n");
745 wil_pmc_alloc(wil
, num_descs
, desc_size
);
746 } else if (0 == strcmp(cmd
, "free")) {
748 wil_err(wil
, "pmccfg: free does not have any params\n");
751 wil_pmc_free(wil
, true);
753 wil_err(wil
, "pmccfg: Unrecognized command \"%s\"\n", cmd
);
760 static ssize_t
wil_read_pmccfg(struct file
*file
, char __user
*user_buf
,
761 size_t count
, loff_t
*ppos
)
763 struct wil6210_priv
*wil
= file
->private_data
;
765 char help
[] = "pmc control, write:\n"
766 " - \"alloc <num descriptors> <descriptor_size>\" to allocate pmc\n"
767 " - \"free\" to free memory allocated for pmc\n";
769 sprintf(text
, "Last command status: %d\n\n%s",
770 wil_pmc_last_cmd_status(wil
),
773 return simple_read_from_buffer(user_buf
, count
, ppos
, text
,
777 static const struct file_operations fops_pmccfg
= {
778 .read
= wil_read_pmccfg
,
779 .write
= wil_write_pmccfg
,
783 static const struct file_operations fops_pmcdata
= {
785 .read
= wil_pmc_read
,
786 .llseek
= wil_pmc_llseek
,
790 /* Write mgmt frame to this file to send it */
791 static ssize_t
wil_write_file_txmgmt(struct file
*file
, const char __user
*buf
,
792 size_t len
, loff_t
*ppos
)
794 struct wil6210_priv
*wil
= file
->private_data
;
795 struct wiphy
*wiphy
= wil_to_wiphy(wil
);
796 struct wireless_dev
*wdev
= wil_to_wdev(wil
);
797 struct cfg80211_mgmt_tx_params params
;
799 void *frame
= kmalloc(len
, GFP_KERNEL
);
804 if (copy_from_user(frame
, buf
, len
)) {
811 params
.chan
= wdev
->preset_chandef
.chan
;
813 rc
= wil_cfg80211_mgmt_tx(wiphy
, wdev
, ¶ms
, NULL
);
816 wil_info(wil
, "%s() -> %d\n", __func__
, rc
);
821 static const struct file_operations fops_txmgmt
= {
822 .write
= wil_write_file_txmgmt
,
826 /* Write WMI command (w/o mbox header) to this file to send it
827 * WMI starts from wil6210_mbox_hdr_wmi header
829 static ssize_t
wil_write_file_wmi(struct file
*file
, const char __user
*buf
,
830 size_t len
, loff_t
*ppos
)
832 struct wil6210_priv
*wil
= file
->private_data
;
833 struct wil6210_mbox_hdr_wmi
*wmi
;
835 int cmdlen
= len
- sizeof(struct wil6210_mbox_hdr_wmi
);
842 wmi
= kmalloc(len
, GFP_KERNEL
);
846 rc
= simple_write_to_buffer(wmi
, len
, ppos
, buf
, len
);
853 cmdid
= le16_to_cpu(wmi
->id
);
855 rc1
= wmi_send(wil
, cmdid
, cmd
, cmdlen
);
858 wil_info(wil
, "%s(0x%04x[%d]) -> %d\n", __func__
, cmdid
, cmdlen
, rc1
);
863 static const struct file_operations fops_wmi
= {
864 .write
= wil_write_file_wmi
,
868 static void wil_seq_hexdump(struct seq_file
*s
, void *p
, int len
,
871 char printbuf
[16 * 3 + 2];
875 int l
= min(len
- i
, 16);
877 hex_dump_to_buffer(p
+ i
, l
, 16, 1, printbuf
,
878 sizeof(printbuf
), false);
879 seq_printf(s
, "%s%s\n", prefix
, printbuf
);
884 static void wil_seq_print_skb(struct seq_file
*s
, struct sk_buff
*skb
)
887 int len
= skb_headlen(skb
);
889 int nr_frags
= skb_shinfo(skb
)->nr_frags
;
891 seq_printf(s
, " len = %d\n", len
);
892 wil_seq_hexdump(s
, p
, len
, " : ");
895 seq_printf(s
, " nr_frags = %d\n", nr_frags
);
896 for (i
= 0; i
< nr_frags
; i
++) {
897 const struct skb_frag_struct
*frag
=
898 &skb_shinfo(skb
)->frags
[i
];
900 len
= skb_frag_size(frag
);
901 p
= skb_frag_address_safe(frag
);
902 seq_printf(s
, " [%2d] : len = %d\n", i
, len
);
903 wil_seq_hexdump(s
, p
, len
, " : ");
908 /*---------Tx/Rx descriptor------------*/
909 static int wil_txdesc_debugfs_show(struct seq_file
*s
, void *data
)
911 struct wil6210_priv
*wil
= s
->private;
913 bool tx
= (dbg_vring_index
< WIL6210_MAX_TX_RINGS
);
915 vring
= tx
? &wil
->vring_tx
[dbg_vring_index
] : &wil
->vring_rx
;
919 seq_printf(s
, "No Tx[%2d] VRING\n", dbg_vring_index
);
921 seq_puts(s
, "No Rx VRING\n");
925 if (dbg_txdesc_index
< vring
->size
) {
926 /* use struct vring_tx_desc for Rx as well,
927 * only field used, .dma.length, is the same
929 volatile struct vring_tx_desc
*d
=
930 &vring
->va
[dbg_txdesc_index
].tx
;
931 volatile u32
*u
= (volatile u32
*)d
;
932 struct sk_buff
*skb
= vring
->ctx
[dbg_txdesc_index
].skb
;
935 seq_printf(s
, "Tx[%2d][%3d] = {\n", dbg_vring_index
,
938 seq_printf(s
, "Rx[%3d] = {\n", dbg_txdesc_index
);
939 seq_printf(s
, " MAC = 0x%08x 0x%08x 0x%08x 0x%08x\n",
940 u
[0], u
[1], u
[2], u
[3]);
941 seq_printf(s
, " DMA = 0x%08x 0x%08x 0x%08x 0x%08x\n",
942 u
[4], u
[5], u
[6], u
[7]);
943 seq_printf(s
, " SKB = 0x%p\n", skb
);
947 wil_seq_print_skb(s
, skb
);
953 seq_printf(s
, "[%2d] TxDesc index (%d) >= size (%d)\n",
954 dbg_vring_index
, dbg_txdesc_index
,
957 seq_printf(s
, "RxDesc index (%d) >= size (%d)\n",
958 dbg_txdesc_index
, vring
->size
);
964 static int wil_txdesc_seq_open(struct inode
*inode
, struct file
*file
)
966 return single_open(file
, wil_txdesc_debugfs_show
, inode
->i_private
);
969 static const struct file_operations fops_txdesc
= {
970 .open
= wil_txdesc_seq_open
,
971 .release
= single_release
,
976 /*---------beamforming------------*/
977 static char *wil_bfstatus_str(u32 status
)
991 static bool is_all_zeros(void * const x_
, size_t sz
)
993 /* if reply is all-0, ignore this CID */
997 for (n
= 0; n
< sz
/ sizeof(*x
); n
++)
1004 static int wil_bf_debugfs_show(struct seq_file
*s
, void *data
)
1008 struct wil6210_priv
*wil
= s
->private;
1009 struct wmi_notify_req_cmd cmd
= {
1013 struct wil6210_mbox_hdr_wmi wmi
;
1014 struct wmi_notify_req_done_event evt
;
1017 for (i
= 0; i
< ARRAY_SIZE(wil
->sta
); i
++) {
1021 rc
= wmi_call(wil
, WMI_NOTIFY_REQ_CMDID
, &cmd
, sizeof(cmd
),
1022 WMI_NOTIFY_REQ_DONE_EVENTID
, &reply
,
1024 /* if reply is all-0, ignore this CID */
1025 if (rc
|| is_all_zeros(&reply
.evt
, sizeof(reply
.evt
)))
1028 status
= le32_to_cpu(reply
.evt
.status
);
1029 seq_printf(s
, "CID %d {\n"
1030 " TSF = 0x%016llx\n"
1031 " TxMCS = %2d TxTpt = %4d\n"
1033 " Status = 0x%08x %s\n"
1034 " Sectors(rx:tx) my %2d:%2d peer %2d:%2d\n"
1035 " Goodput(rx:tx) %4d:%4d\n"
1038 le64_to_cpu(reply
.evt
.tsf
),
1039 le16_to_cpu(reply
.evt
.bf_mcs
),
1040 le32_to_cpu(reply
.evt
.tx_tpt
),
1042 status
, wil_bfstatus_str(status
),
1043 le16_to_cpu(reply
.evt
.my_rx_sector
),
1044 le16_to_cpu(reply
.evt
.my_tx_sector
),
1045 le16_to_cpu(reply
.evt
.other_rx_sector
),
1046 le16_to_cpu(reply
.evt
.other_tx_sector
),
1047 le32_to_cpu(reply
.evt
.rx_goodput
),
1048 le32_to_cpu(reply
.evt
.tx_goodput
));
1053 static int wil_bf_seq_open(struct inode
*inode
, struct file
*file
)
1055 return single_open(file
, wil_bf_debugfs_show
, inode
->i_private
);
1058 static const struct file_operations fops_bf
= {
1059 .open
= wil_bf_seq_open
,
1060 .release
= single_release
,
1062 .llseek
= seq_lseek
,
1065 /*---------SSID------------*/
1066 static ssize_t
wil_read_file_ssid(struct file
*file
, char __user
*user_buf
,
1067 size_t count
, loff_t
*ppos
)
1069 struct wil6210_priv
*wil
= file
->private_data
;
1070 struct wireless_dev
*wdev
= wil_to_wdev(wil
);
1072 return simple_read_from_buffer(user_buf
, count
, ppos
,
1073 wdev
->ssid
, wdev
->ssid_len
);
1076 static ssize_t
wil_write_file_ssid(struct file
*file
, const char __user
*buf
,
1077 size_t count
, loff_t
*ppos
)
1079 struct wil6210_priv
*wil
= file
->private_data
;
1080 struct wireless_dev
*wdev
= wil_to_wdev(wil
);
1081 struct net_device
*ndev
= wil_to_ndev(wil
);
1084 wil_err(wil
, "Unable to set SSID substring from [%d]\n",
1089 if (count
> sizeof(wdev
->ssid
)) {
1090 wil_err(wil
, "SSID too long, len = %d\n", (int)count
);
1093 if (netif_running(ndev
)) {
1094 wil_err(wil
, "Unable to change SSID on running interface\n");
1098 wdev
->ssid_len
= count
;
1099 return simple_write_to_buffer(wdev
->ssid
, wdev
->ssid_len
, ppos
,
1103 static const struct file_operations fops_ssid
= {
1104 .read
= wil_read_file_ssid
,
1105 .write
= wil_write_file_ssid
,
1106 .open
= simple_open
,
1109 /*---------temp------------*/
1110 static void print_temp(struct seq_file
*s
, const char *prefix
, u32 t
)
1115 seq_printf(s
, "%s N/A\n", prefix
);
1118 seq_printf(s
, "%s %d.%03d\n", prefix
, t
/ 1000, t
% 1000);
1123 static int wil_temp_debugfs_show(struct seq_file
*s
, void *data
)
1125 struct wil6210_priv
*wil
= s
->private;
1127 int rc
= wmi_get_temperature(wil
, &t_m
, &t_r
);
1130 seq_puts(s
, "Failed\n");
1134 print_temp(s
, "T_mac =", t_m
);
1135 print_temp(s
, "T_radio =", t_r
);
1140 static int wil_temp_seq_open(struct inode
*inode
, struct file
*file
)
1142 return single_open(file
, wil_temp_debugfs_show
, inode
->i_private
);
1145 static const struct file_operations fops_temp
= {
1146 .open
= wil_temp_seq_open
,
1147 .release
= single_release
,
1149 .llseek
= seq_lseek
,
1152 /*---------freq------------*/
1153 static int wil_freq_debugfs_show(struct seq_file
*s
, void *data
)
1155 struct wil6210_priv
*wil
= s
->private;
1156 struct wireless_dev
*wdev
= wil_to_wdev(wil
);
1157 u16 freq
= wdev
->chandef
.chan
? wdev
->chandef
.chan
->center_freq
: 0;
1159 seq_printf(s
, "Freq = %d\n", freq
);
1164 static int wil_freq_seq_open(struct inode
*inode
, struct file
*file
)
1166 return single_open(file
, wil_freq_debugfs_show
, inode
->i_private
);
1169 static const struct file_operations fops_freq
= {
1170 .open
= wil_freq_seq_open
,
1171 .release
= single_release
,
1173 .llseek
= seq_lseek
,
1176 /*---------link------------*/
1177 static int wil_link_debugfs_show(struct seq_file
*s
, void *data
)
1179 struct wil6210_priv
*wil
= s
->private;
1180 struct station_info sinfo
;
1183 for (i
= 0; i
< ARRAY_SIZE(wil
->sta
); i
++) {
1184 struct wil_sta_info
*p
= &wil
->sta
[i
];
1185 char *status
= "unknown";
1187 switch (p
->status
) {
1188 case wil_sta_unused
:
1191 case wil_sta_conn_pending
:
1192 status
= "pending ";
1194 case wil_sta_connected
:
1195 status
= "connected";
1198 seq_printf(s
, "[%d] %pM %s%s\n", i
, p
->addr
, status
,
1199 (p
->data_port_open
? " data_port_open" : ""));
1201 if (p
->status
== wil_sta_connected
) {
1202 rc
= wil_cid_fill_sinfo(wil
, i
, &sinfo
);
1206 seq_printf(s
, " Tx_mcs = %d\n", sinfo
.txrate
.mcs
);
1207 seq_printf(s
, " Rx_mcs = %d\n", sinfo
.rxrate
.mcs
);
1208 seq_printf(s
, " SQ = %d\n", sinfo
.signal
);
1215 static int wil_link_seq_open(struct inode
*inode
, struct file
*file
)
1217 return single_open(file
, wil_link_debugfs_show
, inode
->i_private
);
1220 static const struct file_operations fops_link
= {
1221 .open
= wil_link_seq_open
,
1222 .release
= single_release
,
1224 .llseek
= seq_lseek
,
1227 /*---------info------------*/
1228 static int wil_info_debugfs_show(struct seq_file
*s
, void *data
)
1230 struct wil6210_priv
*wil
= s
->private;
1231 struct net_device
*ndev
= wil_to_ndev(wil
);
1232 int is_ac
= power_supply_is_system_supplied();
1233 int rx
= atomic_xchg(&wil
->isr_count_rx
, 0);
1234 int tx
= atomic_xchg(&wil
->isr_count_tx
, 0);
1235 static ulong rxf_old
, txf_old
;
1236 ulong rxf
= ndev
->stats
.rx_packets
;
1237 ulong txf
= ndev
->stats
.tx_packets
;
1240 /* >0 : AC; 0 : battery; <0 : error */
1241 seq_printf(s
, "AC powered : %d\n", is_ac
);
1242 seq_printf(s
, "Rx irqs:packets : %8d : %8ld\n", rx
, rxf
- rxf_old
);
1243 seq_printf(s
, "Tx irqs:packets : %8d : %8ld\n", tx
, txf
- txf_old
);
1247 #define CHECK_QSTATE(x) (state & BIT(__QUEUE_STATE_ ## x)) ? \
1248 " " __stringify(x) : ""
1250 for (i
= 0; i
< ndev
->num_tx_queues
; i
++) {
1251 struct netdev_queue
*txq
= netdev_get_tx_queue(ndev
, i
);
1252 unsigned long state
= txq
->state
;
1254 seq_printf(s
, "Tx queue[%i] state : 0x%lx%s%s%s\n", i
, state
,
1255 CHECK_QSTATE(DRV_XOFF
),
1256 CHECK_QSTATE(STACK_XOFF
),
1257 CHECK_QSTATE(FROZEN
)
1264 static int wil_info_seq_open(struct inode
*inode
, struct file
*file
)
1266 return single_open(file
, wil_info_debugfs_show
, inode
->i_private
);
1269 static const struct file_operations fops_info
= {
1270 .open
= wil_info_seq_open
,
1271 .release
= single_release
,
1273 .llseek
= seq_lseek
,
1276 /*---------recovery------------*/
1277 /* mode = [manual|auto]
1278 * state = [idle|pending|running]
1280 static ssize_t
wil_read_file_recovery(struct file
*file
, char __user
*user_buf
,
1281 size_t count
, loff_t
*ppos
)
1283 struct wil6210_priv
*wil
= file
->private_data
;
1286 static const char * const sstate
[] = {"idle", "pending", "running"};
1288 n
= snprintf(buf
, sizeof(buf
), "mode = %s\nstate = %s\n",
1289 no_fw_recovery
? "manual" : "auto",
1290 sstate
[wil
->recovery_state
]);
1292 n
= min_t(int, n
, sizeof(buf
));
1294 return simple_read_from_buffer(user_buf
, count
, ppos
,
1298 static ssize_t
wil_write_file_recovery(struct file
*file
,
1299 const char __user
*buf_
,
1300 size_t count
, loff_t
*ppos
)
1302 struct wil6210_priv
*wil
= file
->private_data
;
1303 static const char run_command
[] = "run";
1304 char buf
[sizeof(run_command
) + 1]; /* to detect "runx" */
1307 if (wil
->recovery_state
!= fw_recovery_pending
) {
1308 wil_err(wil
, "No recovery pending\n");
1313 wil_err(wil
, "Offset [%d]\n", (int)*ppos
);
1317 if (count
> sizeof(buf
)) {
1318 wil_err(wil
, "Input too long, len = %d\n", (int)count
);
1322 rc
= simple_write_to_buffer(buf
, sizeof(buf
) - 1, ppos
, buf_
, count
);
1327 if (0 == strcmp(buf
, run_command
))
1328 wil_set_recovery_state(wil
, fw_recovery_running
);
1330 wil_err(wil
, "Bad recovery command \"%s\"\n", buf
);
1335 static const struct file_operations fops_recovery
= {
1336 .read
= wil_read_file_recovery
,
1337 .write
= wil_write_file_recovery
,
1338 .open
= simple_open
,
1341 /*---------Station matrix------------*/
1342 static void wil_print_rxtid(struct seq_file
*s
, struct wil_tid_ampdu_rx
*r
)
1345 u16 index
= ((r
->head_seq_num
- r
->ssn
) & 0xfff) % r
->buf_size
;
1347 seq_printf(s
, "([%2d] %3d TU) 0x%03x [", r
->buf_size
, r
->timeout
,
1349 for (i
= 0; i
< r
->buf_size
; i
++) {
1351 seq_printf(s
, "%c", r
->reorder_buf
[i
] ? 'O' : '|');
1353 seq_printf(s
, "%c", r
->reorder_buf
[i
] ? '*' : '_');
1355 seq_printf(s
, "] last drop 0x%03x\n", r
->ssn_last_drop
);
1358 static int wil_sta_debugfs_show(struct seq_file
*s
, void *data
)
1359 __acquires(&p
->tid_rx_lock
) __releases(&p
->tid_rx_lock
)
1361 struct wil6210_priv
*wil
= s
->private;
1364 for (i
= 0; i
< ARRAY_SIZE(wil
->sta
); i
++) {
1365 struct wil_sta_info
*p
= &wil
->sta
[i
];
1366 char *status
= "unknown";
1368 switch (p
->status
) {
1369 case wil_sta_unused
:
1372 case wil_sta_conn_pending
:
1373 status
= "pending ";
1375 case wil_sta_connected
:
1376 status
= "connected";
1379 seq_printf(s
, "[%d] %pM %s%s\n", i
, p
->addr
, status
,
1380 (p
->data_port_open
? " data_port_open" : ""));
1382 if (p
->status
== wil_sta_connected
) {
1383 spin_lock_bh(&p
->tid_rx_lock
);
1384 for (tid
= 0; tid
< WIL_STA_TID_NUM
; tid
++) {
1385 struct wil_tid_ampdu_rx
*r
= p
->tid_rx
[tid
];
1388 seq_printf(s
, "[%2d] ", tid
);
1389 wil_print_rxtid(s
, r
);
1392 spin_unlock_bh(&p
->tid_rx_lock
);
1399 static int wil_sta_seq_open(struct inode
*inode
, struct file
*file
)
1401 return single_open(file
, wil_sta_debugfs_show
, inode
->i_private
);
1404 static const struct file_operations fops_sta
= {
1405 .open
= wil_sta_seq_open
,
1406 .release
= single_release
,
1408 .llseek
= seq_lseek
,
1411 /*----------------*/
1412 static void wil6210_debugfs_init_blobs(struct wil6210_priv
*wil
,
1418 for (i
= 0; i
< ARRAY_SIZE(fw_mapping
); i
++) {
1419 struct debugfs_blob_wrapper
*blob
= &wil
->blobs
[i
];
1420 const struct fw_map
*map
= &fw_mapping
[i
];
1425 blob
->data
= (void * __force
)wil
->csr
+ HOSTADDR(map
->host
);
1426 blob
->size
= map
->to
- map
->from
;
1427 snprintf(name
, sizeof(name
), "blob_%s", map
->name
);
1428 wil_debugfs_create_ioblob(name
, S_IRUGO
, dbg
, blob
);
1433 static const struct {
1436 const struct file_operations
*fops
;
1438 {"mbox", S_IRUGO
, &fops_mbox
},
1439 {"vrings", S_IRUGO
, &fops_vring
},
1440 {"stations", S_IRUGO
, &fops_sta
},
1441 {"desc", S_IRUGO
, &fops_txdesc
},
1442 {"bf", S_IRUGO
, &fops_bf
},
1443 {"ssid", S_IRUGO
| S_IWUSR
, &fops_ssid
},
1444 {"mem_val", S_IRUGO
, &fops_memread
},
1445 {"reset", S_IWUSR
, &fops_reset
},
1446 {"rxon", S_IWUSR
, &fops_rxon
},
1447 {"tx_mgmt", S_IWUSR
, &fops_txmgmt
},
1448 {"wmi_send", S_IWUSR
, &fops_wmi
},
1449 {"back", S_IRUGO
| S_IWUSR
, &fops_back
},
1450 {"pmccfg", S_IRUGO
| S_IWUSR
, &fops_pmccfg
},
1451 {"pmcdata", S_IRUGO
, &fops_pmcdata
},
1452 {"temp", S_IRUGO
, &fops_temp
},
1453 {"freq", S_IRUGO
, &fops_freq
},
1454 {"link", S_IRUGO
, &fops_link
},
1455 {"info", S_IRUGO
, &fops_info
},
1456 {"recovery", S_IRUGO
| S_IWUSR
, &fops_recovery
},
1459 static void wil6210_debugfs_init_files(struct wil6210_priv
*wil
,
1464 for (i
= 0; i
< ARRAY_SIZE(dbg_files
); i
++)
1465 debugfs_create_file(dbg_files
[i
].name
, dbg_files
[i
].mode
, dbg
,
1466 wil
, dbg_files
[i
].fops
);
1469 /* interrupt control blocks */
1470 static const struct {
1474 {"USER_ICR", HOSTADDR(RGF_USER_USER_ICR
)},
1475 {"DMA_EP_TX_ICR", HOSTADDR(RGF_DMA_EP_TX_ICR
)},
1476 {"DMA_EP_RX_ICR", HOSTADDR(RGF_DMA_EP_RX_ICR
)},
1477 {"DMA_EP_MISC_ICR", HOSTADDR(RGF_DMA_EP_MISC_ICR
)},
1480 static void wil6210_debugfs_init_isr(struct wil6210_priv
*wil
,
1485 for (i
= 0; i
< ARRAY_SIZE(dbg_icr
); i
++)
1486 wil6210_debugfs_create_ISR(wil
, dbg_icr
[i
].name
, dbg
,
1487 dbg_icr
[i
].icr_off
);
1490 #define WIL_FIELD(name, mode, type) { __stringify(name), mode, \
1491 offsetof(struct wil6210_priv, name), type}
1493 /* fields in struct wil6210_priv */
1494 static const struct dbg_off dbg_wil_off
[] = {
1495 WIL_FIELD(privacy
, S_IRUGO
, doff_u32
),
1496 WIL_FIELD(status
[0], S_IRUGO
| S_IWUSR
, doff_ulong
),
1497 WIL_FIELD(fw_version
, S_IRUGO
, doff_u32
),
1498 WIL_FIELD(hw_version
, S_IRUGO
, doff_x32
),
1499 WIL_FIELD(recovery_count
, S_IRUGO
, doff_u32
),
1500 WIL_FIELD(ap_isolate
, S_IRUGO
, doff_u32
),
1504 static const struct dbg_off dbg_wil_regs
[] = {
1505 {"RGF_MAC_MTRL_COUNTER_0", S_IRUGO
, HOSTADDR(RGF_MAC_MTRL_COUNTER_0
),
1507 {"RGF_USER_USAGE_1", S_IRUGO
, HOSTADDR(RGF_USER_USAGE_1
), doff_io32
},
1511 /* static parameters */
1512 static const struct dbg_off dbg_statics
[] = {
1513 {"desc_index", S_IRUGO
| S_IWUSR
, (ulong
)&dbg_txdesc_index
, doff_u32
},
1514 {"vring_index", S_IRUGO
| S_IWUSR
, (ulong
)&dbg_vring_index
, doff_u32
},
1515 {"mem_addr", S_IRUGO
| S_IWUSR
, (ulong
)&mem_addr
, doff_u32
},
1516 {"vring_idle_trsh", S_IRUGO
| S_IWUSR
, (ulong
)&vring_idle_trsh
,
1521 int wil6210_debugfs_init(struct wil6210_priv
*wil
)
1523 struct dentry
*dbg
= wil
->debug
= debugfs_create_dir(WIL_NAME
,
1524 wil_to_wiphy(wil
)->debugfsdir
);
1526 if (IS_ERR_OR_NULL(dbg
))
1531 wil6210_debugfs_init_files(wil
, dbg
);
1532 wil6210_debugfs_init_isr(wil
, dbg
);
1533 wil6210_debugfs_init_blobs(wil
, dbg
);
1534 wil6210_debugfs_init_offset(wil
, dbg
, wil
, dbg_wil_off
);
1535 wil6210_debugfs_init_offset(wil
, dbg
, (void * __force
)wil
->csr
,
1537 wil6210_debugfs_init_offset(wil
, dbg
, NULL
, dbg_statics
);
1539 wil6210_debugfs_create_pseudo_ISR(wil
, dbg
);
1541 wil6210_debugfs_create_ITR_CNT(wil
, dbg
);
1546 void wil6210_debugfs_remove(struct wil6210_priv
*wil
)
1548 debugfs_remove_recursive(wil
->debug
);
1551 /* free pmc memory without sending command to fw, as it will
1552 * be reset on the way down anyway
1554 wil_pmc_free(wil
, false);