Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
cfg80211.h File Reference
#include <linux/netdevice.h>
#include <linux/debugfs.h>
#include <linux/list.h>
#include <linux/bug.h>
#include <linux/netlink.h>
#include <linux/skbuff.h>
#include <linux/nl80211.h>
#include <linux/if_ether.h>
#include <linux/ieee80211.h>
#include <net/regulatory.h>

Go to the source code of this file.

Data Structures

struct  ieee80211_channel
 
struct  ieee80211_rate
 
struct  ieee80211_sta_ht_cap
 
struct  ieee80211_sta_vht_cap
 
struct  ieee80211_supported_band
 
struct  vif_params
 
struct  key_params
 
struct  survey_info
 
struct  cfg80211_crypto_settings
 
struct  cfg80211_beacon_data
 
struct  cfg80211_ap_settings
 
struct  station_parameters
 
struct  rate_info
 
struct  sta_bss_parameters
 
struct  station_info
 
struct  mpath_info
 
struct  bss_parameters
 
struct  mesh_config
 
struct  mesh_setup
 
struct  ieee80211_txq_params
 
struct  cfg80211_ssid
 
struct  cfg80211_scan_request
 
struct  cfg80211_match_set
 
struct  cfg80211_sched_scan_request
 
struct  cfg80211_bss
 
struct  cfg80211_auth_request
 
struct  cfg80211_assoc_request
 
struct  cfg80211_deauth_request
 
struct  cfg80211_disassoc_request
 
struct  cfg80211_ibss_params
 
struct  cfg80211_connect_params
 
struct  cfg80211_bitrate_mask
 
struct  cfg80211_pmksa
 
struct  cfg80211_wowlan_trig_pkt_pattern
 
struct  cfg80211_wowlan
 
struct  cfg80211_gtk_rekey_data
 
struct  cfg80211_ops
 
struct  ieee80211_iface_limit
 
struct  ieee80211_iface_combination
 
struct  mac_address
 
struct  ieee80211_txrx_stypes
 
struct  wiphy_wowlan_support
 
struct  wiphy
 
struct  wireless_dev
 
struct  radiotap_align_size
 
struct  ieee80211_radiotap_namespace
 
struct  ieee80211_radiotap_vendor_namespaces
 
struct  ieee80211_radiotap_iterator
 

Macros

#define IEEE80211_CHAN_NO_HT40   (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS)
 
#define CFG80211_TESTMODE_CMD(cmd)
 
#define CFG80211_TESTMODE_DUMP(cmd)
 
#define wiphy_printk(level, wiphy, format, args...)   dev_printk(level, &(wiphy)->dev, format, ##args)
 
#define wiphy_emerg(wiphy, format, args...)   dev_emerg(&(wiphy)->dev, format, ##args)
 
#define wiphy_alert(wiphy, format, args...)   dev_alert(&(wiphy)->dev, format, ##args)
 
#define wiphy_crit(wiphy, format, args...)   dev_crit(&(wiphy)->dev, format, ##args)
 
#define wiphy_err(wiphy, format, args...)   dev_err(&(wiphy)->dev, format, ##args)
 
#define wiphy_warn(wiphy, format, args...)   dev_warn(&(wiphy)->dev, format, ##args)
 
#define wiphy_notice(wiphy, format, args...)   dev_notice(&(wiphy)->dev, format, ##args)
 
#define wiphy_info(wiphy, format, args...)   dev_info(&(wiphy)->dev, format, ##args)
 
#define wiphy_debug(wiphy, format, args...)   wiphy_printk(KERN_DEBUG, wiphy, format, ##args)
 
#define wiphy_dbg(wiphy, format, args...)   dev_dbg(&(wiphy)->dev, format, ##args)
 
#define wiphy_vdbg(wiphy, format, args...)
 
#define wiphy_WARN(wiphy, format, args...)   WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args);
 

Enumerations

enum  ieee80211_band { IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ, IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ, IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ, IEEE80211_NUM_BANDS }
 
enum  ieee80211_channel_flags {
  IEEE80211_CHAN_DISABLED = 1<<0, IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, IEEE80211_CHAN_NO_IBSS = 1<<2, IEEE80211_CHAN_RADAR = 1<<3,
  IEEE80211_CHAN_NO_HT40PLUS = 1<<4, IEEE80211_CHAN_NO_HT40MINUS = 1<<5, IEEE80211_CHAN_NO_OFDM = 1<<6
}
 
enum  ieee80211_rate_flags {
  IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, IEEE80211_RATE_MANDATORY_A = 1<<1, IEEE80211_RATE_MANDATORY_B = 1<<2, IEEE80211_RATE_MANDATORY_G = 1<<3,
  IEEE80211_RATE_ERP_G = 1<<4
}
 
enum  survey_info_flags {
  SURVEY_INFO_NOISE_DBM = 1<<0, SURVEY_INFO_IN_USE = 1<<1, SURVEY_INFO_CHANNEL_TIME = 1<<2, SURVEY_INFO_CHANNEL_TIME_BUSY = 1<<3,
  SURVEY_INFO_CHANNEL_TIME_EXT_BUSY = 1<<4, SURVEY_INFO_CHANNEL_TIME_RX = 1<<5, SURVEY_INFO_CHANNEL_TIME_TX = 1<<6
}
 
enum  plink_actions { PLINK_ACTION_INVALID, PLINK_ACTION_OPEN, PLINK_ACTION_BLOCK }
 
enum  station_parameters_apply_mask { STATION_PARAM_APPLY_UAPSD = BIT(0) }
 
enum  station_info_flags {
  STATION_INFO_INACTIVE_TIME = 1<<0, STATION_INFO_RX_BYTES = 1<<1, STATION_INFO_TX_BYTES = 1<<2, STATION_INFO_LLID = 1<<3,
  STATION_INFO_PLID = 1<<4, STATION_INFO_PLINK_STATE = 1<<5, STATION_INFO_SIGNAL = 1<<6, STATION_INFO_TX_BITRATE = 1<<7,
  STATION_INFO_RX_PACKETS = 1<<8, STATION_INFO_TX_PACKETS = 1<<9, STATION_INFO_TX_RETRIES = 1<<10, STATION_INFO_TX_FAILED = 1<<11,
  STATION_INFO_RX_DROP_MISC = 1<<12, STATION_INFO_SIGNAL_AVG = 1<<13, STATION_INFO_RX_BITRATE = 1<<14, STATION_INFO_BSS_PARAM = 1<<15,
  STATION_INFO_CONNECTED_TIME = 1<<16, STATION_INFO_ASSOC_REQ_IES = 1<<17, STATION_INFO_STA_FLAGS = 1<<18, STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
  STATION_INFO_T_OFFSET = 1<<20
}
 
enum  rate_info_flags { RATE_INFO_FLAGS_MCS = 1<<0, RATE_INFO_FLAGS_40_MHZ_WIDTH = 1<<1, RATE_INFO_FLAGS_SHORT_GI = 1<<2, RATE_INFO_FLAGS_60G = 1<<3 }
 
enum  bss_param_flags { BSS_PARAM_FLAGS_CTS_PROT = 1<<0, BSS_PARAM_FLAGS_SHORT_PREAMBLE = 1<<1, BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 1<<2 }
 
enum  monitor_flags {
  MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, MONITOR_FLAG_PLCPFAIL = 1<<NL80211_MNTR_FLAG_PLCPFAIL, MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS,
  MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES
}
 
enum  mpath_info_flags {
  MPATH_INFO_FRAME_QLEN = BIT(0), MPATH_INFO_SN = BIT(1), MPATH_INFO_METRIC = BIT(2), MPATH_INFO_EXPTIME = BIT(3),
  MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4), MPATH_INFO_DISCOVERY_RETRIES = BIT(5), MPATH_INFO_FLAGS = BIT(6)
}
 
enum  cfg80211_signal_type { CFG80211_SIGNAL_TYPE_NONE, CFG80211_SIGNAL_TYPE_MBM, CFG80211_SIGNAL_TYPE_UNSPEC }
 
enum  cfg80211_assoc_req_flags { ASSOC_REQ_DISABLE_HT = BIT(0) }
 
