Defines | Functions | Variables
debugfs.c File Reference
#include <linux/debugfs.h>
#include <linux/rtnetlink.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "debugfs.h"
Include dependency graph for kernel-3.5/debugfs.c:

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,...)
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)

Variables

static struct file_operations reset_ops

Define Documentation

#define DEBUGFS_ADD (   name)    debugfs_create_file(#name, 0400, phyd, local, &name## _ops);

Definition at line 55 of file kernel-3.5/debugfs.c.

#define DEBUGFS_ADD_MODE (   name,
  mode 
)    debugfs_create_file(#name, mode, phyd, local, &name## _ops);

Definition at line 58 of file kernel-3.5/debugfs.c.

#define DEBUGFS_DEVSTATS_ADD (   name)    debugfs_create_file(#name, 0400, statsd, local, &stats_ ##name## _ops);

Definition at line 257 of file kernel-3.5/debugfs.c.

#define DEBUGFS_DEVSTATS_FILE (   name)
Value:
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 = simple_open,                                            \
        .llseek = generic_file_llseek,                                  \
};

Definition at line 232 of file kernel-3.5/debugfs.c.

#define DEBUGFS_FORMAT_BUFFER_SIZE   100

Definition at line 18 of file kernel-3.5/debugfs.c.

#define DEBUGFS_READONLY_FILE (   name,
  fmt,
  value... 
)
Value:
DEBUGFS_READONLY_FILE_FN(name, fmt, value)              \
        DEBUGFS_READONLY_FILE_OPS(name)

Definition at line 51 of file kernel-3.5/debugfs.c.

#define DEBUGFS_READONLY_FILE_FN (   name,
  fmt,
  value... 
)
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 34 of file kernel-3.5/debugfs.c.

#define DEBUGFS_READONLY_FILE_OPS (   name)
Value:
static const struct file_operations name## _ops = {                     \
        .read = name## _read,                                           \
        .open = simple_open,                                            \
        .llseek = generic_file_llseek,                                  \
};

Definition at line 44 of file kernel-3.5/debugfs.c.

#define DEBUGFS_STATS_ADD (   name,
  field 
)    debugfs_create_u32(#name, 0400, statsd, (u32 *) &field);

Definition at line 255 of file kernel-3.5/debugfs.c.


Function Documentation

static ssize_t channel_type_read ( struct file *  file,
char __user *  user_buf,
size_t  count,
loff_t *  ppos 
) [static]

Definition at line 94 of file kernel-3.5/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 265 of file kernel-3.5/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 ( channel_type  )
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 213 of file kernel-3.5/debugfs.c.

static ssize_t hwflags_read ( struct file *  file,
char __user *  user_buf,
size_t  count,
loff_t *  ppos 
) [static]

Definition at line 121 of file kernel-3.5/debugfs.c.

int mac80211_format_buffer ( char __user *  userbuf,
size_t  count,
loff_t *  ppos,
char *  fmt,
  ... 
)

Definition at line 20 of file kernel-3.5/debugfs.c.

static ssize_t queues_read ( struct file *  file,
char __user *  user_buf,
size_t  count,
loff_t *  ppos 
) [static]

Definition at line 189 of file kernel-3.5/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 75 of file kernel-3.5/debugfs.c.


Variable Documentation

struct file_operations reset_ops [static]
Initial value:
 {
        .write = reset_write,
        .open = simple_open,
        .llseek = noop_llseek,
}

Definition at line 88 of file kernel-3.5/debugfs.c.



ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Fri Jan 3 2014 12:07:56