iPXE
|
Functions | |
static void | net80211_add_channels (struct net80211_device *dev, int start, int len, int txpower) |
Add channels to 802.11 device. More... | |
static void | net80211_filter_hw_channels (struct net80211_device *dev) |
Filter 802.11 device channels for hardware capabilities. More... | |
static void | net80211_set_rtscts_rate (struct net80211_device *dev) |
Pick TX rate for RTS/CTS packets based on data rate. More... | |
static int | net80211_process_capab (struct net80211_device *dev, u16 capab) |
Update 802.11 device state to reflect received capabilities field. More... | |
static int | net80211_process_ie (struct net80211_device *dev, union ieee80211_ie *ie, void *ie_end) |
Update 802.11 device state to reflect received information elements. More... | |
static union ieee80211_ie * | net80211_marshal_request_info (struct net80211_device *dev, union ieee80211_ie *ie) |
Create information elements for outgoing probe or association packet. More... | |
|
static |
Add channels to 802.11 device.
dev | 802.11 device |
start | First channel number to add |
len | Number of channels to add |
txpower | TX power (dBm) to allow on added channels |
To replace the current list of channels instead of adding to it, set the nr_channels field of the 802.11 device to 0 before calling this function.
Definition at line 917 of file net80211.c.
References net_device::dev, len, NET80211_BAND_2GHZ, NET80211_BAND_5GHZ, NET80211_MAX_CHANNELS, and start.
Referenced by net80211_prepare_probe(), and net80211_process_ie().
|
static |
Filter 802.11 device channels for hardware capabilities.
dev | 802.11 device |
Hardware may support fewer channels than regulatory restrictions allow; this function filters out channels in dev->channels that are not supported by the hardware list in dev->hwinfo. It also copies over the net80211_channel::hw_value and limits maximum TX power appropriately.
Channels are matched based on center frequency, ignoring band and channel number.
If the driver specifies no supported channels, the effect will be as though all were supported.
Definition at line 961 of file net80211.c.
References net80211_channel::center_freq, net80211_device::channel, channels, net80211_hw_info::channels, net80211_device::channels, net80211_device_operations::config, net_device::dev, net80211_device::hw, net80211_channel::hw_value, net80211_channel::maxpower, NET80211_CFG_CHANNEL, net80211_hw_info::nr_channels, net80211_device::nr_channels, ok, and net80211_device::op.
Referenced by net80211_prepare_probe(), and net80211_process_ie().
|
static |
Pick TX rate for RTS/CTS packets based on data rate.
dev | 802.11 device |
The RTS/CTS rate is the fastest TX rate marked as "basic" that is not faster than the data rate.
Definition at line 1967 of file net80211.c.
References net80211_device::basic_rates, net80211_device::nr_rates, net80211_device::rate, net80211_device::rates, and net80211_device::rtscts_rate.
Referenced by net80211_process_ie(), and net80211_set_rate_idx().
|
static |
Update 802.11 device state to reflect received capabilities field.
dev | 802.11 device |
capab | Capabilities field in beacon, probe, or association frame |
rc | Return status code |
Definition at line 1010 of file net80211.c.
References net80211_device_operations::config, DBGC, ENOSYS, IEEE80211_CAPAB_ADHOC, IEEE80211_CAPAB_MANAGED, IEEE80211_CAPAB_SHORT_PMBL, IEEE80211_CAPAB_SHORT_SLOT, NET80211_CFG_PHY_PARAMS, NET80211_PHY_USE_SHORT_PREAMBLE, NET80211_PHY_USE_SHORT_SLOT, net80211_device::op, and net80211_device::phy_flags.
Referenced by net80211_handle_assoc_reply(), and net80211_prepare_assoc().
|
static |
Update 802.11 device state to reflect received information elements.
dev | 802.11 device |
ie | Pointer to first information element |
ie_end | Pointer to tail of packet I/O buffer |
rc | Return status code |
Definition at line 1044 of file net80211.c.
References net80211_channel::band, ieee80211_ie_country_triplet::band, net80211_device::basic_rates, net80211_device::channel, net80211_channel::channel_nr, net80211_device::channels, net80211_device_operations::config, ieee80211_ie::country, ieee80211_ie_ds_param::current_channel, DBGC, ieee80211_ie::ds_param, ieee80211_ie::erp_info, net80211_device::essid, ieee80211_ie_country_triplet::first, ieee80211_ie_country_band_triplet::first_channel, net80211_hw_info::flags, net80211_device::hw, ieee80211_ie::id, IEEE80211_ERP_BARKER_LONG, IEEE80211_ERP_USE_PROTECTION, ieee80211_ie_bound(), IEEE80211_IE_COUNTRY, IEEE80211_IE_DS_PARAM, IEEE80211_IE_ERP_INFO, IEEE80211_IE_EXT_RATES, IEEE80211_IE_RATES, IEEE80211_IE_SSID, ieee80211_next_ie(), ieee80211_ie::len, ieee80211_ie_country_band_triplet::max_txpower, memcpy(), ieee80211_ie_country::name, net80211_add_channels(), NET80211_CFG_PHY_PARAMS, NET80211_CFG_RATE, net80211_change_channel(), net80211_filter_hw_channels(), NET80211_MAX_RATES, NET80211_PHY_USE_PROTECTION, NET80211_PHY_USE_SHORT_PREAMBLE, NET80211_PHY_USE_SHORT_SLOT, net80211_set_rtscts_rate(), ieee80211_ie_country_band_triplet::nr_channels, net80211_device::nr_channels, net80211_hw_info::nr_rates, net80211_device::nr_rates, ok, net80211_device::op, net80211_device::phy_flags, net80211_device::rate, net80211_hw_info::rates, net80211_device::rates, ieee80211_ie::rates, ieee80211_ie::ssid, tmp, and ieee80211_ie_country::triplet.
Referenced by net80211_handle_assoc_reply(), and net80211_prepare_assoc().
|
static |
Create information elements for outgoing probe or association packet.
dev | 802.11 device |
ie | Pointer to start of information element area |
next_ie | Pointer to first byte after added information elements |
Definition at line 1202 of file net80211.c.
References net80211_device::basic_rates, net80211_device::essid, ieee80211_ie::id, IEEE80211_IE_EXT_RATES, IEEE80211_IE_RATES, IEEE80211_IE_RSN, IEEE80211_IE_SSID, IEEE80211_IE_VENDOR, ieee80211_next_ie(), ieee80211_ie::len, memcpy(), net80211_device::nr_rates, NULL, net80211_device::rates, ieee80211_ie::rates, net80211_device::rsn_ie, ieee80211_ie::ssid, and strlen().
Referenced by net80211_probe_start(), and net80211_send_assoc().