enum  wiphy_params_flags {
  WIPHY_PARAM_RETRY_SHORT = 1 << 0, WIPHY_PARAM_RETRY_LONG = 1 << 1, WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, WIPHY_PARAM_RTS_THRESHOLD = 1 << 3,
  WIPHY_PARAM_COVERAGE_CLASS = 1 << 4
}
 
enum  wiphy_flags {
  WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), WIPHY_FLAG_STRICT_REGULATORY = BIT(1), WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2), WIPHY_FLAG_NETNS_OK = BIT(3),
  WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4), WIPHY_FLAG_4ADDR_AP = BIT(5), WIPHY_FLAG_4ADDR_STATION = BIT(6), WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
  WIPHY_FLAG_IBSS_RSN = BIT(8), WIPHY_FLAG_MESH_AUTH = BIT(10), WIPHY_FLAG_SUPPORTS_SCHED_SCAN = BIT(11), WIPHY_FLAG_SUPPORTS_FW_ROAM = BIT(13),
  WIPHY_FLAG_AP_UAPSD = BIT(14), WIPHY_FLAG_SUPPORTS_TDLS = BIT(15), WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16), WIPHY_FLAG_HAVE_AP_SME = BIT(17),
  WIPHY_FLAG_REPORTS_OBSS = BIT(18), WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), WIPHY_FLAG_OFFCHAN_TX = BIT(20), WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21)
}
 
enum  wiphy_wowlan_support_flags {
  WIPHY_WOWLAN_ANY = BIT(0), WIPHY_WOWLAN_MAGIC_PKT = BIT(1), WIPHY_WOWLAN_DISCONNECT = BIT(2), WIPHY_WOWLAN_SUPPORTS_GTK_REKEY = BIT(3),
  WIPHY_WOWLAN_GTK_REKEY_FAILURE = BIT(4), WIPHY_WOWLAN_EAP_IDENTITY_REQ = BIT(5), WIPHY_WOWLAN_4WAY_HANDSHAKE = BIT(6), WIPHY_WOWLAN_RFKILL_RELEASE = BIT(7)
}
 

Functions

const u8ieee80211_bss_get_ie (struct cfg80211_bss *bss, u8 ie)
 
struct wiphywiphy_new (const struct cfg80211_ops *ops, int sizeof_priv)
 
int wiphy_register (struct wiphy *wiphy)
 
void wiphy_unregister (struct wiphy *wiphy)
 
void wiphy_free (struct wiphy *wiphy)
 
int ieee80211_channel_to_frequency (int chan, enum ieee80211_band band)
 
int ieee80211_frequency_to_channel (int freq)
 
struct ieee80211_channel__ieee80211_get_channel (struct wiphy *wiphy, int freq)
 
struct ieee80211_rateieee80211_get_response_rate (struct ieee80211_supported_band *sband, u32 basic_rates, int bitrate)
 
int ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator *iterator, struct ieee80211_radiotap_header *radiotap_header, int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns)
 
int ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator *iterator)
 
unsigned int ieee80211_get_hdrlen_from_skb (const struct sk_buff *skb)
 
unsigned int __attribute_const__ ieee80211_hdrlen (__le16 fc)
 
unsigned int ieee80211_get_mesh_hdrlen (struct ieee80211s_hdr *meshhdr)
 
int ieee80211_data_to_8023 (struct sk_buff *skb, const u8 *addr, enum nl80211_iftype iftype)
 
int ieee80211_data_from_8023 (struct sk_buff *skb, const u8 *addr, enum nl80211_iftype iftype, u8 *bssid, bool qos)
 
void ieee80211_amsdu_to_8023s (struct sk_buff *skb, struct sk_buff_head *list, const u8 *addr, enum nl80211_iftype iftype, const unsigned int extra_headroom, bool has_80211_header)
 
unsigned int cfg80211_classify8021d (struct sk_buff *skb)
 
const u8cfg80211_find_ie (u8 eid, const u8 *ies, int len)
 
const u8cfg80211_find_vendor_ie (unsigned int oui, u8 oui_type, const u8 *ies, int len)
 
int regulatory_hint (struct wiphy *wiphy, const char *alpha2)
 
void wiphy_apply_custom_regulatory (struct wiphy *wiphy, const struct ieee80211_regdomain *regd)
 
int freq_reg_info (struct wiphy *wiphy, u32 center_freq, u32 desired_bw_khz, const struct ieee80211_reg_rule **reg_rule)
 
void cfg80211_scan_done (struct cfg80211_scan_request *request, bool aborted)
 
void cfg80211_sched_scan_results (struct wiphy *wiphy)
 
void cfg80211_sched_scan_stopped (struct wiphy *wiphy)
 
struct cfg80211_bss *__must_check cfg80211_inform_bss_frame (struct wiphy *wiphy, struct ieee80211_channel *channel, struct ieee80211_mgmt *mgmt, size_t len, s32 signal, gfp_t gfp)
 
struct cfg80211_bss *__must_check cfg80211_inform_bss (struct wiphy *wiphy, struct ieee80211_channel *channel, const u8 *bssid, u64 tsf, u16 capability, u16 beacon_interval, const u8 *ie, size_t ielen, s32 signal, gfp_t gfp)
 
struct cfg80211_bsscfg80211_get_bss (struct wiphy *wiphy, struct ieee80211_channel *channel, const u8 *bssid, const u8 *ssid, size_t ssid_len, u16 capa_mask, u16 capa_val)
 
struct cfg80211_bsscfg80211_get_mesh (struct wiphy *wiphy, struct ieee80211_channel *channel, const u8 *meshid, size_t meshidlen, const u8 *meshcfg)
 
void cfg80211_ref_bss (struct cfg80211_bss *bss)
 
void cfg80211_put_bss (struct cfg80211_bss *bss)
 
void cfg80211_unlink_bss (struct wiphy *wiphy, struct cfg80211_bss *bss)
 
void cfg80211_send_rx_auth (struct net_device *dev, const u8 *buf, size_t len)
 
void cfg80211_send_auth_timeout (struct net_device *dev, const u8 *addr)
 
void cfg80211_send_rx_assoc (struct net_device *dev, struct cfg80211_bss *bss, const u8 *buf, size_t len)
 
void cfg80211_send_assoc_timeout (struct net_device *dev, const u8 *addr)
 
void cfg80211_send_deauth (struct net_device *dev, const u8 *buf, size_t len)
 
void __cfg80211_send_deauth (struct net_device *dev, const u8 *buf, size_t len)
 
void cfg80211_send_disassoc (struct net_device *dev, const u8 *buf, size_t len)
 
void __cfg80211_send_disassoc (struct net_device *dev, const u8 *buf, size_t len)
 
void cfg80211_send_unprot_deauth (struct net_device *dev, const u8 *buf, size_t len)
 
void cfg80211_send_unprot_disassoc (struct net_device *dev, const u8 *buf, size_t len)
 
void cfg80211_michael_mic_failure (struct net_device *dev, const u8 *addr, enum nl80211_key_type key_type, int key_id, const u8 *tsc, gfp_t gfp)
 
void cfg80211_ibss_joined (struct net_device *dev, const u8 *bssid, gfp_t gfp)
 
void cfg80211_notify_new_peer_candidate (struct net_device *dev, const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp)
 
void wiphy_rfkill_set_hw_state (struct wiphy *wiphy, bool blocked)
 
void wiphy_rfkill_start_polling (struct wiphy *wiphy)
 
void wiphy_rfkill_stop_polling (struct wiphy *wiphy)
 
