Defines | Functions | Variables
debugfs_netdev.c File Reference
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/if.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
#include <linux/slab.h>
#include <linux/notifier.h>
#include <net/mac80211.h>
#include <net/cfg80211.h>
#include "ieee80211_i.h"
#include "rate.h"
#include "debugfs.h"
#include "debugfs_netdev.h"
#include "driver-ops.h"
Include dependency graph for kernel-3.5/debugfs_netdev.c:

Go to the source code of this file.

Defines

#define __IEEE80211_IF_FILE(name, _write)
#define __IEEE80211_IF_FILE_W(name)
#define DEBUGFS_ADD(name)   DEBUGFS_ADD_MODE(name, 0400)
#define DEBUGFS_ADD_MODE(name, mode)
#define IEEE80211_IF_FILE(name, field, format)
#define IEEE80211_IF_FMT(name, field, format_string)
#define IEEE80211_IF_FMT_ATOMIC(name, field)
#define IEEE80211_IF_FMT_DEC(name, field)   IEEE80211_IF_FMT(name, field, "%d\n")
#define IEEE80211_IF_FMT_DEC_DIV_16(name, field)
#define IEEE80211_IF_FMT_HEX(name, field)   IEEE80211_IF_FMT(name, field, "%#x\n")
#define IEEE80211_IF_FMT_HEXARRAY(name, field)
#define IEEE80211_IF_FMT_LHEX(name, field)   IEEE80211_IF_FMT(name, field, "%#lx\n")
#define IEEE80211_IF_FMT_MAC(name, field)
#define IEEE80211_IF_FMT_SIZE(name, field)   IEEE80211_IF_FMT(name, field, "%zd\n")

Functions

 __IEEE80211_IF_FILE (num_buffered_multicast, NULL)
 __IEEE80211_IF_FILE_W (smps)
 __IEEE80211_IF_FILE_W (tkip_mic_test)
 __IEEE80211_IF_FILE_W (uapsd_queues)
 __IEEE80211_IF_FILE_W (uapsd_max_sp_len)
 __IEEE80211_IF_FILE_W (tsf)
static void add_ap_files (struct ieee80211_sub_if_data *sdata)
static void add_common_files (struct ieee80211_sub_if_data *sdata)
static void add_files (struct ieee80211_sub_if_data *sdata)
static void add_ibss_files (struct ieee80211_sub_if_data *sdata)
static void add_sta_files (struct ieee80211_sub_if_data *sdata)
static void add_wds_files (struct ieee80211_sub_if_data *sdata)
static int hwaddr_aton (const char *txt, u8 *addr)
void ieee80211_debugfs_add_netdev (struct ieee80211_sub_if_data *sdata)
void ieee80211_debugfs_remove_netdev (struct ieee80211_sub_if_data *sdata)
void ieee80211_debugfs_rename_netdev (struct ieee80211_sub_if_data *sdata)
 IEEE80211_IF_FILE (drop_unencrypted, drop_unencrypted, DEC)
 IEEE80211_IF_FILE (rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ], HEX)
 IEEE80211_IF_FILE (rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ], HEX)
 IEEE80211_IF_FILE (rc_rateidx_mcs_mask_2ghz, rc_rateidx_mcs_mask[IEEE80211_BAND_2GHZ], HEXARRAY)
 IEEE80211_IF_FILE (rc_rateidx_mcs_mask_5ghz, rc_rateidx_mcs_mask[IEEE80211_BAND_5GHZ], HEXARRAY)
 IEEE80211_IF_FILE (flags, flags, HEX)
 IEEE80211_IF_FILE (state, state, LHEX)
 IEEE80211_IF_FILE (channel_type, vif.bss_conf.channel_type, DEC)
 IEEE80211_IF_FILE (bssid, u.mgd.bssid, MAC)
 IEEE80211_IF_FILE (aid, u.mgd.aid, DEC)
 IEEE80211_IF_FILE (last_beacon, u.mgd.last_beacon_signal, DEC)
 IEEE80211_IF_FILE (ave_beacon, u.mgd.ave_beacon_signal, DEC_DIV_16)
 IEEE80211_IF_FILE (num_mcast_sta, u.ap.num_mcast_sta, ATOMIC)
 IEEE80211_IF_FILE (num_sta_ps, u.ap.num_sta_ps, ATOMIC)
 IEEE80211_IF_FILE (dtim_count, u.ap.dtim_count, DEC)
 IEEE80211_IF_FILE (peer, u.wds.remote_addr, MAC)
