linux/drivers/net/wireless/ath/wil6210/debugfs.c

// SPDX-License-Identifier: ISC
/*
 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#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"

/* Nasty hack. Better have per device instances */
static u32 mem_addr;
static u32 dbg_txdesc_index;
static u32 dbg_ring_index; /* 24+ for Rx, 0..23 for Tx */
static u32 dbg_status_msg_index;
/* 0..wil->num_rx_status_rings-1 for Rx, wil->tx_sring_idx for Tx */
static u32 dbg_sring_index;

enum dbg_off_type {};

/* offset to "wil" */
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();

/**
 * wil6210_debugfs_init_offset - create set of debugfs files
 * @wil: driver's context, used for printing
 * @dbg: directory on the debugfs, where files will be created
 * @base: base address used in address calculation
 * @tbl: table with file descriptions. Should be terminated with empty element.
 *
 * Creates files accordingly to the @tbl.
 */
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)
{}

/*---write channel 1..4 to rxon for it, 0 to rxoff---*/
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 =;

/* block ack control, write:
 * - "add <ringid> <agg_size> <timeout>" to trigger ADDBA
 * - "del_tx <ringid> <reason>" to trigger DELBA for Tx side
 * - "del_rx <CID> <TID> <reason>" to trigger DELBA for Rx side
 */
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 =;

/* pmc control, write:
 * - "alloc <num descriptors> <descriptor_size>" to allocate PMC
 * - "free" to release memory allocated for PMC
 */
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 =;

/*---tx_mgmt---*/
/* Write mgmt frame to this file to send it */
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 =;

/* Write WMI command (w/o mbox header) to this file to send it
 * WMI starts from wil6210_mbox_hdr_wmi header
 */
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)
{}

/*---------Tx/Rx descriptor------------*/
static int txdesc_show(struct seq_file *s, void *data)
{}
DEFINE_SHOW_ATTRIBUTE();

/*---------Tx/Rx status message------------*/
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();

/*---------beamforming------------*/
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();

/*---------temp------------*/
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();

/*---------link------------*/
static int link_show(struct seq_file *s, void *data)
{}
DEFINE_SHOW_ATTRIBUTE();

/*---------info------------*/
static int info_show(struct seq_file *s, void *data)
{}
DEFINE_SHOW_ATTRIBUTE();

/*---------recovery------------*/
/* mode = [manual|auto]
 * state = [idle|pending|running]
 */
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 =;

/*---------Station matrix------------*/
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 =;

/* led_blink_time, write:
 * "<blink_on_slow> <blink_off_slow> <blink_on_med> <blink_off_med> <blink_on_fast> <blink_off_fast>
 */
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 =;

/*---------FW capabilities------------*/
static int fw_capabilities_show(struct seq_file *s, void *data)
{}
DEFINE_SHOW_ATTRIBUTE();

/*---------FW version------------*/
static int fw_version_show(struct seq_file *s, void *data)
{}
DEFINE_SHOW_ATTRIBUTE();

/*---------suspend_stats---------*/
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 =;

/*---------compressed_rx_status---------*/
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)
{}

/* misc files */
static const struct {} dbg_files[] =;

static void wil6210_debugfs_init_files(struct wil6210_priv *wil,
				       struct dentry *dbg)
{}

/* interrupt control blocks */
static const struct {} dbg_icr[] =;

static void wil6210_debugfs_init_isr(struct wil6210_priv *wil,
				     struct dentry *dbg)
{}

#define WIL_FIELD(name, mode, type)

/* fields in struct wil6210_priv */
static const struct dbg_off dbg_wil_off[] =;

static const struct dbg_off dbg_wil_regs[] =;

/* static parameters */
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)
{}