void cfg80211_connect_result (struct net_device *dev, 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 cfg80211_roamed (struct net_device *dev, struct ieee80211_channel *channel, 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 cfg80211_roamed_bss (struct net_device *dev, struct cfg80211_bss *bss, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp)
 
void cfg80211_disconnected (struct net_device *dev, u16 reason, u8 *ie, size_t ie_len, gfp_t gfp)
 
void cfg80211_ready_on_channel (struct wireless_dev *wdev, u64 cookie, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, unsigned int duration, gfp_t gfp)
 
void cfg80211_remain_on_channel_expired (struct wireless_dev *wdev, u64 cookie, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, gfp_t gfp)
 
void cfg80211_new_sta (struct net_device *dev, const u8 *mac_addr, struct station_info *sinfo, gfp_t gfp)
 
void cfg80211_del_sta (struct net_device *dev, const u8 *mac_addr, gfp_t gfp)
 
void cfg80211_conn_failed (struct net_device *dev, const u8 *mac_addr, enum nl80211_connect_failed_reason reason, gfp_t gfp)
 
bool cfg80211_rx_mgmt (struct wireless_dev *wdev, int freq, int sig_dbm, const u8 *buf, size_t len, gfp_t gfp)
 
void cfg80211_mgmt_tx_status (struct wireless_dev *wdev, u64 cookie, const u8 *buf, size_t len, bool ack, gfp_t gfp)
 
void cfg80211_cqm_rssi_notify (struct net_device *dev, enum nl80211_cqm_rssi_threshold_event rssi_event, gfp_t gfp)
 
void cfg80211_cqm_pktloss_notify (struct net_device *dev, const u8 *peer, u32 num_packets, gfp_t gfp)
 
void cfg80211_cqm_txe_notify (struct net_device *dev, const u8 *peer, u32 num_packets, u32 rate, u32 intvl, gfp_t gfp)
 
void cfg80211_gtk_rekey_notify (struct net_device *dev, const u8 *bssid, const u8 *replay_ctr, gfp_t gfp)
 
void cfg80211_pmksa_candidate_notify (struct net_device *dev, int index, const u8 *bssid, bool preauth, gfp_t gfp)
 
bool cfg80211_rx_spurious_frame (struct net_device *dev, const u8 *addr, gfp_t gfp)
 
bool cfg80211_rx_unexpected_4addr_frame (struct net_device *dev, const u8 *addr, gfp_t gfp)
 
void cfg80211_probe_status (struct net_device *dev, const u8 *addr, u64 cookie, bool acked, gfp_t gfp)
 
void cfg80211_report_obss_beacon (struct wiphy *wiphy, const u8 *frame, size_t len, int freq, int sig_dbm, gfp_t gfp)
 
bool cfg80211_can_beacon_sec_chan (struct wiphy *wiphy, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type)
 
void cfg80211_ch_switch_notify (struct net_device *dev, int freq, enum nl80211_channel_type type)
 
u32 cfg80211_calculate_bitrate (struct rate_info *rate)
 
void cfg80211_unregister_wdev (struct wireless_dev *wdev)
 

Variables

const unsigned char rfc1042_header [6]
 
const unsigned char bridge_tunnel_header [6]
 

Macro Definition Documentation

#define CFG80211_TESTMODE_CMD (   cmd)

Definition at line 3236 of file cfg80211.h.

#define CFG80211_TESTMODE_DUMP (   cmd)

Definition at line 3237 of file cfg80211.h.

#define IEEE80211_CHAN_NO_HT40   (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS)

Definition at line 111 of file cfg80211.h.

#define wiphy_alert (   wiphy,
  format,
  args... 
)    dev_alert(&(wiphy)->dev, format, ##args)

Definition at line 3605 of file cfg80211.h.

#define wiphy_crit (   wiphy,
  format,
  args... 
)    dev_crit(&(wiphy)->dev, format, ##args)

Definition at line 3607 of file cfg80211.h.

#define wiphy_dbg (   wiphy,
  format,
  args... 
)    dev_dbg(&(wiphy)->dev, format, ##args)

Definition at line 3621 of file cfg80211.h.

#define wiphy_debug (   wiphy,
  format,
  args... 
)    wiphy_printk(KERN_DEBUG, wiphy, format, ##args)

Definition at line 3618 of file cfg80211.h.

#define wiphy_emerg (   wiphy,
  format,
  args... 
)    dev_emerg(&(wiphy)->dev, format, ##args)

Definition at line 3603 of file cfg80211.h.

#define wiphy_err (   wiphy,
  format,
  args... 
)    dev_err(&(wiphy)->dev, format, ##args)

Definition at line 3609 of file cfg80211.h.

#define wiphy_info (   wiphy,
  format,
  args... 
)    dev_info(&(wiphy)->dev, format, ##args)

Definition at line 3615 of file cfg80211.h.

#define wiphy_notice (   wiphy,
  format,
  args... 
)    dev_notice(&(wiphy)->dev, format, ##args)

Definition at line 3613 of file cfg80211.h.

#define wiphy_printk (   level,
  wiphy,
  format,
  args... 
)    dev_printk(level, &(wiphy)->dev, format, ##args)

Definition at line 3601 of file cfg80211.h.

#define wiphy_vdbg (   wiphy,
  format,
  args... 
)
Value:
({ \
if (0) \
wiphy_printk(KERN_DEBUG, wiphy, format, ##args); \
0; \
})

Definition at line 3627 of file cfg80211.h.

#define wiphy_warn (   wiphy,
  format,
  args... 
)    dev_warn(&(wiphy)->dev, format, ##args)

Definition at line 3611 of file cfg80211.h.

#define wiphy_WARN (   wiphy,
  format,
  args... 
)    WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args);

Definition at line 3640 of file cfg80211.h.

Enumeration Type Documentation

enum station_info_rate_flags - bitrate info flags

Used by the driver to indicate the specific rate transmission type for 802.11n transmissions.

: whether CTS protection is enabled : whether short preamble is enabled : whether short slot time is enabled

Enumerator:
BSS_PARAM_FLAGS_CTS_PROT 
BSS_PARAM_FLAGS_SHORT_PREAMBLE 
BSS_PARAM_FLAGS_SHORT_SLOT_TIME 

Definition at line 620 of file cfg80211.h.

enum cfg80211_assoc_req_flags - Over-ride default behaviour in association.

: Disable HT (802.11n)

Enumerator:
ASSOC_REQ_DISABLE_HT 

Definition at line 1170 of file cfg80211.h.

enum cfg80211_signal_type - signal type

: no signal strength information available : signal strength in mBm (100*dBm) : signal strength, increasing from 0 through 100

Enumerator:
CFG80211_SIGNAL_TYPE_NONE 
CFG80211_SIGNAL_TYPE_MBM 
CFG80211_SIGNAL_TYPE_UNSPEC 

Definition at line 1083 of file cfg80211.h.

DOC: Introduction

cfg80211 is the configuration API for 802.11 devices in Linux. It bridges userspace and drivers, and offers some utility functionality associated with 802.11. cfg80211 must, directly or indirectly via mac80211, be used by all modern wireless drivers in Linux, so that they offer a consistent API through nl80211. For backward compatibility, cfg80211 also offers wireless extensions to userspace, but hides them from drivers completely.

Additionally, cfg80211 contains code to help enforce regulatory spectrum use restrictions. DOC: Device registration

In order for a driver to use cfg80211, it must register the hardware device with cfg80211. This happens through a number of hardware capability structs described below.

The fundamental structure for each device is the 'wiphy', of which each instance describes a physical wireless device connected to the system. Each such wiphy can have zero, one, or many virtual interfaces associated with it, which need to be identified as such by pointing the network interface's pointer to a &struct wireless_dev which further describes the wireless part of the interface, normally this struct is embedded in the network interface's private data area. Drivers can optionally allow creating or destroying virtual interfaces on the fly, but without at least one or the ability to create some the wireless device isn't useful.

Each wiphy structure contains device capability information, and also has a pointer to the various operations the driver offers. The definitions and structures here describe these capabilities in detail. enum ieee80211_band - supported frequency bands

The bands are assigned this way because the supported bitrates differ in these bands.

: 2.4GHz ISM band : around 5GHz band (4.9-5.7) : around 60 GHz band (58.32 - 64.80 GHz) : number of defined bands

Enumerator:
IEEE80211_BAND_2GHZ 
IEEE80211_BAND_5GHZ 
IEEE80211_BAND_60GHZ 
IEEE80211_NUM_BANDS 

Definition at line 76 of file cfg80211.h.

enum ieee80211_channel_flags - channel flags

Channel flags set by the regulatory control code.

: This channel is disabled. : Only passive scanning is permitted on this channel. : IBSS is not allowed on this channel. : Radar detection is required on this channel. : extension channel above this channel is not permitted. : extension channel below this channel is not permitted. : OFDM is not allowed on this channel.

Enumerator:
IEEE80211_CHAN_DISABLED 
IEEE80211_CHAN_PASSIVE_SCAN 
IEEE80211_CHAN_NO_IBSS 
IEEE80211_CHAN_RADAR 
IEEE80211_CHAN_NO_HT40PLUS 
IEEE80211_CHAN_NO_HT40MINUS 
IEEE80211_CHAN_NO_OFDM 