static ssize_t ieee80211_if_fmt_num_buffered_multicast (const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
static ssize_t ieee80211_if_fmt_smps (const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
static ssize_t ieee80211_if_fmt_tkip_mic_test (const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
static ssize_t ieee80211_if_fmt_tsf (const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
static ssize_t ieee80211_if_fmt_uapsd_max_sp_len (const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
static ssize_t ieee80211_if_fmt_uapsd_queues (const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
static ssize_t ieee80211_if_parse_smps (struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
static ssize_t ieee80211_if_parse_tkip_mic_test (struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
static ssize_t ieee80211_if_parse_tsf (struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
static ssize_t ieee80211_if_parse_uapsd_max_sp_len (struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
static ssize_t ieee80211_if_parse_uapsd_queues (struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
static ssize_t ieee80211_if_read (struct ieee80211_sub_if_data *sdata, char __user *userbuf, size_t count, loff_t *ppos, ssize_t(*format)(const struct ieee80211_sub_if_data *, char *, int))
static ssize_t ieee80211_if_write (struct ieee80211_sub_if_data *sdata, const char __user *userbuf, size_t count, loff_t *ppos, ssize_t(*write)(struct ieee80211_sub_if_data *, const char *, int))
static int ieee80211_set_smps (struct ieee80211_sub_if_data *sdata, enum ieee80211_smps_mode smps_mode)

Variables

static const char * smps_modes [IEEE80211_SMPS_NUM_MODES]

Define Documentation

#define __IEEE80211_IF_FILE (   name,
  _write 
)
Value:
static ssize_t ieee80211_if_read_##name(struct file *file,              \
                                        char __user *userbuf,           \
                                        size_t count, loff_t *ppos)     \
{                                                                       \
        return ieee80211_if_read(file->private_data,                    \
                                 userbuf, count, ppos,                  \
                                 ieee80211_if_fmt_##name);              \
}                                                                       \
static const struct file_operations name##_ops = {                      \
        .read = ieee80211_if_read_##name,                               \
        .write = (_write),                                              \
        .open = simple_open,                                            \
        .llseek = generic_file_llseek,                                  \
}

Definition at line 126 of file kernel-3.5/debugfs_netdev.c.

#define __IEEE80211_IF_FILE_W (   name)
Value:
static ssize_t ieee80211_if_write_##name(struct file *file,             \
                                         const char __user *userbuf,    \
                                         size_t count, loff_t *ppos)    \
{                                                                       \
        return ieee80211_if_write(file->private_data, userbuf, count,   \
                                  ppos, ieee80211_if_parse_##name);     \
}                                                                       \
__IEEE80211_IF_FILE(name, ieee80211_if_write_##name)

Definition at line 142 of file kernel-3.5/debugfs_netdev.c.

#define DEBUGFS_ADD (   name)    DEBUGFS_ADD_MODE(name, 0400)

Definition at line 519 of file kernel-3.5/debugfs_netdev.c.

#define DEBUGFS_ADD_MODE (   name,
  mode 
)
Value:
debugfs_create_file(#name, mode, sdata->debugfs.dir, \
                            sdata, &name##_ops);

Definition at line 515 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FILE (   name,
  field,
  format 
)
Value:
IEEE80211_IF_FMT_##format(name, field)                  \
                __IEEE80211_IF_FILE(name, NULL)

Definition at line 153 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT (   name,
  field,
  format_string 
)
Value:
static ssize_t ieee80211_if_fmt_##name(                                 \
        const struct ieee80211_sub_if_data *sdata, char *buf,           \
        int buflen)                                                     \
{                                                                       \
        return scnprintf(buf, buflen, format_string, sdata->field);     \
}

Definition at line 71 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_ATOMIC (   name,
  field 
)
Value:
static ssize_t ieee80211_if_fmt_##name(                                 \
        const struct ieee80211_sub_if_data *sdata,                      \
        char *buf, int buflen)                                          \
{                                                                       \
        return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\
}

Definition at line 102 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_DEC (   name,
  field 
)    IEEE80211_IF_FMT(name, field, "%d\n")

Definition at line 78 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_DEC_DIV_16 (   name,
  field 
)
Value:
static ssize_t ieee80211_if_fmt_##name(                                 \
        const struct ieee80211_sub_if_data *sdata,                      \
        char *buf, int buflen)                                          \
{                                                                       \
        return scnprintf(buf, buflen, "%d\n", sdata->field / 16);       \
}

Definition at line 118 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_HEX (   name,
  field 
)    IEEE80211_IF_FMT(name, field, "%#x\n")

Definition at line 80 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_HEXARRAY (   name,
  field 
)
Value:
static ssize_t ieee80211_if_fmt_##name(                                 \
        const struct ieee80211_sub_if_data *sdata,                      \
        char *buf, int buflen)                                          \
{                                                                       \
        char *p = buf;                                                  \
        int i;                                                          \
        for (i = 0; i < sizeof(sdata->field); i++) {                    \
                p += scnprintf(p, buflen + buf - p, "%.2x ",            \
                                 sdata->field[i]);                      \
        }                                                               \
        p += scnprintf(p, buflen + buf - p, "\n");                      \
        return p - buf;                                                 \
}

Definition at line 87 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_LHEX (   name,
  field 
)    IEEE80211_IF_FMT(name, field, "%#lx\n")

Definition at line 82 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_MAC (   name,
  field 
)
Value:
static ssize_t ieee80211_if_fmt_##name(                                 \
        const struct ieee80211_sub_if_data *sdata, char *buf,           \
        int buflen)                                                     \
{                                                                       \
        return scnprintf(buf, buflen, "%pM\n", sdata->field);           \
}

Definition at line 110 of file kernel-3.5/debugfs_netdev.c.

#define IEEE80211_IF_FMT_SIZE (   name,
  field 
)    IEEE80211_IF_FMT(name, field, "%zd\n")

Definition at line 84 of file kernel-3.5/debugfs_netdev.c.


Function Documentation

__IEEE80211_IF_FILE ( num_buffered_multicast  ,
NULL   
)
__IEEE80211_IF_FILE_W ( tkip_mic_test  )
__IEEE80211_IF_FILE_W ( uapsd_queues  )
__IEEE80211_IF_FILE_W ( uapsd_max_sp_len  )
static void add_ap_files ( struct ieee80211_sub_if_data sdata) [static]

Definition at line 542 of file kernel-3.5/debugfs_netdev.c.

static void add_common_files ( struct ieee80211_sub_if_data sdata) [static]

Definition at line 521 of file kernel-3.5/debugfs_netdev.c.

static void add_files ( struct ieee80211_sub_if_data sdata) [static]

Definition at line 617 of file kernel-3.5/debugfs_netdev.c.

static void add_ibss_files ( struct ieee80211_sub_if_data sdata) [static]

Definition at line 551 of file kernel-3.5/debugfs_netdev.c.

static void add_sta_files ( struct ieee80211_sub_if_data sdata) [static]

Definition at line 530 of file kernel-3.5/debugfs_netdev.c.

static void add_wds_files ( struct ieee80211_sub_if_data sdata) [static]

Definition at line 556 of file kernel-3.5/debugfs_netdev.c.

static int hwaddr_aton ( const char *  txt,
u8 addr 
) [static]

Definition at line 248 of file kernel-3.5/debugfs_netdev.c.

Definition at line 654 of file kernel-3.5/debugfs_netdev.c.

Definition at line 667 of file kernel-3.5/debugfs_netdev.c.

Definition at line 676 of file kernel-3.5/debugfs_netdev.c.

IEEE80211_IF_FILE ( drop_unencrypted  ,
drop_unencrypted  ,
DEC   
)
IEEE80211_IF_FILE ( rc_rateidx_mask_2ghz  ,
rc_rateidx_mask  [IEEE80211_BAND_2GHZ],
HEX   
)
IEEE80211_IF_FILE ( rc_rateidx_mask_5ghz  ,
rc_rateidx_mask  [IEEE80211_BAND_5GHZ],
HEX   
)
IEEE80211_IF_FILE ( rc_rateidx_mcs_mask_2ghz  ,
rc_rateidx_mcs_mask  [IEEE80211_BAND_2GHZ],
HEXARRAY   
)
IEEE80211_IF_FILE ( rc_rateidx_mcs_mask_5ghz  ,
rc_rateidx_mcs_mask  [IEEE80211_BAND_5GHZ],
HEXARRAY   
)
IEEE80211_IF_FILE ( flags  ,
flags  ,
HEX   
)
IEEE80211_IF_FILE ( state  ,
state  ,
LHEX   
)
IEEE80211_IF_FILE ( channel_type  ,
vif.bss_conf.  channel_type,
DEC   
)
IEEE80211_IF_FILE ( bssid  ,
u.mgd.  bssid,
MAC   
)
IEEE80211_IF_FILE ( aid  ,
u.mgd.  aid,
DEC   
)
IEEE80211_IF_FILE ( last_beacon  ,
u.mgd.  last_beacon_signal,
DEC   
)
IEEE80211_IF_FILE ( ave_beacon  ,
u.mgd.  ave_beacon_signal,
DEC_DIV_16   
)
IEEE80211_IF_FILE ( num_mcast_sta  ,
u.ap.  num_mcast_sta,
ATOMIC   
)
IEEE80211_IF_FILE ( num_sta_ps  ,
u.ap.  num_sta_ps,
ATOMIC   
)
IEEE80211_IF_FILE ( dtim_count  ,
u.ap.  dtim_count,
DEC   
)
IEEE80211_IF_FILE ( peer  ,
u.wds.  remote_addr,
MAC   
)
static ssize_t ieee80211_if_fmt_num_buffered_multicast ( const struct ieee80211_sub_if_data sdata,
char *  buf,
int  buflen 
) [static]

Definition at line 401 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_fmt_smps ( const struct ieee80211_sub_if_data sdata,
char *  buf,
int  buflen 
) [static]

Definition at line 212 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_fmt_tkip_mic_test ( const struct ieee80211_sub_if_data sdata,
char *  buf,
int  buflen 
) [static]

Definition at line 242 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_fmt_tsf ( const struct ieee80211_sub_if_data sdata,
char *  buf,
int  buflen 
) [static]

Definition at line 410 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_fmt_uapsd_max_sp_len ( const struct ieee80211_sub_if_data sdata,
char *  buf,
int  buflen 
) [static]

Definition at line 368 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_fmt_uapsd_queues ( const struct ieee80211_sub_if_data sdata,
char *  buf,
int  buflen 
) [static]

Definition at line 340 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_parse_smps ( struct ieee80211_sub_if_data sdata,
const char *  buf,
int  buflen 
) [static]

Definition at line 223 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_parse_tkip_mic_test ( struct ieee80211_sub_if_data sdata,
const char *  buf,
int  buflen 
) [static]

Definition at line 269 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_parse_tsf ( struct ieee80211_sub_if_data sdata,
const char *  buf,
int  buflen 
) [static]

Definition at line 421 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_parse_uapsd_max_sp_len ( struct ieee80211_sub_if_data sdata,
const char *  buf,
int  buflen 
) [static]

Definition at line 376 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_parse_uapsd_queues ( struct ieee80211_sub_if_data sdata,
const char *  buf,
int  buflen 
) [static]

Definition at line 348 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_read ( struct ieee80211_sub_if_data sdata,
char __user *  userbuf,
size_t  count,
loff_t *  ppos,
ssize_t(*)(const struct ieee80211_sub_if_data *, char *, int)  format 
) [static]

Definition at line 26 of file kernel-3.5/debugfs_netdev.c.

static ssize_t ieee80211_if_write ( struct ieee80211_sub_if_data sdata,
const char __user *  userbuf,
size_t  count,
loff_t *  ppos,
ssize_t(*)(struct ieee80211_sub_if_data *, const char *, int)  write 
) [static]

Definition at line 46 of file kernel-3.5/debugfs_netdev.c.

static int ieee80211_set_smps ( struct ieee80211_sub_if_data sdata,
enum ieee80211_smps_mode  smps_mode 
) [static]

Definition at line 178 of file kernel-3.5/debugfs_netdev.c.


Variable Documentation

const char* smps_modes[IEEE80211_SMPS_NUM_MODES] [static]
Initial value:
 {
        [IEEE80211_SMPS_AUTOMATIC] = "auto",
        [IEEE80211_SMPS_OFF] = "off",
        [IEEE80211_SMPS_STATIC] = "static",
        [IEEE80211_SMPS_DYNAMIC] = "dynamic",
}

Definition at line 205 of file kernel-3.5/debugfs_netdev.c.



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