Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
nl80211.c File Reference
#include <linux/if.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/if_ether.h>
#include <linux/ieee80211.h>
#include <linux/nl80211.h>
#include <linux/rtnetlink.h>
#include <linux/netlink.h>
#include <linux/etherdevice.h>
#include <net/net_namespace.h>
#include <net/genetlink.h>
#include <net/cfg80211.h>
#include <net/sock.h>
#include "core.h"
#include "nl80211.h"
#include "reg.h"

Go to the source code of this file.

Data Structures

struct  key_parse
 
struct  get_key_cookie
 

Macros

#define CMD(op, n)
 
#define FILL_IN_MESH_PARAM_IF_SET(table, cfg, param, mask, attr_num, nla_fn)
 
#define NL80211_FLAG_NEED_WIPHY   0x01
 
#define NL80211_FLAG_NEED_NETDEV   0x02
 
#define NL80211_FLAG_NEED_RTNL   0x04
 
#define NL80211_FLAG_CHECK_NETDEV_UP   0x08
 
#define NL80211_FLAG_NEED_NETDEV_UP
 
#define NL80211_FLAG_NEED_WDEV   0x10
 
#define NL80211_FLAG_NEED_WDEV_UP
 

Functions

void nl80211_notify_dev_rename (struct cfg80211_registered_device *rdev)
 
void nl80211_send_scan_start (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev)
 
void nl80211_send_scan_done (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev)
 
void nl80211_send_scan_aborted (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev)
 
void nl80211_send_sched_scan_results (struct cfg80211_registered_device *rdev, struct net_device *netdev)
 
void nl80211_send_sched_scan (struct cfg80211_registered_device *rdev, struct net_device *netdev, u32 cmd)
 
void nl80211_send_reg_change_event (struct regulatory_request *request)
 