Definition at line 101 of file cfg80211.h.

enum ieee80211_rate_flags - rate flags

Hardware/specification flags for rates. These are structured in a way that allows using the same bitrate structure for different bands/PHY modes.

: Hardware can send with short preamble on this bitrate; only relevant in 2.4GHz band and with CCK rates. : This bitrate is a mandatory rate when used with 802.11a (on the 5 GHz band); filled by the core code when registering the wiphy. : This bitrate is a mandatory rate when used with 802.11b (on the 2.4 GHz band); filled by the core code when registering the wiphy. : This bitrate is a mandatory rate when used with 802.11g (on the 2.4 GHz band); filled by the core code when registering the wiphy. : This is an ERP rate in 802.11g mode.

Enumerator:
IEEE80211_RATE_SHORT_PREAMBLE 
IEEE80211_RATE_MANDATORY_A 
IEEE80211_RATE_MANDATORY_B 
IEEE80211_RATE_MANDATORY_G 
IEEE80211_RATE_ERP_G 

Definition at line 169 of file cfg80211.h.

enum monitor_flags - monitor flags

Monitor interface configuration flags. Note that these must be the bits according to the nl80211 flags.

: pass frames with bad FCS : pass frames with bad PLCP : pass control frames : disable BSSID filtering : report frames after processing

Enumerator:
MONITOR_FLAG_FCSFAIL 
MONITOR_FLAG_PLCPFAIL 
MONITOR_FLAG_CONTROL 
MONITOR_FLAG_OTHER_BSS 
MONITOR_FLAG_COOK_FRAMES 

Definition at line 726 of file cfg80211.h.

enum mpath_info_flags - mesh path information flags

Used by the driver to indicate which info in &struct mpath_info it has filled in during get_station() or dump_station().

: filled : filled : filled : filled : filled : filled : filled

Enumerator:
MPATH_INFO_FRAME_QLEN 
MPATH_INFO_SN 
MPATH_INFO_METRIC 
MPATH_INFO_EXPTIME 
MPATH_INFO_DISCOVERY_TIMEOUT 
MPATH_INFO_DISCOVERY_RETRIES 
MPATH_INFO_FLAGS 

Definition at line 748 of file cfg80211.h.

enum plink_action - actions to perform in mesh peers

: action 0 is reserved : start mesh peer link establishment : block traffic from this mesh peer

Enumerator:
PLINK_ACTION_INVALID 
PLINK_ACTION_OPEN 
PLINK_ACTION_BLOCK 

Definition at line 466 of file cfg80211.h.

enum station_info_rate_flags - bitrate info flags

Used by the driver to indicate the specific rate transmission type for 802.11n transmissions.

: filled : 40 Mhz width transmission : 400ns guard interval : 60gHz MCS

Enumerator:
RATE_INFO_FLAGS_MCS 
RATE_INFO_FLAGS_40_MHZ_WIDTH 
RATE_INFO_FLAGS_SHORT_GI 
RATE_INFO_FLAGS_60G 

Definition at line 588 of file cfg80211.h.

enum station_info_flags - station information flags

Used by the driver to indicate which info in &struct station_info it has filled in during get_station() or dump_station().

: filled : filled : filled : filled : filled : filled : filled : fields are filled (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) : filled : filled : filled : filled : filled : filled : fields are filled : filled : filled : filled : filled : filled : filled

Enumerator:
STATION_INFO_INACTIVE_TIME 
STATION_INFO_RX_BYTES 
STATION_INFO_TX_BYTES 
STATION_INFO_LLID 
STATION_INFO_PLID 
STATION_INFO_PLINK_STATE 
STATION_INFO_SIGNAL 
STATION_INFO_TX_BITRATE 
STATION_INFO_RX_PACKETS 
STATION_INFO_TX_PACKETS 
STATION_INFO_TX_RETRIES 
STATION_INFO_TX_FAILED 
STATION_INFO_RX_DROP_MISC 
STATION_INFO_SIGNAL_AVG 
STATION_INFO_RX_BITRATE 
STATION_INFO_BSS_PARAM 
STATION_INFO_CONNECTED_TIME 
STATION_INFO_ASSOC_REQ_IES 
STATION_INFO_STA_FLAGS 
STATION_INFO_BEACON_LOSS_COUNT 
STATION_INFO_T_OFFSET 

Definition at line 553 of file cfg80211.h.

enum station_parameters_apply_mask - station parameter values to apply : apply new uAPSD parameters (uapsd_queues, max_sp)

Not all station parameters have in-band "no change" signalling, for those that don't these flags will are used.

Enumerator:
STATION_PARAM_APPLY_UAPSD 

Definition at line 479 of file cfg80211.h.

enum survey_info_flags - survey information flags

: noise (in dBm) was filled in : channel is currently being used : channel active time (in ms) was filled in : channel busy time was filled in : extension channel busy time was filled in : channel receive time was filled in : channel transmit time was filled in

Used by the driver to indicate which info in &struct survey_info it has filled in during the get_survey().

Enumerator:
SURVEY_INFO_NOISE_DBM 
SURVEY_INFO_IN_USE 
SURVEY_INFO_CHANNEL_TIME 
SURVEY_INFO_CHANNEL_TIME_BUSY 
SURVEY_INFO_CHANNEL_TIME_EXT_BUSY 
SURVEY_INFO_CHANNEL_TIME_RX 
SURVEY_INFO_CHANNEL_TIME_TX 

Definition at line 322 of file cfg80211.h.

enum wiphy_flags - wiphy capability flags

: tells us the driver for this device has its own custom regulatory domain and cannot identify the ISO / IEC 3166 alpha2 it belongs to. When this is enabled we will disregard the first regulatory hint (when the initiator is REGDOM_SET_BY_CORE). : tells us the driver for this device will ignore regulatory domain settings until it gets its own regulatory domain via its regulatory_hint() unless the regulatory hint is from a country IE. After its gets its own regulatory domain it will only allow further regulatory domain settings to further enhance compliance. For example if channel 13 and 14 are disabled by this regulatory domain no user regulatory domain can enable these channels at a later time. This can be used for devices which do not have calibration information guaranteed for frequencies or settings outside of its regulatory domain. If used in combination with WIPHY_FLAG_CUSTOM_REGULATORY the inspected country IE power settings will be followed. : enable this if your driver needs to ensure that passive scan flags and beaconing flags may not be lifted by cfg80211 due to regulatory beacon hints. For more information on beacon hints read the documenation for regulatory_hint_found_beacon() : if not set, do not allow changing the netns of this wiphy at all : if set to true, powersave will be enabled by default – this flag will be set depending on the kernel's default on wiphy_new(), but can be changed by the driver if it has a good reason to override the default : supports 4addr mode even on AP (with a single station on a VLAN interface) : supports 4addr mode even as a station : This device supports setting the control port protocol ethertype. The device also honours the control_port_no_encrypt flag. : The device supports IBSS RSN. : The device supports mesh authentication by routing auth frames to userspace. See . : The device supports scheduled scans. : The device supports roaming feature in the firmware. : The device supports uapsd on AP. : The device supports TDLS (802.11z) operation. : The device does not handle TDLS (802.11z) link setup/discovery operations internally. Setup, discovery and teardown packets should be sent through the command. When this flag is not set, should be used for asking the driver/firmware to perform a TDLS operation. : device integrates AP SME : the device will report beacons from other BSSes when there are virtual interfaces in AP mode by calling cfg80211_report_obss_beacon(). : When operating as an AP, the device responds to probe-requests in hardware. : Device supports direct off-channel TX. : Device supports remain-on-channel call.

