iPXE
|
The iPXE 802.11 MAC layer. More...
#include <ipxe/process.h>
#include <ipxe/ieee80211.h>
#include <ipxe/iobuf.h>
#include <ipxe/netdevice.h>
#include <ipxe/rc80211.h>
Go to the source code of this file.
Data Structures | |
struct | net80211_device_operations |
Operations that must be implemented by an 802.11 driver. More... | |
struct | net80211_channel |
An 802.11 RF channel. More... | |
struct | net80211_hw_info |
Information on the capabilities of an 802.11 hardware device. More... | |
struct | net80211_frag_cache |
Structure tracking received fragments for a packet. More... | |
struct | net80211_handshaker |
Interface to an 802.11 security handshaking protocol. More... | |
struct | net80211_crypto |
Interface to an 802.11 cryptosystem. More... | |
struct | net80211_device |
Structure encapsulating the complete state of an 802.11 device. More... | |
struct | net80211_wlan |
Structure representing a probed network. More... | |
Macros | |
#define | NET80211_BAND_2GHZ 0 |
The 2.4 GHz ISM band, unlicensed in most countries. More... | |
#define | NET80211_BAND_5GHZ 1 |
The band from 4.9 GHz to 5.7 GHz, which tends to be more restricted. More... | |
#define | NET80211_NR_BANDS 2 |
Number of RF bands. More... | |
#define | NET80211_BAND_BIT_2GHZ (1 << 0) |
Bitmask for the 2GHz band. More... | |
#define | NET80211_BAND_BIT_5GHZ (1 << 1) |
Bitmask for the 5GHz band. More... | |
#define | NET80211_MODE_A (1 << 0) |
802.11a: 54 Mbps operation using OFDM signaling on the 5GHz band More... | |
#define | NET80211_MODE_B (1 << 1) |
802.11b: 1-11 Mbps operation using DSSS/CCK signaling on the 2.4GHz band More... | |
#define | NET80211_MODE_G (1 << 2) |
802.11g: 54 Mbps operation using ERP/OFDM signaling on the 2.4GHz band More... | |
#define | NET80211_MODE_N (1 << 3) |
802.11n: High-rate operation using MIMO technology on 2.4GHz or 5GHz More... | |
#define | NET80211_CFG_CHANNEL (1 << 0) |
Channel choice (dev->channel ) or regulatory parameters have changed. More... | |
#define | NET80211_CFG_RATE (1 << 1) |
Requested transmission rate (dev->rate ) has changed. More... | |
#define | NET80211_CFG_ASSOC (1 << 2) |
Association has been established with a new BSS (dev->bssid ) More... | |
#define | NET80211_CFG_PHY_PARAMS (1 << 3) |
Low-level link parameters (short preamble, protection, etc) have changed. More... | |
#define | NET80211_STATUS_MASK 0x7F |
An error code indicating the failure mode, or 0 if successful. More... | |
#define | NET80211_IS_REASON 0x80 |
Whether the error code provided is a "reason" code, not a "status" code. More... | |
#define | NET80211_PROBED (1 << 8) |
Whether we have found the network we will be associating with. More... | |
#define | NET80211_AUTHENTICATED (1 << 9) |
Whether we have successfully authenticated with the network. More... | |
#define | NET80211_ASSOCIATED (1 << 10) |
Whether we have successfully associated with the network. More... | |
#define | NET80211_CRYPTO_SYNCED (1 << 11) |
Whether we have completed security handshaking with the network. More... | |
#define | NET80211_WORKING (1 << 12) |
Whether the auto-association task is running. More... | |
#define | NET80211_WAITING (1 << 13) |
Whether the auto-association task is waiting for a reply from the AP. More... | |
#define | NET80211_NO_ASSOC (1 << 14) |
Whether the auto-association task should be suppressed. More... | |
#define | NET80211_AUTO_SSID (1 << 15) |
Whether this association was performed using a broadcast SSID. More... | |
#define | NET80211_PHY_USE_PROTECTION (1 << 1) |
Whether to use RTS/CTS or CTS-to-self protection for transmissions. More... | |
#define | NET80211_PHY_USE_SHORT_PREAMBLE (1 << 2) |
Whether to use 802.11b short preamble operation. More... | |
#define | NET80211_PHY_USE_SHORT_SLOT (1 << 3) |
Whether to use 802.11g short slot operation. More... | |
#define | NET80211_MAX_RATES 16 |
The maximum number of TX rates we allow to be configured simultaneously. More... | |
#define | NET80211_MAX_CHANNELS 40 |
The maximum number of channels we allow to be configured simultaneously. More... | |
#define | NET80211_FRAG_TIMEOUT 2 |
Seconds we'll wait to get all fragments of a packet. More... | |
#define | NET80211_NR_CONCURRENT_FRAGS 3 |
The number of fragments we can receive at once. More... | |
#define | NET80211_REG_TXPOWER 20 |
Maximum TX power to allow (dBm), if we don't get a regulatory hint. More... | |
#define | NET80211_HANDSHAKERS |
#define | __net80211_handshaker __table_entry ( NET80211_HANDSHAKERS, 01 ) |
#define | NET80211_CRYPTOS __table ( struct net80211_crypto, "net80211_cryptos" ) |
#define | __net80211_crypto __table_entry ( NET80211_CRYPTOS, 01 ) |
Enumerations | |
enum | net80211_security_proto { NET80211_SECPROT_NONE = 0, NET80211_SECPROT_PSK = 1, NET80211_SECPROT_EAP = 2, NET80211_SECPROT_UNKNOWN = 3 } |
An 802.11 security handshaking protocol. More... | |
enum | net80211_crypto_alg { NET80211_CRYPT_NONE = 0, NET80211_CRYPT_WEP = 1, NET80211_CRYPT_TKIP = 2, NET80211_CRYPT_CCMP = 3, NET80211_CRYPT_UNKNOWN = 4 } |
An 802.11 data encryption algorithm. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
const struct setting net80211_key_setting | __setting (SETTING_NETDEV_EXTRA, key) |
802.11 encryption key setting More... | |
int | net80211_prepare_probe (struct net80211_device *dev, int band, int active) |
Prepare 802.11 device channel and rate set for scanning. More... | |
struct net80211_probe_ctx * | net80211_probe_start (struct net80211_device *dev, const char *essid, int active) |
Begin probe of 802.11 networks. More... | |
int | net80211_probe_step (struct net80211_probe_ctx *ctx) |
Continue probe of 802.11 networks. More... | |
struct net80211_wlan * | net80211_probe_finish_best (struct net80211_probe_ctx *ctx) |
Finish probe of 802.11 networks, returning best-signal network found. More... | |
struct list_head * | net80211_probe_finish_all (struct net80211_probe_ctx *ctx) |
Finish probe of 802.11 networks, returning all networks found. More... | |
void | net80211_free_wlan (struct net80211_wlan *wlan) |
Free WLAN structure. More... | |
void | net80211_free_wlanlist (struct list_head *list) |
Free list of WLAN structures. More... | |
struct net80211_device * | net80211_get (struct net_device *netdev) |
Get 802.11 device from wrapping network device. More... | |
void | net80211_autoassociate (struct net80211_device *dev) |
Start 802.11 association process. More... | |
int | net80211_change_channel (struct net80211_device *dev, int channel) |
Configure 802.11 device to transmit on a certain channel. More... | |
void | net80211_set_rate_idx (struct net80211_device *dev, int rate) |
Set data transmission rate for 802.11 device. More... | |
int | net80211_keep_mgmt (struct net80211_device *dev, int enable) |
Set state of 802.11 device keeping management frames. More... | |
struct io_buffer * | net80211_mgmt_dequeue (struct net80211_device *dev, int *signal) |
Get 802.11 management frame. More... | |
int | net80211_tx_mgmt (struct net80211_device *dev, u16 fc, u8 bssid[ETH_ALEN], struct io_buffer *iob) |
int | net80211_prepare_assoc (struct net80211_device *dev, struct net80211_wlan *wlan) |
Prepare 802.11 device channel and rate set for communication. More... | |
int | net80211_send_auth (struct net80211_device *dev, struct net80211_wlan *wlan, int method) |
Send 802.11 initial authentication frame. More... | |
int | net80211_send_assoc (struct net80211_device *dev, struct net80211_wlan *wlan) |
Send 802.11 association frame. More... | |
void | net80211_deauthenticate (struct net80211_device *dev, int rc) |
Deauthenticate from current network and try again. More... | |
struct net80211_device * | net80211_alloc (size_t priv_size) |
Allocate 802.11 device. More... | |
int | net80211_register (struct net80211_device *dev, struct net80211_device_operations *ops, struct net80211_hw_info *hw) |
Register 802.11 device with network stack. More... | |
u16 | net80211_duration (struct net80211_device *dev, int bytes, u16 rate) |
Calculate one frame's contribution to 802.11 duration field. More... | |
void | net80211_rx (struct net80211_device *dev, struct io_buffer *iob, int signal, u16 rate) |
Handle receipt of 802.11 frame. More... | |
void | net80211_rx_err (struct net80211_device *dev, struct io_buffer *iob, int rc) |
Indicate an error in receiving a packet. More... | |
void | net80211_tx_complete (struct net80211_device *dev, struct io_buffer *iob, int retries, int rc) |
Indicate the completed transmission of a packet. More... | |
void | net80211_unregister (struct net80211_device *dev) |
Unregister 802.11 device from network stack. More... | |
void | net80211_free (struct net80211_device *dev) |
Free 802.11 device. More... | |
static u16 | net80211_cts_duration (struct net80211_device *dev, int size) |
Calculate duration field for a CTS control frame. More... | |
The iPXE 802.11 MAC layer.
Definition in file net80211.h.
#define NET80211_MAX_RATES 16 |
The maximum number of TX rates we allow to be configured simultaneously.
Definition at line 272 of file net80211.h.
#define NET80211_MAX_CHANNELS 40 |
The maximum number of channels we allow to be configured simultaneously.
Definition at line 275 of file net80211.h.
#define NET80211_FRAG_TIMEOUT 2 |
Seconds we'll wait to get all fragments of a packet.
Definition at line 278 of file net80211.h.
#define NET80211_NR_CONCURRENT_FRAGS 3 |
The number of fragments we can receive at once.
The 802.11 standard requires that this be at least 3.
Definition at line 284 of file net80211.h.
#define NET80211_REG_TXPOWER 20 |
Maximum TX power to allow (dBm), if we don't get a regulatory hint.
Definition at line 287 of file net80211.h.
#define NET80211_HANDSHAKERS |
Definition at line 675 of file net80211.h.
#define __net80211_handshaker __table_entry ( NET80211_HANDSHAKERS, 01 ) |
Definition at line 677 of file net80211.h.
#define NET80211_CRYPTOS __table ( struct net80211_crypto, "net80211_cryptos" ) |
Definition at line 769 of file net80211.h.
#define __net80211_crypto __table_entry ( NET80211_CRYPTOS, 01 ) |
Definition at line 770 of file net80211.h.
An 802.11 security handshaking protocol.
Definition at line 96 of file net80211.h.
enum net80211_crypto_alg |
An 802.11 data encryption algorithm.
Definition at line 129 of file net80211.h.
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
const struct setting net80211_key_setting __setting | ( | SETTING_NETDEV_EXTRA | , |
key | |||
) |
802.11 encryption key setting
|
inlinestatic |
Calculate duration field for a CTS control frame.
dev | 802.11 device |
size | Size of the packet being cleared to send |
A CTS control frame's duration field captures the frame being protected and its 10-byte ACK.
Definition at line 1179 of file net80211.h.
References net80211_duration(), net80211_device::rate, net80211_device::rates, net80211_device::rtscts_rate, and size.
Referenced by ath5k_txbuf_setup(), and rtl818x_tx().