void nl80211_send_rx_auth (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_rx_assoc (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_deauth (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_disassoc (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_unprot_deauth (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_unprot_disassoc (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_auth_timeout (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *addr, gfp_t gfp)
 
void nl80211_send_assoc_timeout (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *addr, gfp_t gfp)
 
void nl80211_send_connect_result (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, u16 status, gfp_t gfp)
 
void nl80211_send_roamed (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp)
 
void nl80211_send_disconnected (struct cfg80211_registered_device *rdev, struct net_device *netdev, u16 reason, const u8 *ie, size_t ie_len, bool from_ap)
 
void nl80211_send_ibss_bssid (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid, gfp_t gfp)
 
void nl80211_send_new_peer_candidate (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp)
 
void nl80211_michael_mic_failure (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *addr, enum nl80211_key_type key_type, int key_id, const u8 *tsc, gfp_t gfp)
 
void nl80211_send_beacon_hint_event (struct wiphy *wiphy, struct ieee80211_channel *channel_before, struct ieee80211_channel *channel_after)
 
void nl80211_send_remain_on_channel (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, u64 cookie, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, unsigned int duration, gfp_t gfp)
 
void nl80211_send_remain_on_channel_cancel (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, u64 cookie, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, gfp_t gfp)
 
void nl80211_send_sta_event (struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *mac_addr, struct station_info *sinfo, gfp_t gfp)
 
void nl80211_send_sta_del_event (struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *mac_addr, gfp_t gfp)
 
void nl80211_send_conn_failed_event (struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *mac_addr, enum nl80211_connect_failed_reason reason, gfp_t gfp)
 
bool nl80211_unexpected_frame (struct net_device *dev, const u8 *addr, gfp_t gfp)
 
bool nl80211_unexpected_4addr_frame (struct net_device *dev, const u8 *addr, gfp_t gfp)
 
int nl80211_send_mgmt (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, u32 nlportid, int freq, int sig_dbm, const u8 *buf, size_t len, gfp_t gfp)
 
void nl80211_send_mgmt_tx_status (struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, u64 cookie, const u8 *buf, size_t len, bool ack, gfp_t gfp)
 
void nl80211_send_cqm_rssi_notify (struct cfg80211_registered_device *rdev, struct net_device *netdev, enum nl80211_cqm_rssi_threshold_event rssi_event, gfp_t gfp)
 
void nl80211_gtk_rekey_notify (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid, const u8 *replay_ctr, gfp_t gfp)
 
void nl80211_pmksa_candidate_notify (struct cfg80211_registered_device *rdev, struct net_device *netdev, int index, const u8 *bssid, bool preauth, gfp_t gfp)
 
void nl80211_ch_switch_notify (struct cfg80211_registered_device *rdev, struct net_device *netdev, int freq, enum nl80211_channel_type type, gfp_t gfp)
 
void nl80211_send_cqm_txe_notify (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *peer, u32 num_packets, u32 rate, u32 intvl, gfp_t gfp)
 
void nl80211_send_cqm_pktloss_notify (struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *peer, u32 num_packets, gfp_t gfp)
 
void cfg80211_probe_status (struct net_device *dev, const u8 *addr, u64 cookie, bool acked, gfp_t gfp)
 
 EXPORT_SYMBOL (cfg80211_probe_status)
 
void cfg80211_report_obss_beacon (struct wiphy *wiphy, const u8 *frame, size_t len, int freq, int sig_dbm, gfp_t gfp)
 
 EXPORT_SYMBOL (cfg80211_report_obss_beacon)
 
int nl80211_init (void)
 
void nl80211_exit (void)
 

Macro Definition Documentation

#define CMD (   op,
  n 
)
Value:
do { \
if (dev->ops->op) { \
i++; \
if (nla_put_u32(msg, i, NL80211_CMD_ ## n)) \
goto nla_put_failure; \
} \
} while (0)
#define FILL_IN_MESH_PARAM_IF_SET (   table,
  cfg,
  param,
  mask,
  attr_num,
  nla_fn 
)
Value:
do {\
if (table[attr_num]) {\
cfg->param = nla_fn(table[attr_num]); \
mask |= (1 << (attr_num - 1)); \
} \
} while (0);\
#define NL80211_FLAG_CHECK_NETDEV_UP   0x08

Definition at line 6906 of file nl80211.c.

#define NL80211_FLAG_NEED_NETDEV   0x02

Definition at line 6904 of file nl80211.c.

#define NL80211_FLAG_NEED_NETDEV_UP
Value:
NL80211_FLAG_CHECK_NETDEV_UP)

Definition at line 6907 of file nl80211.c.

#define NL80211_FLAG_NEED_RTNL   0x04

Definition at line 6905 of file nl80211.c.

#define NL80211_FLAG_NEED_WDEV   0x10

Definition at line 6909 of file nl80211.c.

#define NL80211_FLAG_NEED_WDEV_UP
Value:
NL80211_FLAG_CHECK_NETDEV_UP)

Definition at line 6911 of file nl80211.c.

#define NL80211_FLAG_NEED_WIPHY   0x01

Definition at line 6903 of file nl80211.c.

Function Documentation

void cfg80211_probe_status ( struct net_device dev,
const u8 addr,
u64  cookie,
bool  acked,
gfp_t  gfp 
)

cfg80211_probe_status - notify userspace about probe status : the device the probe was sent on : the address of the peer : the cookie filled in previously : indicates whether probe was acked or not : allocation flags

Definition at line 8794 of file nl80211.c.

void cfg80211_report_obss_beacon ( struct wiphy wiphy,
const u8 frame,
size_t  len,
int  freq,
int  sig_dbm,
gfp_t  gfp 
)

cfg80211_report_obss_beacon - report beacon from other APs : The wiphy that received the beacon : the frame : length of the frame : frequency the frame was received on : signal strength in mBm, or 0 if unknown : allocation flags

Use this function to report to userspace when a beacon was received. It is not useful to call this when there is no netdev that is in AP/GO mode.

Definition at line 8836 of file nl80211.c.

EXPORT_SYMBOL ( cfg80211_probe_status  )
EXPORT_SYMBOL ( cfg80211_report_obss_beacon  )
void nl80211_ch_switch_notify ( struct cfg80211_registered_device rdev,
struct net_device netdev,
int  freq,
enum nl80211_channel_type  type,
gfp_t  gfp 
)

Definition at line 8667 of file nl80211.c.

void nl80211_exit ( void  )

Definition at line 8949 of file nl80211.c.

void nl80211_gtk_rekey_notify ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 bssid,
const u8 replay_ctr,
gfp_t  gfp 
)

Definition at line 8578 of file nl80211.c.

int nl80211_init ( void  )

Definition at line 8908 of file nl80211.c.

void nl80211_michael_mic_failure ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 addr,
enum nl80211_key_type  key_type,
int  key_id,
const u8 tsc,
gfp_t  gfp 
)

Definition at line 8156 of file nl80211.c.

void nl80211_notify_dev_rename ( struct cfg80211_registered_device rdev)

Definition at line 7574 of file nl80211.c.

void nl80211_pmksa_candidate_notify ( struct cfg80211_registered_device rdev,
struct net_device netdev,
int  index,
const u8 bssid,
bool  preauth,
gfp_t  gfp 
)

Definition at line 8622 of file nl80211.c.

void nl80211_send_assoc_timeout ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 addr,
gfp_t  gfp 
)

Definition at line 7961 of file nl80211.c.

void nl80211_send_auth_timeout ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 addr,
gfp_t  gfp 
)

Definition at line 7953 of file nl80211.c.

void nl80211_send_beacon_hint_event ( struct wiphy wiphy,
struct ieee80211_channel channel_before,
struct ieee80211_channel channel_after 
)

