#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.
Defines | |
#define | __IEEE80211_IF_FILE(name, _write) |
#define | __IEEE80211_IF_FILE_W(name) |
#define | DEBUGFS_ADD(name) |
#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_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 (tsf) | |
static void | add_ap_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_monitor_files (struct ieee80211_sub_if_data *sdata) |
static void | add_sta_files (struct ieee80211_sub_if_data *sdata) |
static void | add_vlan_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 (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_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_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_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 __IEEE80211_IF_FILE | ( | name, | |
_write | |||
) |
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 = mac80211_open_file_generic, \ .llseek = generic_file_llseek, \ }
Definition at line 114 of file kernel-3.2/debugfs_netdev.c.
#define __IEEE80211_IF_FILE_W | ( | name | ) |
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 130 of file kernel-3.2/debugfs_netdev.c.
#define DEBUGFS_ADD | ( | name | ) |
Definition at line 425 of file kernel-3.2/debugfs_netdev.c.
#define DEBUGFS_ADD_MODE | ( | name, | |
mode | |||
) |
Definition at line 429 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FILE | ( | name, | |
field, | |||
format | |||
) |
IEEE80211_IF_FMT_##format(name, field) \ __IEEE80211_IF_FILE(name, NULL)
Definition at line 141 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT | ( | name, | |
field, | |||
format_string | |||
) |
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 74 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_ATOMIC | ( | name, | |
field | |||
) |
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 90 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_DEC | ( | name, | |
field | |||
) | IEEE80211_IF_FMT(name, field, "%d\n") |
Definition at line 81 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_DEC_DIV_16 | ( | name, | |
field | |||
) |
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 106 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_HEX | ( | name, | |
field | |||
) | IEEE80211_IF_FMT(name, field, "%#x\n") |
Definition at line 83 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_LHEX | ( | name, | |
field | |||
) | IEEE80211_IF_FMT(name, field, "%#lx\n") |
Definition at line 85 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_MAC | ( | name, | |
field | |||
) |
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 98 of file kernel-3.2/debugfs_netdev.c.
#define IEEE80211_IF_FMT_SIZE | ( | name, | |
field | |||
) | IEEE80211_IF_FMT(name, field, "%zd\n") |
Definition at line 87 of file kernel-3.2/debugfs_netdev.c.
__IEEE80211_IF_FILE | ( | num_buffered_multicast | , |
NULL | |||
) |
__IEEE80211_IF_FILE_W | ( | smps | ) |
__IEEE80211_IF_FILE_W | ( | tkip_mic_test | ) |
__IEEE80211_IF_FILE_W | ( | tsf | ) |
static void add_ap_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 450 of file kernel-3.2/debugfs_netdev.c.
static void add_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 548 of file kernel-3.2/debugfs_netdev.c.
static void add_ibss_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 465 of file kernel-3.2/debugfs_netdev.c.
static void add_monitor_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 492 of file kernel-3.2/debugfs_netdev.c.
static void add_sta_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 433 of file kernel-3.2/debugfs_netdev.c.
static void add_vlan_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 482 of file kernel-3.2/debugfs_netdev.c.
static void add_wds_files | ( | struct ieee80211_sub_if_data * | sdata | ) | [static] |
Definition at line 470 of file kernel-3.2/debugfs_netdev.c.
static int hwaddr_aton | ( | const char * | txt, |
u8 * | addr | ||
) | [static] |
Definition at line 231 of file kernel-3.2/debugfs_netdev.c.
void ieee80211_debugfs_add_netdev | ( | struct ieee80211_sub_if_data * | sdata | ) |
Definition at line 583 of file kernel-3.2/debugfs_netdev.c.
void ieee80211_debugfs_remove_netdev | ( | struct ieee80211_sub_if_data * | sdata | ) |
Definition at line 596 of file kernel-3.2/debugfs_netdev.c.
void ieee80211_debugfs_rename_netdev | ( | struct ieee80211_sub_if_data * | sdata | ) |
Definition at line 605 of file kernel-3.2/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 | ( | 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_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 327 of file kernel-3.2/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 195 of file kernel-3.2/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 225 of file kernel-3.2/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 336 of file kernel-3.2/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 206 of file kernel-3.2/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 252 of file kernel-3.2/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 347 of file kernel-3.2/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.2/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.2/debugfs_netdev.c.
static int ieee80211_set_smps | ( | struct ieee80211_sub_if_data * | sdata, |
enum ieee80211_smps_mode | smps_mode | ||
) | [static] |
Definition at line 161 of file kernel-3.2/debugfs_netdev.c.
const char* smps_modes[IEEE80211_SMPS_NUM_MODES] [static] |
{ [IEEE80211_SMPS_AUTOMATIC] = "auto", [IEEE80211_SMPS_OFF] = "off", [IEEE80211_SMPS_STATIC] = "static", [IEEE80211_SMPS_DYNAMIC] = "dynamic", }
Definition at line 188 of file kernel-3.2/debugfs_netdev.c.