Enumerator:
WIPHY_FLAG_CUSTOM_REGULATORY 
WIPHY_FLAG_STRICT_REGULATORY 
WIPHY_FLAG_DISABLE_BEACON_HINTS 
WIPHY_FLAG_NETNS_OK 
WIPHY_FLAG_PS_ON_BY_DEFAULT 
WIPHY_FLAG_4ADDR_AP 
WIPHY_FLAG_4ADDR_STATION 
WIPHY_FLAG_CONTROL_PORT_PROTOCOL 
WIPHY_FLAG_IBSS_RSN 
WIPHY_FLAG_MESH_AUTH 
WIPHY_FLAG_SUPPORTS_SCHED_SCAN 
WIPHY_FLAG_SUPPORTS_FW_ROAM 
WIPHY_FLAG_AP_UAPSD 
WIPHY_FLAG_SUPPORTS_TDLS 
WIPHY_FLAG_TDLS_EXTERNAL_SETUP 
WIPHY_FLAG_HAVE_AP_SME 
WIPHY_FLAG_REPORTS_OBSS 
WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD 
WIPHY_FLAG_OFFCHAN_TX 
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL 

Definition at line 1911 of file cfg80211.h.

enum wiphy_params_flags - set_wiphy_params bitfield values : wiphy->retry_short has changed : wiphy->retry_long has changed : wiphy->frag_threshold has changed : wiphy->rts_threshold has changed : coverage class changed

Enumerator:
WIPHY_PARAM_RETRY_SHORT 
WIPHY_PARAM_RETRY_LONG 
WIPHY_PARAM_FRAG_THRESHOLD 
WIPHY_PARAM_RTS_THRESHOLD 
WIPHY_PARAM_COVERAGE_CLASS 

Definition at line 1339 of file cfg80211.h.

enum wiphy_wowlan_support_flags - WoWLAN support flags : supports wakeup for the special "any" trigger that keeps the device operating as-is and wakes up the host on any activity, for example a received packet that passed filtering; note that the packet should be preserved in that case : supports wakeup on magic packet (see nl80211.h) : supports wakeup on disconnect : supports GTK rekeying while asleep : supports wakeup on GTK rekey failure : supports wakeup on EAP identity request : supports wakeup on 4-way handshake failure : supports wakeup on RF-kill release

Enumerator:
WIPHY_WOWLAN_ANY 
WIPHY_WOWLAN_MAGIC_PKT 
WIPHY_WOWLAN_DISCONNECT 
WIPHY_WOWLAN_SUPPORTS_GTK_REKEY 
WIPHY_WOWLAN_GTK_REKEY_FAILURE 
WIPHY_WOWLAN_EAP_IDENTITY_REQ 
WIPHY_WOWLAN_4WAY_HANDSHAKE 
WIPHY_WOWLAN_RFKILL_RELEASE 

Definition at line 2033 of file cfg80211.h.

Function Documentation

void __cfg80211_send_deauth ( struct net_device dev,
const u8 buf,
size_t  len 
)

__cfg80211_send_deauth - notification of processed deauthentication : network device : deauthentication frame (header + body) : length of the frame data

Like cfg80211_send_deauth(), but doesn't take the wdev lock.

Definition at line 91 of file mlme.c.

void __cfg80211_send_disassoc ( struct net_device dev,
const u8 buf,
size_t  len 
)

__cfg80211_send_disassoc - notification of processed disassociation : network device : disassociation response frame (header + body) : length of the frame data

Like cfg80211_send_disassoc(), but doesn't take the wdev lock.

Definition at line 139 of file mlme.c.

struct ieee80211_channel* __ieee80211_get_channel ( struct wiphy wiphy,
int  freq 
)
read

Definition at line 82 of file util.c.

u32 cfg80211_calculate_bitrate ( struct rate_info rate)

Definition at line 947 of file util.c.

bool cfg80211_can_beacon_sec_chan ( struct wiphy wiphy,
struct ieee80211_channel chan,
enum nl80211_channel_type  channel_type 
)

cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used : the wiphy : main channel : HT mode

This function returns true if there is no secondary channel or the secondary channel can be used for beaconing (i.e. is not a radar channel etc.)

Definition at line 48 of file chan.c.

void cfg80211_ch_switch_notify ( struct net_device dev,
int  freq,
enum nl80211_channel_type  type 
)

Definition at line 966 of file mlme.c.

unsigned int cfg80211_classify8021d ( struct sk_buff skb)

cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame : the data frame

Definition at line 660 of file util.c.

void cfg80211_conn_failed ( struct net_device dev,
const u8 mac_addr,
enum nl80211_connect_failed_reason  reason,
gfp_t  gfp 
)

cfg80211_conn_failed - connection request failed notification

: the netdev : the station's address : the reason for connection failure : allocation flags

Whenever a station tries to connect to an AP and if the station could not connect to the AP as the AP has rejected the connection for some reasons, this function is called.

The reason for connection failure can be any of the value from nl80211_connect_failed_reason enum

Definition at line 609 of file mlme.c.

void cfg80211_connect_result ( struct net_device dev,
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 
)

cfg80211_connect_result - notify cfg80211 of connection result

: network device : the BSSID of the AP : association request IEs (maybe be NULL) : association request IEs length : association response IEs (may be NULL) : assoc response IEs length : status code, 0 for successful connection, use WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you the real status code for failures. : allocation flags

It should be called by the underlying driver whenever connect() has succeeded.

Definition at line 518 of file sme.c.

void cfg80211_cqm_pktloss_notify ( struct net_device dev,
const u8 peer,
u32  num_packets,
gfp_t  gfp 
)

cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer : network device : peer's MAC address : how many packets were lost – should be a fixed threshold but probably no less than maybe 50, or maybe a throughput dependent threshold (to account for temporary interference) : context flags

Definition at line 919 of file mlme.c.

void cfg80211_cqm_rssi_notify ( struct net_device dev,
enum nl80211_cqm_rssi_threshold_event  rssi_event,
gfp_t  gfp 
)

cfg80211_cqm_rssi_notify - connection quality monitoring rssi event : network device : the triggered RSSI event : context flags

This function is called when a configured connection quality monitoring rssi threshold reached event occurs.

Definition at line 906 of file mlme.c.

void cfg80211_cqm_txe_notify ( struct net_device dev,
const u8 peer,
u32  num_packets,
u32  rate,
u32  intvl,
gfp_t  gfp 
)

cfg80211_cqm_txe_notify - TX error rate event : network device : peer's MAC address : how many packets were lost : % of packets which failed transmission : interval (in s) over which the TX failure threshold was breached. : context flags

Notify userspace when configured % TX failures over number of packets in a given interval is exceeded.

Definition at line 931 of file mlme.c.

void cfg80211_del_sta ( struct net_device dev,
const u8 mac_addr,
gfp_t  gfp 
)

cfg80211_del_sta - notify userspace about deletion of a station

: the netdev : the station's address : allocation flags

Definition at line 600 of file mlme.c.

void cfg80211_disconnected ( struct net_device dev,
u16  reason,
u8 ie,
size_t  ie_len,
gfp_t  gfp 
)

cfg80211_disconnected - notify cfg80211 that connection was dropped

: network device : information elements of the deauth/disassoc frame (may be NULL) : length of IEs : reason code for the disconnection, set it to 0 if unknown : allocation flags

After it calls this function, the driver should enter an idle state and not try to connect to any AP any more.

Definition at line 731 of file sme.c.

const u8* cfg80211_find_ie ( u8  eid,
const u8 ies,
int  len 
)

cfg80211_find_ie - find information element in data

: element ID : data consisting of IEs : length of data

This function will return NULL if the element ID could not be found or if the element is invalid (claims to be longer than the given data), or a pointer to the first byte of the requested element, that is the byte containing the element ID. There are no checks on the element length other than having to fit into the given data.

Definition at line 219 of file scan.c.

const u8* cfg80211_find_vendor_ie ( unsigned int  oui,
u8  oui_type,
const u8 ies,
int  len 
)

cfg80211_find_vendor_ie - find vendor specific information element in data

: vendor OUI : vendor-specific OUI type : data consisting of IEs : length of data

This function will return NULL if the vendor specific element ID could not be found or if the element is invalid (claims to be longer than the given data), or a pointer to the first byte of the requested element, that is the byte containing the element ID. There are no checks on the element length other than having to fit into the given data.

Definition at line 233 of file scan.c.

struct cfg80211_bss* cfg80211_get_bss ( struct wiphy wiphy,
struct ieee80211_channel channel,
const u8 bssid,
const u8 ssid,
size_t  ssid_len,
u16  capa_mask,
u16  capa_val 
)
read

Definition at line 452 of file scan.c.

