Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
debugfs_sta.c File Reference
#include <linux/debugfs.h>
#include <linux/ieee80211.h>
#include "ieee80211_i.h"
#include "debugfs.h"
#include "debugfs_sta.h"
#include "sta_info.h"

Go to the source code of this file.

Macros

#define STA_READ(name, field, format_string)
 
#define STA_READ_D(name, field)   STA_READ(name, field, "%d\n")
 
#define STA_READ_U(name, field)   STA_READ(name, field, "%u\n")
 
#define STA_READ_S(name, field)   STA_READ(name, field, "%s\n")
 
#define STA_OPS(name)
 
#define STA_OPS_RW(name)
 
#define STA_FILE(name, field, format)
 
#define TEST(flg)   test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
 
#define PRINT_HT_CAP(_cond, _str)
 
#define DEBUGFS_ADD(name)
 
#define DEBUGFS_ADD_COUNTER(name, field)
 

Functions

 STA_FILE (aid, sta.aid, D)
 
 STA_FILE (dev, sdata->name, S)
 
 STA_FILE (last_signal, last_signal, D)
 
 STA_OPS (flags)
 
 STA_OPS (num_ps_buf_frames)
 
 STA_OPS (inactive_ms)
 
 STA_OPS (connected_time)
 
 STA_OPS (last_seq_ctrl)
 
 STA_OPS_RW (agg_status)
 
 STA_OPS (ht_capa)
 
void ieee80211_sta_debugfs_add (struct sta_info *sta)
 
void ieee80211_sta_debugfs_remove (struct sta_info *sta)
 

Macro Definition Documentation

#define DEBUGFS_ADD (   name)
Value:
sta->debugfs.dir, sta, &sta_ ##name## _ops);

Definition at line 323 of file debugfs_sta.c.

#define DEBUGFS_ADD_COUNTER (   name,
  field 
)
Value:
if (sizeof(sta->field) == sizeof(u32)) \
debugfs_create_u32(#name, 0400, sta->debugfs.dir, \
(u32 *) &sta->field); \
debugfs_create_u64(#name, 0400, sta->debugfs.dir, \
(u64 *) &sta->field);

Definition at line 327 of file debugfs_sta.c.

#define PRINT_HT_CAP (   _cond,
  _str 
)
Value:
do { \
if (_cond) \
p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \
} while (0)
#define STA_FILE (   name,
  field,
  format 
)
Value:
STA_READ_##format(name, field) \
STA_OPS(name)

Definition at line 48 of file debugfs_sta.c.

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

Definition at line 33 of file debugfs_sta.c.

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

Definition at line 40 of file debugfs_sta.c.

#define STA_READ (   name,
  field,
  format_string 
)
Value:
static ssize_t sta_ ##name## _read(struct file *file, \
char __user *userbuf, \
size_t count, loff_t *ppos) \
{ \
return mac80211_format_buffer(userbuf, count, ppos, \
format_string, sta->field); \
}

Definition at line 20 of file debugfs_sta.c.

#define STA_READ_D (   name,
  field 
)    STA_READ(name, field, "%d\n")

Definition at line 29 of file debugfs_sta.c.

#define STA_READ_S (   name,
  field 
)    STA_READ(name, field, "%s\n")

Definition at line 31 of file debugfs_sta.c.

#define STA_READ_U (   name,
  field 
)    STA_READ(name, field, "%u\n")

Definition at line 30 of file debugfs_sta.c.

#define TEST (   flg)    test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""

Function Documentation

void ieee80211_sta_debugfs_add ( struct sta_info sta)

Definition at line 335 of file debugfs_sta.c.

void ieee80211_sta_debugfs_remove ( struct sta_info sta)

Definition at line 384 of file debugfs_sta.c.

STA_FILE ( aid  ,
sta.  aid,
D   
)
STA_FILE ( dev  ,
sdata->  name,
S   
)
STA_FILE ( last_signal  ,
last_signal  ,
D   
)
STA_OPS ( flags  )
STA_OPS ( num_ps_buf_frames  )
STA_OPS ( inactive_ms  )
STA_OPS ( connected_time  )
STA_OPS ( last_seq_ctrl  )
STA_OPS ( ht_capa  )
STA_OPS_RW ( agg_status  )