Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
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"

Go to the source code of this file.

Macros

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

Functions

 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_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 (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 (num_buffered_multicast, NULL)
 
 __IEEE80211_IF_FILE_W (tsf)
 
 IEEE80211_IF_FILE (peer, u.wds.remote_addr, MAC)
 
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)
 

Macro Definition 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), \
}

Definition at line 126 of file 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 debugfs_netdev.c.

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

Definition at line 525 of file debugfs_netdev.c.

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

Definition at line 521 of file 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 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 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 debugfs_netdev.c.

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

Definition at line 78 of file 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 debugfs_netdev.c.

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

Definition at line 80 of file 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 debugfs_netdev.c.

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

Definition at line 82 of file 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 debugfs_netdev.c.

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

Definition at line 84 of file debugfs_netdev.c.

Function Documentation

__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  )
void ieee80211_debugfs_add_netdev ( struct ieee80211_sub_if_data sdata)

Definition at line 664 of file debugfs_netdev.c.

void ieee80211_debugfs_remove_netdev ( struct ieee80211_sub_if_data sdata)

Definition at line 677 of file debugfs_netdev.c.

void ieee80211_debugfs_rename_netdev ( struct ieee80211_sub_if_data sdata)

Definition at line 686 of file 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   
)