struct cfg80211_bss* cfg80211_get_mesh ( struct wiphy wiphy,
struct ieee80211_channel channel,
const u8 meshid,
size_t  meshidlen,
const u8 meshcfg 
)
read

Definition at line 487 of file scan.c.

void cfg80211_gtk_rekey_notify ( struct net_device dev,
const u8 bssid,
const u8 replay_ctr,
gfp_t  gfp 
)

cfg80211_gtk_rekey_notify - notify userspace about driver rekeying : network device : BSSID of AP (to avoid races) : new replay counter : allocation flags

Definition at line 944 of file mlme.c.

void cfg80211_ibss_joined ( struct net_device dev,
const u8 bssid,
gfp_t  gfp 
)

cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS

: network device : the BSSID of the IBSS joined : allocation flags

This function notifies cfg80211 that the device joined an IBSS or switched to a different BSSID. Before this function can be called, either a beacon has to have been received from the IBSS, or one of the cfg80211_inform_bss{,_frame} functions must have been called with the locally generated beacon – this guarantees that there is always a scan result for this IBSS. cfg80211 will handle the rest.

Definition at line 57 of file ibss.c.

struct cfg80211_bss* __must_check cfg80211_inform_bss ( struct wiphy wiphy,
struct ieee80211_channel channel,
const u8 bssid,
u64  tsf,
u16  capability,
u16  beacon_interval,
const u8 ie,
size_t  ielen,
s32  signal,
gfp_t  gfp 
)
read

cfg80211_inform_bss - inform cfg80211 of a new BSS

: the wiphy reporting the BSS : The channel the frame was received on : the BSSID of the BSS : the TSF sent by the peer in the beacon/probe response (or 0) : the capability field sent by the peer : the beacon interval announced by the peer : additional IEs sent by the peer : length of the additional IEs : the signal strength, type depends on the wiphy's signal_type : context flags

This informs cfg80211 that BSS information was found and the BSS should be updated/added.

NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()!

Definition at line 741 of file scan.c.

struct cfg80211_bss* __must_check cfg80211_inform_bss_frame ( struct wiphy wiphy,
struct ieee80211_channel channel,
struct ieee80211_mgmt mgmt,
size_t  len,
s32  signal,
gfp_t  gfp 
)
read

cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame

: the wiphy reporting the BSS : The channel the frame was received on : the management frame (probe response or beacon) : length of the management frame : the signal strength, type depends on the wiphy's signal_type : context flags

This informs cfg80211 that BSS information was found and the BSS should be updated/added.

NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()!

Definition at line 801 of file scan.c.

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

cfg80211_mgmt_tx_status - notification of TX status for management frame : wireless device receiving the frame : Cookie returned by cfg80211_ops::mgmt_tx() : Management frame (header + body) : length of the frame data : Whether frame was acknowledged : context flags

This function is called whenever a management frame was requested to be transmitted with cfg80211_ops::mgmt_tx() to report the TX status of the transmission attempt.

Definition at line 895 of file mlme.c.

void cfg80211_michael_mic_failure ( struct net_device dev,
const u8 addr,
enum nl80211_key_type  key_type,
int  key_id,
const u8 tsc,
gfp_t  gfp 
)

cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) : network device : The source MAC address of the frame : The key type that the received frame used : Key identifier (0..3). Can be -1 if missing. : The TSC value of the frame that generated the MIC failure (6 octets) : allocation flags

This function is called whenever the local MAC detects a MIC failure in a received frame. This matches with MLME-MICHAELMICFAILURE.indication() primitive.

Definition at line 242 of file mlme.c.

void cfg80211_new_sta ( struct net_device dev,
const u8 mac_addr,
struct station_info sinfo,
gfp_t  gfp 
)

cfg80211_new_sta - notify userspace about station

: the netdev : the station's address : the station information : allocation flags

Definition at line 590 of file mlme.c.

void cfg80211_notify_new_peer_candidate ( struct net_device dev,
const u8 macaddr,
const u8 ie,
u8  ie_len,
gfp_t  gfp 
)

cfg80211_notify_new_candidate - notify cfg80211 of a new mesh peer candidate

: network device : the MAC address of the new candidate : information elements advertised by the peer candidate : lenght of the information elements buffer : allocation flags

This function notifies cfg80211 that the mesh peer candidate has been detected, most likely via a beacon or, less likely, via a probe response. cfg80211 then sends a notification to userspace.

Definition at line 240 of file mesh.c.

void cfg80211_pmksa_candidate_notify ( struct net_device dev,
int  index,
const u8 bssid,
bool  preauth,
gfp_t  gfp 
)

cfg80211_pmksa_candidate_notify - notify about PMKSA caching candidate : network device : candidate index (the smaller the index, the higher the priority) : BSSID of AP : Whether AP advertises support for RSN pre-authentication : allocation flags

Definition at line 955 of file mlme.c.

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_put_bss ( struct cfg80211_bss bss)

cfg80211_put_bss - unref BSS struct : the BSS struct

Decrements the refcount of the given BSS struct.

Definition at line 881 of file scan.c.

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

cfg80211_ready_on_channel - notification of remain_on_channel start : wireless device : the request cookie : The current channel (from remain_on_channel request) : Channel type : Duration in milliseconds that the driver intents to remain on the channel : allocation flags

Definition at line 564 of file mlme.c.

void cfg80211_ref_bss ( struct cfg80211_bss bss)

cfg80211_ref_bss - reference BSS struct : the BSS struct to reference

Increments the refcount of the given BSS struct.

Definition at line 869 of file scan.c.

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

cfg80211_remain_on_channel_expired - remain_on_channel duration expired : wireless device : the request cookie : The current channel (from remain_on_channel request) : Channel type : allocation flags

Definition at line 577 of file mlme.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.

void cfg80211_roamed ( struct net_device dev,
struct ieee80211_channel channel,
const u8 bssid,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
gfp_t  gfp 
)

cfg80211_roamed - notify cfg80211 of roaming

: network device : the channel of the new AP : the BSSID of the new AP : association request IEs (maybe be NULL) : association request IEs length : association response IEs (may be NULL) : assoc response IEs length : allocation flags

It should be called by the underlying driver whenever it roamed from one AP to another while connected.

Definition at line 617 of file sme.c.

void cfg80211_roamed_bss ( struct net_device dev,
struct cfg80211_bss bss,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
gfp_t  gfp 
)

cfg80211_roamed_bss - notify cfg80211 of roaming

: network device : entry of bss to which STA got roamed : association request IEs (maybe be NULL) : association request IEs length : association response IEs (may be NULL) : assoc response IEs length : allocation flags

This is just a wrapper to notify cfg80211 of roaming event with driver passing bss to avoid a race in timeout of the bss entry. It should be called by the underlying driver whenever it roamed from one AP to another while connected. Drivers which have roaming implemented in firmware may use this function to avoid a race in bss entry timeout where the bss entry of the new AP is seen in the driver, but gets timed out by the time it is accessed in __cfg80211_roamed() due to delay in scheduling rdev->event_work. In case of any failures, the reference is released either in cfg80211_roamed_bss() or in __cfg80211_romed(), Otherwise, it will be released while diconneting from the current bss.

Definition at line 639 of file sme.c.

bool cfg80211_rx_mgmt ( struct wireless_dev wdev,
int  freq,
int  sig_dbm,
const u8 buf,
size_t  len,
gfp_t  gfp 
)

cfg80211_rx_mgmt - notification of received, unprocessed management frame : wireless device receiving the frame : Frequency on which the frame was received in MHz : signal strength in mBm, or 0 if unknown : Management frame (header + body) : length of the frame data : context flags

Returns true if a user space application has registered for this frame. For action frames, that makes it responsible for rejecting unrecognized action frames; false otherwise, in which case for action frames the driver is responsible for rejecting the frame.

This function is called whenever an Action frame is received for a station mode interface, but is not processed in kernel.

Definition at line 841 of file mlme.c.

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

cfg80211_rx_spurious_frame - inform userspace about a spurious frame : The device the frame matched to : the transmitter address : context flags

This function is used in AP mode (only!) to inform userspace that a spurious class 3 frame was received, to be able to deauth the sender. Returns true if the frame was passed to userspace (or this failed for a reason other than not having a subscription.)

Definition at line 992 of file mlme.c.

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

