#include <linux/debugfs.h>
#include <linux/rtnetlink.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "debugfs.h"
Go to the source code of this file.
Defines | |
#define | DEBUGFS_ADD(name) debugfs_create_file(#name, 0400, phyd, local, &name## _ops); |
#define | DEBUGFS_ADD_MODE(name, mode) debugfs_create_file(#name, mode, phyd, local, &name## _ops); |
#define | DEBUGFS_DEVSTATS_ADD(name) debugfs_create_file(#name, 0400, statsd, local, &stats_ ##name## _ops); |
#define | DEBUGFS_DEVSTATS_FILE(name) |
#define | DEBUGFS_FORMAT_BUFFER_SIZE 100 |
#define | DEBUGFS_READONLY_FILE(name, fmt, value...) |
#define | DEBUGFS_READONLY_FILE_FN(name, fmt, value...) |
#define | DEBUGFS_READONLY_FILE_OPS(name) |
#define | DEBUGFS_STATS_ADD(name, field) debugfs_create_u32(#name, 0400, statsd, (u32 *) &field); |
Functions | |
static ssize_t | channel_type_read (struct file *file, char __user *user_buf, size_t count, loff_t *ppos) |
DEBUGFS_DEVSTATS_FILE (dot11ACKFailureCount) | |
DEBUGFS_DEVSTATS_FILE (dot11RTSFailureCount) | |
DEBUGFS_DEVSTATS_FILE (dot11FCSErrorCount) | |
DEBUGFS_DEVSTATS_FILE (dot11RTSSuccessCount) | |
void | debugfs_hw_add (struct ieee80211_local *local) |
DEBUGFS_READONLY_FILE (user_power,"%d", local->user_power_level) | |
DEBUGFS_READONLY_FILE (power,"%d", local->hw.conf.power_level) | |
DEBUGFS_READONLY_FILE (frequency,"%d", local->hw.conf.channel->center_freq) | |
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") | |
DEBUGFS_READONLY_FILE_OPS (hwflags) | |
DEBUGFS_READONLY_FILE_OPS (channel_type) | |
DEBUGFS_READONLY_FILE_OPS (queues) | |
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)) |
static ssize_t | hwflags_read (struct file *file, char __user *user_buf, size_t count, loff_t *ppos) |
int | mac80211_format_buffer (char __user *userbuf, size_t count, loff_t *ppos, char *fmt,...) |
int | mac80211_open_file_generic (struct inode *inode, struct file *file) |
static ssize_t | noack_read (struct file *file, char __user *user_buf, size_t count, loff_t *ppos) |
static ssize_t | noack_write (struct file *file, const 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) |
static ssize_t | reset_write (struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) |
static ssize_t | uapsd_max_sp_len_read (struct file *file, char __user *user_buf, size_t count, loff_t *ppos) |
static ssize_t | uapsd_max_sp_len_write (struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) |
static ssize_t | uapsd_queues_read (struct file *file, char __user *user_buf, size_t count, loff_t *ppos) |
static ssize_t | uapsd_queues_write (struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) |
Variables | |
static struct file_operations | noack_ops |
static struct file_operations | reset_ops |
static struct file_operations | uapsd_max_sp_len_ops |
static struct file_operations | uapsd_queues_ops |
#define DEBUGFS_ADD | ( | name | ) | debugfs_create_file(#name, 0400, phyd, local, &name## _ops); |
Definition at line 61 of file kernel-3.2/debugfs.c.
#define DEBUGFS_ADD_MODE | ( | name, | |
mode | |||
) | debugfs_create_file(#name, mode, phyd, local, &name## _ops); |
Definition at line 64 of file kernel-3.2/debugfs.c.
#define DEBUGFS_DEVSTATS_ADD | ( | name | ) | debugfs_create_file(#name, 0400, statsd, local, &stats_ ##name## _ops); |
Definition at line 378 of file kernel-3.2/debugfs.c.
#define DEBUGFS_DEVSTATS_FILE | ( | name | ) |
static int print_devstats_##name(struct ieee80211_low_level_stats *stats,\ char *buf, int buflen) \ { \ return scnprintf(buf, buflen, "%u\n", stats->name); \ } \ static ssize_t stats_ ##name## _read(struct file *file, \ char __user *userbuf, \ size_t count, loff_t *ppos) \ { \ return format_devstat_counter(file->private_data, \ userbuf, \ count, \ ppos, \ print_devstats_##name); \ } \ \ static const struct file_operations stats_ ##name## _ops = { \ .read = stats_ ##name## _read, \ .open = mac80211_open_file_generic, \ .llseek = generic_file_llseek, \ };
Definition at line 353 of file kernel-3.2/debugfs.c.
#define DEBUGFS_FORMAT_BUFFER_SIZE 100 |
Definition at line 24 of file kernel-3.2/debugfs.c.
#define DEBUGFS_READONLY_FILE | ( | name, | |
fmt, | |||
value... | |||
) |
DEBUGFS_READONLY_FILE_FN(name, fmt, value) \ DEBUGFS_READONLY_FILE_OPS(name)
Definition at line 57 of file kernel-3.2/debugfs.c.
#define DEBUGFS_READONLY_FILE_FN | ( | name, | |
fmt, | |||
value... | |||
) |
static ssize_t name## _read(struct file *file, char __user *userbuf, \ size_t count, loff_t *ppos) \ { \ struct ieee80211_local *local = file->private_data; \ \ return mac80211_format_buffer(userbuf, count, ppos, \ fmt "\n", ##value); \ }
Definition at line 40 of file kernel-3.2/debugfs.c.
#define DEBUGFS_READONLY_FILE_OPS | ( | name | ) |
static const struct file_operations name## _ops = { \ .read = name## _read, \ .open = mac80211_open_file_generic, \ .llseek = generic_file_llseek, \ };
Definition at line 50 of file kernel-3.2/debugfs.c.
#define DEBUGFS_STATS_ADD | ( | name, | |
field | |||
) | debugfs_create_u32(#name, 0400, statsd, (u32 *) &field); |
Definition at line 376 of file kernel-3.2/debugfs.c.
static ssize_t channel_type_read | ( | struct file * | file, |
char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 213 of file kernel-3.2/debugfs.c.
DEBUGFS_DEVSTATS_FILE | ( | dot11ACKFailureCount | ) |
DEBUGFS_DEVSTATS_FILE | ( | dot11RTSFailureCount | ) |
DEBUGFS_DEVSTATS_FILE | ( | dot11FCSErrorCount | ) |
DEBUGFS_DEVSTATS_FILE | ( | dot11RTSSuccessCount | ) |
void debugfs_hw_add | ( | struct ieee80211_local * | local | ) |
Definition at line 386 of file kernel-3.2/debugfs.c.
DEBUGFS_READONLY_FILE | ( | user_power | , |
"%d" | , | ||
local-> | user_power_level | ||
) |
DEBUGFS_READONLY_FILE | ( | power | , |
"%d" | , | ||
local->hw.conf. | power_level | ||
) |
DEBUGFS_READONLY_FILE | ( | frequency | , |
"%d" | , | ||
local->hw.conf.channel-> | center_freq | ||
) |
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" | |||
) |
DEBUGFS_READONLY_FILE_OPS | ( | hwflags | ) |
DEBUGFS_READONLY_FILE_OPS | ( | channel_type | ) |
DEBUGFS_READONLY_FILE_OPS | ( | queues | ) |
static ssize_t format_devstat_counter | ( | struct ieee80211_local * | local, |
char __user * | userbuf, | ||
size_t | count, | ||
loff_t * | ppos, | ||
int(*)(struct ieee80211_low_level_stats *stats, char *buf, int buflen) | printvalue | ||
) | [static] |
Definition at line 334 of file kernel-3.2/debugfs.c.
static ssize_t hwflags_read | ( | struct file * | file, |
char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 240 of file kernel-3.2/debugfs.c.
int mac80211_format_buffer | ( | char __user * | userbuf, |
size_t | count, | ||
loff_t * | ppos, | ||
char * | fmt, | ||
... | |||
) |
Definition at line 26 of file kernel-3.2/debugfs.c.
int mac80211_open_file_generic | ( | struct inode * | inode, |
struct file * | file | ||
) |
Definition at line 18 of file kernel-3.2/debugfs.c.
static ssize_t noack_read | ( | struct file * | file, |
char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 100 of file kernel-3.2/debugfs.c.
static ssize_t noack_write | ( | struct file * | file, |
const char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 109 of file kernel-3.2/debugfs.c.
static ssize_t queues_read | ( | struct file * | file, |
char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 310 of file kernel-3.2/debugfs.c.
static ssize_t reset_write | ( | struct file * | file, |
const char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 81 of file kernel-3.2/debugfs.c.
static ssize_t uapsd_max_sp_len_read | ( | struct file * | file, |
char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 169 of file kernel-3.2/debugfs.c.
static ssize_t uapsd_max_sp_len_write | ( | struct file * | file, |
const char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 178 of file kernel-3.2/debugfs.c.
static ssize_t uapsd_queues_read | ( | struct file * | file, |
char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 134 of file kernel-3.2/debugfs.c.
static ssize_t uapsd_queues_write | ( | struct file * | file, |
const char __user * | user_buf, | ||
size_t | count, | ||
loff_t * | ppos | ||
) | [static] |
Definition at line 142 of file kernel-3.2/debugfs.c.
struct file_operations noack_ops [static] |
{ .read = noack_read, .write = noack_write, .open = mac80211_open_file_generic, .llseek = default_llseek, }
Definition at line 127 of file kernel-3.2/debugfs.c.
struct file_operations reset_ops [static] |
{ .write = reset_write, .open = mac80211_open_file_generic, .llseek = noop_llseek, }
Definition at line 94 of file kernel-3.2/debugfs.c.
struct file_operations uapsd_max_sp_len_ops [static] |
{ .read = uapsd_max_sp_len_read, .write = uapsd_max_sp_len_write, .open = mac80211_open_file_generic, .llseek = default_llseek, }
Definition at line 206 of file kernel-3.2/debugfs.c.
struct file_operations uapsd_queues_ops [static] |
{ .read = uapsd_queues_read, .write = uapsd_queues_write, .open = mac80211_open_file_generic, .llseek = default_llseek, }
Definition at line 162 of file kernel-3.2/debugfs.c.