Linux Kernel
3.7.1
|
#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.
Variables | |
const unsigned char | rfc1042_header [6] |
const unsigned char | bridge_tunnel_header [6] |
#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.
Definition at line 3605 of file cfg80211.h.
Definition at line 3607 of file cfg80211.h.
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.
Definition at line 3603 of file cfg80211.h.
Definition at line 3609 of file cfg80211.h.
Definition at line 3615 of file cfg80211.h.
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.
Definition at line 3627 of file cfg80211.h.
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.
enum bss_param_flags |
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
Definition at line 620 of file cfg80211.h.
enum cfg80211_assoc_req_flags - Over-ride default behaviour in association.
: Disable HT (802.11n)
Definition at line 1170 of file cfg80211.h.
enum cfg80211_signal_type |
enum cfg80211_signal_type - signal type
: no signal strength information available : signal strength in mBm (100*dBm) : signal strength, increasing from 0 through 100
Definition at line 1083 of file cfg80211.h.
enum ieee80211_band |
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
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.
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 |
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.
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 |
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
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 |
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
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_actions |
enum plink_action - actions to perform in mesh peers
: action 0 is reserved : start mesh peer link establishment : block traffic from this mesh peer
Definition at line 466 of file cfg80211.h.
enum rate_info_flags |
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
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 |
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
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.
Definition at line 479 of file cfg80211.h.
enum survey_info_flags |
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().
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 |
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.
Definition at line 1911 of file cfg80211.h.
enum wiphy_params_flags |
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
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
Definition at line 2033 of file cfg80211.h.
__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.
__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.
|
read |
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 | ||
) |
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
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.
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
void cfg80211_cqm_rssi_notify | ( | struct net_device * | dev, |
enum nl80211_cqm_rssi_threshold_event | rssi_event, | ||
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 | ||
) |
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.
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.
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.
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.
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.
|
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()!
|
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()!
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.
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.
void cfg80211_new_sta | ( | struct net_device * | dev, |
const u8 * | mac_addr, | ||
struct station_info * | sinfo, | ||
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 | ||
) |
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.
void cfg80211_put_bss | ( | struct cfg80211_bss * | bss | ) |
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_ref_bss | ( | struct cfg80211_bss * | bss | ) |
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_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.
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.
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.
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.
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.)
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.)
void cfg80211_scan_done | ( | struct cfg80211_scan_request * | request, |
bool | aborted | ||
) |
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.
void cfg80211_send_assoc_timeout | ( | struct net_device * | dev, |
const u8 * | addr | ||
) |
void cfg80211_send_auth_timeout | ( | struct net_device * | dev, |
const u8 * | addr | ||
) |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
const u8* ieee80211_bss_get_ie | ( | struct cfg80211_bss * | bss, |
u8 | ie | ||
) |
int ieee80211_channel_to_frequency | ( | int | chan, |
enum ieee80211_band | band | ||
) |
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
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
unsigned int ieee80211_get_mesh_hdrlen | ( | struct ieee80211s_hdr * | meshhdr | ) |
|
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.
unsigned int __attribute_const__ ieee80211_hdrlen | ( | __le16 | fc | ) |
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.
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.
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.
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.
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