cfg80211_rx_unexpected_4addr_frame - inform about unexpected WDS frame : The device the frame matched to : the transmitter address : context flags

This function is used in AP mode (only!) to inform userspace that an associated station sent a 4addr frame but that wasn't expected. It is allowed and desirable to send this event only once for each station to avoid event flooding. Returns true if the frame was passed to userspace (or this failed for a reason other than not having a subscription.)

Definition at line 1005 of file mlme.c.

void cfg80211_scan_done ( struct cfg80211_scan_request request,
bool  aborted 
)

cfg80211_scan_done - notify that scan finished

: the corresponding scan request : set to true if the scan was aborted for any reason, userspace will be notified of that

Definition at line 90 of file scan.c.

void cfg80211_sched_scan_results ( struct wiphy wiphy)

cfg80211_sched_scan_results - notify that new scan results are available

: the wiphy which got scheduled scan results

Definition at line 116 of file scan.c.

void cfg80211_sched_scan_stopped ( struct wiphy wiphy)

cfg80211_sched_scan_stopped - notify that the scheduled scan has stopped

: the wiphy on which the scheduled scan stopped

The driver can call this function to inform cfg80211 that the scheduled scan had to be stopped, for whatever reason. The driver is then called back via the sched_scan_stop operation when done.

Definition at line 125 of file scan.c.

void cfg80211_send_assoc_timeout ( struct net_device dev,
const u8 addr 
)

cfg80211_send_assoc_timeout - notification of timed out association : network device : The MAC address of the device with which the association timed out

This function may sleep.

Definition at line 224 of file mlme.c.

void cfg80211_send_auth_timeout ( struct net_device dev,
const u8 addr 
)

cfg80211_send_auth_timeout - notification of timed out authentication : network device : The MAC address of the device with which the authentication timed out

This function may sleep.

Definition at line 206 of file mlme.c.

void cfg80211_send_deauth ( struct net_device dev,
const u8 buf,
size_t  len 
)

cfg80211_send_deauth - notification of processed deauthentication : network device : deauthentication frame (header + body) : length of the frame data

This function is called whenever deauthentication has been processed in station mode. This includes both received deauthentication frames and locally generated ones. This function may sleep.

Definition at line 129 of file mlme.c.

void cfg80211_send_disassoc ( struct net_device dev,
const u8 buf,
size_t  len 
)

cfg80211_send_disassoc - notification of processed disassociation : network device : disassociation response frame (header + body) : length of the frame data

This function is called whenever disassociation has been processed in station mode. This includes both received disassociation frames and locally generated ones. This function may sleep.

Definition at line 174 of file mlme.c.

void cfg80211_send_rx_assoc ( struct net_device dev,
struct cfg80211_bss bss,
const u8 buf,
size_t  len 
)

cfg80211_send_rx_assoc - notification of processed association : network device : the BSS struct association was requested for, the struct reference is owned by cfg80211 after this call : (re)association response frame (header + body) : length of the frame data

This function is called whenever a (re)association response has been processed in station mode. The driver is required to call either this function or cfg80211_send_assoc_timeout() to indicate the result of cfg80211_ops::assoc() call. This function may sleep.

Definition at line 34 of file mlme.c.

void cfg80211_send_rx_auth ( struct net_device dev,
const u8 buf,
size_t  len 
)

cfg80211_send_rx_auth - notification of processed authentication : network device : authentication frame (header + body) : length of the frame data

This function is called whenever an authentication has been processed in station mode. The driver is required to call either this function or cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() call. This function may sleep.

Definition at line 19 of file mlme.c.

void cfg80211_send_unprot_deauth ( struct net_device dev,
const u8 buf,
size_t  len 
)

cfg80211_send_unprot_deauth - notification of unprotected deauthentication : network device : deauthentication frame (header + body) : length of the frame data

This function is called whenever a received Deauthentication frame has been dropped in station mode because of MFP being used but the Deauthentication frame was not protected. This function may sleep.

Definition at line 184 of file mlme.c.

void cfg80211_send_unprot_disassoc ( struct net_device dev,
const u8 buf,
size_t  len 
)

cfg80211_send_unprot_disassoc - notification of unprotected disassociation : network device : disassociation frame (header + body) : length of the frame data

This function is called whenever a received Disassociation frame has been dropped in station mode because of MFP being used but the Disassociation frame was not protected. This function may sleep.

Definition at line 195 of file mlme.c.

void cfg80211_unlink_bss ( struct wiphy wiphy,
struct cfg80211_bss bss 
)

cfg80211_unlink_bss - unlink BSS from internal data structures : the wiphy : the bss to remove

This function removes the given BSS from the internal data structures thereby making it no longer show up in scan results etc. Use this function when you detect a BSS is gone. Normally BSSes will also time out, so it is not necessary to use this function at all.

Definition at line 893 of file scan.c.

void cfg80211_unregister_wdev ( struct wireless_dev wdev)

cfg80211_unregister_wdev - remove the given wdev : struct wireless_dev to remove

Call this function only for wdevs that have no netdev assigned, e.g. P2P Devices. It removes the device from the list so that it can no longer be used. It is necessary to call this function even when cfg80211 requests the removal of the interface by calling the del_virtual_intf() callback. The function must also be called when the driver wishes to unregister the wdev, e.g. when the device is unbound from the driver.

Requires the RTNL to be held.

Definition at line 756 of file core.c.

int freq_reg_info ( struct wiphy wiphy,
u32  center_freq,
u32  desired_bw_khz,
const struct ieee80211_reg_rule **  reg_rule 
)

freq_reg_info - get regulatory information for the given frequency : the wiphy for which we want to process this rule for : Frequency in KHz for which we want regulatory information for : the desired max bandwidth you want to use per channel. Note that this is still 20 MHz if you want to use HT40 as HT40 makes use of two channels for its 40 MHz width bandwidth. If set to 0 we'll assume you want the standard 20 MHz. : the regulatory rule which we have for this frequency

Use this function to get the regulatory rule for a specific frequency on a given wireless device. If the device has a specific regulatory domain it wants to follow we respect that unless a country IE has been received and processed already.

Returns 0 if it was able to find a valid regulatory rule which does apply to the given center_freq otherwise it returns non-zero. It will also return -ERANGE if we determine the given center_freq does not even have a regulatory rule for a frequency range in the center_freq's band. See freq_in_rule_band() for our current definition of a band – this is purely subjective and right now its 802.11 specific.

Definition at line 762 of file reg.c.

void ieee80211_amsdu_to_8023s ( struct sk_buff skb,
struct sk_buff_head list,
const u8 addr,
enum nl80211_iftype  iftype,
const unsigned int  extra_headroom,
bool  has_80211_header 
)

ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame

Decode an IEEE 802.11n A-MSDU frame and convert it to a list of 802.3 frames. The will be empty if the decode fails. The is consumed after the function returns.

: The input IEEE 802.11n A-MSDU frame. : The output list of 802.3 frames. It must be allocated and initialized by by the caller. : The device MAC address. : The device interface type. : The hardware extra headroom for SKBs in the . : Set it true if SKB is with IEEE 802.11 header.

Definition at line 561 of file util.c.

const u8* ieee80211_bss_get_ie ( struct cfg80211_bss bss,
u8  ie 
)

ieee80211_bss_get_ie - find IE with given ID : the bss to search : the IE ID Returns NULL if not found.

Definition at line 687 of file util.c.

int ieee80211_channel_to_frequency ( int  chan,
enum ieee80211_band  band 
)

DOC: Utility functions

cfg80211 offers a number of utility functions that can be useful. ieee80211_channel_to_frequency - convert channel number to frequency : channel number : band, necessary due to channel number overlap

Definition at line 34 of file util.c.

int ieee80211_data_from_8023 ( struct sk_buff skb,
const u8 addr,
enum nl80211_iftype  iftype,
u8 bssid,
bool  qos 
)

ieee80211_data_from_8023 - convert an 802.3 frame to 802.11 : the 802.3 frame : the device MAC address : the virtual interface type : the network bssid (used only for iftype STATION and ADHOC) : build 802.11 QoS data frame

Definition at line 445 of file util.c.

int ieee80211_data_to_8023 ( struct sk_buff skb,
const u8 addr,
enum nl80211_iftype  iftype 
)