Definition at line 8194 of file nl80211.c.

void nl80211_send_conn_failed_event ( struct cfg80211_registered_device rdev,
struct net_device dev,
const u8 mac_addr,
enum nl80211_connect_failed_reason  reason,
gfp_t  gfp 
)

Definition at line 8367 of file nl80211.c.

void nl80211_send_connect_result ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 bssid,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
u16  status,
gfp_t  gfp 
)

Definition at line 7969 of file nl80211.c.

void nl80211_send_cqm_pktloss_notify ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 peer,
u32  num_packets,
gfp_t  gfp 
)

Definition at line 8751 of file nl80211.c.

void nl80211_send_cqm_rssi_notify ( struct cfg80211_registered_device rdev,
struct net_device netdev,
enum nl80211_cqm_rssi_threshold_event  rssi_event,
gfp_t  gfp 
)

Definition at line 8534 of file nl80211.c.

void nl80211_send_cqm_txe_notify ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 peer,
u32  num_packets,
u32  rate,
u32  intvl,
gfp_t  gfp 
)

Definition at line 8701 of file nl80211.c.

void nl80211_send_deauth ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 7887 of file nl80211.c.

void nl80211_send_disassoc ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 7895 of file nl80211.c.

void nl80211_send_disconnected ( struct cfg80211_registered_device rdev,
struct net_device netdev,
u16  reason,
const u8 ie,
size_t  ie_len,
bool  from_ap 
)

Definition at line 8049 of file nl80211.c.

void nl80211_send_ibss_bssid ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 bssid,
gfp_t  gfp 
)

Definition at line 8087 of file nl80211.c.

int nl80211_send_mgmt ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev,
u32  nlportid,
int  freq,
int  sig_dbm,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 8458 of file nl80211.c.

void nl80211_send_mgmt_tx_status ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev,
u64  cookie,
const u8 buf,
size_t  len,
bool  ack,
gfp_t  gfp 
)

Definition at line 8496 of file nl80211.c.

void nl80211_send_new_peer_candidate ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 macaddr,
const u8 ie,
u8  ie_len,
gfp_t  gfp 
)

Definition at line 8120 of file nl80211.c.

void nl80211_send_reg_change_event ( struct regulatory_request request)

Definition at line 7779 of file nl80211.c.

void nl80211_send_remain_on_channel ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev,
u64  cookie,
struct ieee80211_channel chan,
enum nl80211_channel_type  channel_type,
unsigned int  duration,
gfp_t  gfp 
)

Definition at line 8293 of file nl80211.c.

void nl80211_send_remain_on_channel_cancel ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev,
u64  cookie,
struct ieee80211_channel chan,
enum nl80211_channel_type  channel_type,
gfp_t  gfp 
)

Definition at line 8304 of file nl80211.c.

void nl80211_send_roamed ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 bssid,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
gfp_t  gfp 
)

Definition at line 8010 of file nl80211.c.

void nl80211_send_rx_assoc ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 7879 of file nl80211.c.

void nl80211_send_rx_auth ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 7871 of file nl80211.c.

void nl80211_send_scan_aborted ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev 
)

Definition at line 7719 of file nl80211.c.

void nl80211_send_scan_done ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev 
)

Definition at line 7700 of file nl80211.c.

void nl80211_send_scan_start ( struct cfg80211_registered_device rdev,
struct wireless_dev wdev 
)

Definition at line 7681 of file nl80211.c.

void nl80211_send_sched_scan ( struct cfg80211_registered_device rdev,
struct net_device netdev,
u32  cmd 
)

Definition at line 7757 of file nl80211.c.

void nl80211_send_sched_scan_results ( struct cfg80211_registered_device rdev,
struct net_device netdev 
)

Definition at line 7738 of file nl80211.c.

void nl80211_send_sta_del_event ( struct cfg80211_registered_device rdev,
struct net_device dev,
const u8 mac_addr,
gfp_t  gfp 
)

Definition at line 8335 of file nl80211.c.

void nl80211_send_sta_event ( struct cfg80211_registered_device rdev,
struct net_device dev,
const u8 mac_addr,
struct station_info sinfo,
gfp_t  gfp 
)

Definition at line 8315 of file nl80211.c.

void nl80211_send_unprot_deauth ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 7903 of file nl80211.c.

void nl80211_send_unprot_disassoc ( struct cfg80211_registered_device rdev,
struct net_device netdev,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

Definition at line 7911 of file nl80211.c.

bool nl80211_unexpected_4addr_frame ( struct net_device dev,
const u8 addr,
gfp_t  gfp 
)

Definition at line 8450 of file nl80211.c.

bool nl80211_unexpected_frame ( struct net_device dev,
const u8 addr,
gfp_t  gfp 
)

Definition at line 8444 of file nl80211.c.