#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/pci.h>
#include <linux/rtnetlink.h>
#include <linux/power_supply.h>
#include "wil6210.h"
#include "wmi.h"
#include "txrx.h"
#include "pmc.h"
static u32 mem_addr;
static u32 dbg_txdesc_index;
static u32 dbg_ring_index;
static u32 dbg_status_msg_index;
static u32 dbg_sring_index;
enum dbg_off_type { … };
struct dbg_off { … };
static void wil_print_desc_edma(struct seq_file *s, struct wil6210_priv *wil,
struct wil_ring *ring,
char _s, char _h, int idx)
{ … }
static void wil_print_ring(struct seq_file *s, struct wil6210_priv *wil,
const char *name, struct wil_ring *ring,
char _s, char _h)
{ … }
static int ring_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void wil_print_sring(struct seq_file *s, struct wil6210_priv *wil,
struct wil_status_ring *sring)
{ … }
static int srings_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void wil_seq_hexdump(struct seq_file *s, void *p, int len,
const char *prefix)
{ … }
static void wil_print_mbox_ring(struct seq_file *s, const char *prefix,
void __iomem *off)
{ … }
static int mbox_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int wil_debugfs_iomem_x32_set(void *data, u64 val)
{ … }
static int wil_debugfs_iomem_x32_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static void wil_debugfs_create_iomem_x32(const char *name, umode_t mode,
struct dentry *parent, void *value,
struct wil6210_priv *wil)
{ … }
static int wil_debugfs_ulong_set(void *data, u64 val)
{ … }
static int wil_debugfs_ulong_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static void wil6210_debugfs_init_offset(struct wil6210_priv *wil,
struct dentry *dbg, void *base,
const struct dbg_off * const tbl)
{ … }
static const struct dbg_off isr_off[] = …;
static void wil6210_debugfs_create_ISR(struct wil6210_priv *wil,
const char *name, struct dentry *parent,
u32 off)
{ … }
static const struct dbg_off pseudo_isr_off[] = …;
static void wil6210_debugfs_create_pseudo_ISR(struct wil6210_priv *wil,
struct dentry *parent)
{ … }
static const struct dbg_off lgc_itr_cnt_off[] = …;
static const struct dbg_off tx_itr_cnt_off[] = …;
static const struct dbg_off rx_itr_cnt_off[] = …;
static int wil6210_debugfs_create_ITR_CNT(struct wil6210_priv *wil,
struct dentry *parent)
{ … }
static int memread_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static ssize_t wil_read_file_ioblob(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_ioblob = …;
static
struct dentry *wil_debugfs_create_ioblob(const char *name,
umode_t mode,
struct dentry *parent,
struct wil_blob_wrapper *wil_blob)
{ … }
static ssize_t wil_write_file_rxon(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations fops_rxon = …;
static ssize_t wil_write_file_rbufcap(struct file *file,
const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_rbufcap = …;
static ssize_t wil_write_back(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static ssize_t wil_read_back(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_back = …;
static ssize_t wil_write_pmccfg(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static ssize_t wil_read_pmccfg(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_pmccfg = …;
static const struct file_operations fops_pmcdata = …;
static int wil_pmcring_seq_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations fops_pmcring = …;
static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations fops_txmgmt = …;
static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations fops_wmi = …;
static void wil_seq_print_skb(struct seq_file *s, struct sk_buff *skb)
{ … }
static int txdesc_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int status_msg_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int wil_print_rx_buff(struct seq_file *s, struct list_head *lh)
{ … }
static int rx_buff_mgmt_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static char *wil_bfstatus_str(u32 status)
{ … }
static bool is_all_zeros(void * const x_, size_t sz)
{ … }
static int bf_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void print_temp(struct seq_file *s, const char *prefix, s32 t)
{ … }
static int temp_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int link_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int info_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static ssize_t wil_read_file_recovery(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t wil_write_file_recovery(struct file *file,
const char __user *buf_,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_recovery = …;
static void wil_print_rxtid(struct seq_file *s, struct wil_tid_ampdu_rx *r)
{ … }
static void wil_print_rxtid_crypto(struct seq_file *s, int tid,
struct wil_tid_crypto_rx *c)
{ … }
static int sta_show(struct seq_file *s, void *data)
__acquires(&p->tid_rx_lock) __releases(&p->tid_rx_lock)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int mids_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int wil_tx_latency_debugfs_show(struct seq_file *s, void *data)
__acquires(&p->tid_rx_lock) __releases(&p->tid_rx_lock)
{ … }
static int wil_tx_latency_seq_open(struct inode *inode, struct file *file)
{ … }
static ssize_t wil_tx_latency_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations fops_tx_latency = …;
static void wil_link_stats_print_basic(struct wil6210_vif *vif,
struct seq_file *s,
struct wmi_link_stats_basic *basic)
{ … }
static void wil_link_stats_print_global(struct wil6210_priv *wil,
struct seq_file *s,
struct wmi_link_stats_global *global)
{ … }
static void wil_link_stats_debugfs_show_vif(struct wil6210_vif *vif,
struct seq_file *s)
{ … }
static int wil_link_stats_debugfs_show(struct seq_file *s, void *data)
{ … }
static int wil_link_stats_seq_open(struct inode *inode, struct file *file)
{ … }
static ssize_t wil_link_stats_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations fops_link_stats = …;
static int
wil_link_stats_global_debugfs_show(struct seq_file *s, void *data)
{ … }
static int
wil_link_stats_global_seq_open(struct inode *inode, struct file *file)
{ … }
static ssize_t
wil_link_stats_global_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations fops_link_stats_global = …;
static ssize_t wil_read_file_led_cfg(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t wil_write_file_led_cfg(struct file *file,
const char __user *buf_,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_led_cfg = …;
static ssize_t wil_write_led_blink_time(struct file *file,
const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static ssize_t wil_read_led_blink_time(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_led_blink_time = …;
static int fw_capabilities_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int fw_version_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static ssize_t wil_write_suspend_stats(struct file *file,
const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static ssize_t wil_read_suspend_stats(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations fops_suspend_stats = …;
static ssize_t wil_compressed_rx_status_write(struct file *file,
const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static int
wil_compressed_rx_status_show(struct seq_file *s, void *data)
{ … }
static int
wil_compressed_rx_status_seq_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations fops_compressed_rx_status = …;
static void wil6210_debugfs_init_blobs(struct wil6210_priv *wil,
struct dentry *dbg)
{ … }
static const struct { … } dbg_files[] = …;
static void wil6210_debugfs_init_files(struct wil6210_priv *wil,
struct dentry *dbg)
{ … }
static const struct { … } dbg_icr[] = …;
static void wil6210_debugfs_init_isr(struct wil6210_priv *wil,
struct dentry *dbg)
{ … }
#define WIL_FIELD(name, mode, type) …
static const struct dbg_off dbg_wil_off[] = …;
static const struct dbg_off dbg_wil_regs[] = …;
static const struct dbg_off dbg_statics[] = …;
static const int dbg_off_count = …;
int wil6210_debugfs_init(struct wil6210_priv *wil)
{ … }
void wil6210_debugfs_remove(struct wil6210_priv *wil)
{ … }