#include <linux/debugfs.h>
#include <linux/rtnetlink.h>
#include <linux/vmalloc.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "debugfs.h"
#define DEBUGFS_FORMAT_BUFFER_SIZE …
int mac80211_format_buffer(char __user *userbuf, size_t count,
loff_t *ppos, char *fmt, ...)
{ … }
#define DEBUGFS_READONLY_FILE_FN(name, fmt, value...) …
#define DEBUGFS_READONLY_FILE_OPS(name) …
#define DEBUGFS_READONLY_FILE(name, fmt, value...) …
#define DEBUGFS_ADD(name) …
#define DEBUGFS_ADD_MODE(name, mode) …
DEBUGFS_READONLY_FILE(hw_conf, "%x",
local->hw.conf.flags);
DEBUGFS_READONLY_FILE(user_power, "%d",
local->user_power_level);
DEBUGFS_READONLY_FILE(power, "%d",
local->hw.conf.power_level);
DEBUGFS_READONLY_FILE(total_ps_buffered, "%d",
local->total_ps_buffered);
DEBUGFS_READONLY_FILE(wep_iv, "%#08x",
local->wep_iv & 0xffffff);
DEBUGFS_READONLY_FILE(rate_ctrl_alg, "%s",
local->rate_ctrl ? local->rate_ctrl->ops->name : "hw/driver");
static ssize_t aqm_read(struct file *file,
char __user *user_buf,
size_t count,
loff_t *ppos)
{ … }
static ssize_t aqm_write(struct file *file,
const char __user *user_buf,
size_t count,
loff_t *ppos)
{ … }
static const struct file_operations aqm_ops = …;
static ssize_t airtime_flags_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t airtime_flags_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations airtime_flags_ops = …;
static ssize_t aql_pending_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations aql_pending_ops = …;
static ssize_t aql_txq_limit_read(struct file *file,
char __user *user_buf,
size_t count,
loff_t *ppos)
{ … }
static ssize_t aql_txq_limit_write(struct file *file,
const char __user *user_buf,
size_t count,
loff_t *ppos)
{ … }
static const struct file_operations aql_txq_limit_ops = …;
static ssize_t aql_enable_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t aql_enable_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations aql_enable_ops = …;
static ssize_t force_tx_status_read(struct file *file,
char __user *user_buf,
size_t count,
loff_t *ppos)
{ … }
static ssize_t force_tx_status_write(struct file *file,
const char __user *user_buf,
size_t count,
loff_t *ppos)
{ … }
static const struct file_operations force_tx_status_ops = …;
#ifdef CONFIG_PM
static ssize_t reset_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations reset_ops = …;
#endif
static const char *hw_flag_names[] = …;
static ssize_t hwflags_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t misc_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t queues_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
DEBUGFS_READONLY_FILE_OPS(hwflags);
DEBUGFS_READONLY_FILE_OPS(queues);
DEBUGFS_READONLY_FILE_OPS(misc);
static ssize_t format_devstat_counter(struct ieee80211_local *local,
char __user *userbuf,
size_t count, loff_t *ppos,
int (*printvalue)(struct ieee80211_low_level_stats *stats, char *buf,
int buflen))
{ … }
#define DEBUGFS_DEVSTATS_FILE(name) …
#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
#define DEBUGFS_STATS_ADD(name) …
#endif
#define DEBUGFS_DEVSTATS_ADD(name) …
DEBUGFS_DEVSTATS_FILE(dot11ACKFailureCount);
DEBUGFS_DEVSTATS_FILE(dot11RTSFailureCount);
DEBUGFS_DEVSTATS_FILE(dot11FCSErrorCount);
DEBUGFS_DEVSTATS_FILE(dot11RTSSuccessCount);
void debugfs_hw_add(struct ieee80211_local *local)
{ … }