DOC: Data path helpers

In addition to generic utilities, cfg80211 also offers functions that help implement the data path for devices that do not do the 802.11/802.3 conversion on the device. ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3 : the 802.11 data frame : the device MAC address : the virtual interface type

Definition at line 328 of file util.c.

int ieee80211_frequency_to_channel ( int  freq)

ieee80211_frequency_to_channel - convert frequency to channel number : center frequency

Definition at line 64 of file util.c.

unsigned int ieee80211_get_hdrlen_from_skb ( const struct sk_buff skb)

ieee80211_get_hdrlen_from_skb - get header length from data

Given an skb with a raw 802.11 header at the data pointer this function returns the 802.11 header length in bytes (not including encryption headers). If the data in the sk_buff is too short to contain a valid 802.11 header the function returns 0.

: the frame

Definition at line 297 of file util.c.

unsigned int ieee80211_get_mesh_hdrlen ( struct ieee80211s_hdr meshhdr)

ieee80211_get_mesh_hdrlen - get mesh extension header length : the mesh extension header, only the flags field (first byte) will be accessed Returns the length of the extension header, which is always at least 6 bytes and at most 18 if address 5 and 6 are present.

Definition at line 312 of file util.c.

struct ieee80211_rate* ieee80211_get_response_rate ( struct ieee80211_supported_band sband,
u32  basic_rates,
int  bitrate 
)
read

ieee80211_get_response_rate - get basic rate for a given rate

: the band to look for rates in : bitmap of basic rates : the bitrate for which to find the basic rate

This function returns the basic rate corresponding to a given bitrate, that is the next lower bitrate contained in the basic rate map, which is, for this function, given as a bitmap of indices of rates in the band's bitrate table.

Definition at line 16 of file util.c.

unsigned int __attribute_const__ ieee80211_hdrlen ( __le16  fc)

ieee80211_hdrlen - get header length in bytes from frame control : frame control field in little-endian format

Definition at line 262 of file util.c.

int ieee80211_radiotap_iterator_init ( struct ieee80211_radiotap_iterator iterator,
struct ieee80211_radiotap_header radiotap_header,
int  max_length,
const struct ieee80211_radiotap_vendor_namespaces vns 
)

ieee80211_radiotap_iterator_init - radiotap parser iterator initialization : radiotap_iterator to initialize : radiotap header to parse : total length we can parse into (eg, whole packet length)

Returns: 0 or a negative error code if there is a problem.

This function initializes an opaque iterator struct which can then be passed to ieee80211_radiotap_iterator_next() to visit every radiotap argument which is present in the header. It knows about extended present headers and handles them.

How to use: call __ieee80211_radiotap_iterator_init() to init a semi-opaque iterator struct ieee80211_radiotap_iterator (no need to init the struct beforehand) checking for a good 0 return code. Then loop calling __ieee80211_radiotap_iterator_next()... it returns either 0, -ENOENT if there are no more args to parse, or -EINVAL if there is a problem. The iterator's member points to the start of the argument associated with the current argument index that is present, which can be found in the iterator's member. This arg index corresponds to the IEEE80211_RADIOTAP_... defines.

Radiotap header length: You can find the CPU-endian total radiotap header length in iterator->max_length after executing ieee80211_radiotap_iterator_init() successfully.

Alignment Gotcha: You must take care when dereferencing iterator.this_arg for multibyte types... the pointer is not aligned. Use get_unaligned((type *)iterator.this_arg) to dereference iterator.this_arg for type "type" safely on all arches.

Example code: See Documentation/networking/radiotap-headers.txt

Definition at line 95 of file radiotap.c.

int ieee80211_radiotap_iterator_next ( struct ieee80211_radiotap_iterator iterator)

ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg : radiotap_iterator to move to next arg (if any)

Returns: 0 if there is an argument to handle, -ENOENT if there are no more args or -EINVAL if there is something else wrong.

This function provides the next radiotap arg index (IEEE80211_RADIOTAP_*) in and sets to point to the payload for the field. It takes care of alignment handling and extended present fields. can be changed by the caller (eg, incremented to move inside a compound argument like IEEE80211_RADIOTAP_CHANNEL). The args pointed to are in little-endian format whatever the endianess of your CPU.

Alignment Gotcha: You must take care when dereferencing iterator.this_arg for multibyte types... the pointer is not aligned. Use get_unaligned((type *)iterator.this_arg) to dereference iterator.this_arg for type "type" safely on all arches.

Definition at line 202 of file radiotap.c.

int regulatory_hint ( struct wiphy wiphy,
const char alpha2 
)

DOC: Regulatory enforcement infrastructure

TODO regulatory_hint - driver hint to the wireless core a regulatory domain : the wireless device giving the hint (used only for reporting conflicts) : the ISO/IEC 3166 alpha2 the driver claims its regulatory domain should be in. If is set this should be NULL. Note that if you set this to NULL you should still set rd->alpha2 to some accepted alpha2.

Wireless drivers can use this function to hint to the wireless core what it believes should be the current regulatory domain by giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory domain should be in or by providing a completely build regulatory domain. If the driver provides an ISO/IEC 3166 alpha2 userspace will be queried for a regulatory domain structure for the respective country.

The wiphy must have been registered to cfg80211 prior to this call. For cfg80211 drivers this means you must first use wiphy_register(), for mac80211 drivers you must first use ieee80211_register_hw().

Drivers should check the return value, its possible you can get an -ENOMEM.

Definition at line 1767 of file reg.c.

void wiphy_apply_custom_regulatory ( struct wiphy wiphy,
const struct ieee80211_regdomain regd 
)

wiphy_apply_custom_regulatory - apply a custom driver regulatory domain : the wireless device we want to process the regulatory domain on : the custom regulatory domain to use for this wiphy

Drivers can sometimes have custom regulatory domains which do not apply to a specific country. Drivers can use this to apply such custom regulatory domains. This routine must be called prior to wiphy registration. The custom regulatory domain will be trusted completely and as such previous default channel settings will be disregarded. If no rule is found for a channel on the regulatory domain the channel will be disabled.

Definition at line 1351 of file reg.c.

void wiphy_free ( struct wiphy wiphy)

wiphy_free - free wiphy

: The wiphy to free

Definition at line 707 of file core.c.

struct wiphy* wiphy_new ( const struct cfg80211_ops ops,
int  sizeof_priv 
)
read

wiphy_new - create a new wiphy for use with cfg80211

: The configuration operations for this device : The size of the private area to allocate

Create a new wiphy and associate the given operations with it. bytes are allocated for private use.

The returned pointer must be assigned to each netdev's ieee80211_ptr for proper operation.

Definition at line 283 of file core.c.

int wiphy_register ( struct wiphy wiphy)

wiphy_register - register a wiphy with cfg80211

: The wiphy to register.

Returns a non-negative wiphy index or a negative error code.

Definition at line 447 of file core.c.

void wiphy_rfkill_set_hw_state ( struct wiphy wiphy,
bool  blocked 
)

DOC: RFkill integration

RFkill integration in cfg80211 is almost invisible to drivers, as cfg80211 automatically registers an rfkill instance for each wireless device it knows about. Soft kill is also translated into disconnecting and turning all interfaces off, drivers are expected to turn off the device when all interfaces are down.

However, devices may have a hard RFkill line, in which case they also need to interact with the rfkill subsystem, via cfg80211. They can do this with a few helper functions documented here. wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state : the wiphy : block status

Definition at line 713 of file core.c.

void wiphy_rfkill_start_polling ( struct wiphy wiphy)

wiphy_rfkill_start_polling - start polling rfkill : the wiphy

Definition at line 609 of file core.c.

void wiphy_rfkill_stop_polling ( struct wiphy wiphy)

wiphy_rfkill_stop_polling - stop polling rfkill : the wiphy

Definition at line 620 of file core.c.

void wiphy_unregister ( struct wiphy wiphy)

wiphy_unregister - deregister a wiphy from cfg80211

: The wiphy to unregister.

After this call, no more requests can be made with this priv pointer, but the call may sleep to wait for an outstanding request that is being handled.

Definition at line 628 of file core.c.

Variable Documentation

const unsigned char bridge_tunnel_header ( )
Initial value:
=
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }
const unsigned char rfc1042_header[6]