mac80211.h

来自「linux 内核源代码」· C头文件 代码 · 共 1,410 行 · 第 1/4 页

H
1,410
字号
};/** * enum ieee80211_tx_status_flags - transmit status flags * * Status flags to indicate various transmit conditions. * * @IEEE80211_TX_STATUS_TX_FILTERED: The frame was not transmitted *	because the destination STA was in powersave mode. * * @IEEE80211_TX_STATUS_ACK: Frame was acknowledged */enum ieee80211_tx_status_flags {	IEEE80211_TX_STATUS_TX_FILTERED	= 1<<0,	IEEE80211_TX_STATUS_ACK		= 1<<1,};/** * struct ieee80211_tx_status - transmit status * * As much information as possible should be provided for each transmitted * frame with ieee80211_tx_status(). * * @control: a copy of the &struct ieee80211_tx_control passed to the driver *	in the tx() callback. * * @flags: transmit status flags, defined above * * @ack_signal: signal strength of the ACK frame * * @excessive_retries: set to 1 if the frame was retried many times *	but not acknowledged * * @retry_count: number of retries * * @queue_length: ?? REMOVE * @queue_number: ?? REMOVE */struct ieee80211_tx_status {	struct ieee80211_tx_control control;	u8 flags;	bool excessive_retries;	u8 retry_count;	int ack_signal;	int queue_length;	int queue_number;};/** * enum ieee80211_conf_flags - configuration flags * * Flags to define PHY configuration options * * @IEEE80211_CONF_SHORT_SLOT_TIME: use 802.11g short slot time * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) * */enum ieee80211_conf_flags {	IEEE80211_CONF_SHORT_SLOT_TIME	= 1<<0,	IEEE80211_CONF_RADIOTAP		= 1<<1,};/** * struct ieee80211_conf - configuration of the device * * This struct indicates how the driver shall configure the hardware. * * @radio_enabled: when zero, driver is required to switch off the radio. *	TODO make a flag * @channel: IEEE 802.11 channel number * @freq: frequency in MHz * @channel_val: hardware specific channel value for the channel * @phymode: PHY mode to activate (REMOVE) * @chan: channel to switch to, pointer to the channel information * @mode: pointer to mode definition * @regulatory_domain: ?? * @beacon_int: beacon interval (TODO make interface config) * @flags: configuration flags defined above * @power_level: transmit power limit for current regulatory domain in dBm * @antenna_max: maximum antenna gain * @antenna_sel_tx: transmit antenna selection, 0: default/diversity, *	1/2: antenna 0/1 * @antenna_sel_rx: receive antenna selection, like @antenna_sel_tx */struct ieee80211_conf {	int channel;			/* IEEE 802.11 channel number */	int freq;			/* MHz */	int channel_val;		/* hw specific value for the channel */	enum ieee80211_phymode phymode;	struct ieee80211_channel *chan;	struct ieee80211_hw_mode *mode;	unsigned int regulatory_domain;	int radio_enabled;	int beacon_int;	u32 flags;	u8 power_level;	u8 antenna_max;	u8 antenna_sel_tx;	u8 antenna_sel_rx;};/** * enum ieee80211_if_types - types of 802.11 network interfaces * * @IEEE80211_IF_TYPE_INVALID: invalid interface type, not used *	by mac80211 itself * @IEEE80211_IF_TYPE_AP: interface in AP mode. * @IEEE80211_IF_TYPE_MGMT: special interface for communication with hostap *	daemon. Drivers should never see this type. * @IEEE80211_IF_TYPE_STA: interface in STA (client) mode. * @IEEE80211_IF_TYPE_IBSS: interface in IBSS (ad-hoc) mode. * @IEEE80211_IF_TYPE_MNTR: interface in monitor (rfmon) mode. * @IEEE80211_IF_TYPE_WDS: interface in WDS mode. * @IEEE80211_IF_TYPE_VLAN: VLAN interface bound to an AP, drivers *	will never see this type. */enum ieee80211_if_types {	IEEE80211_IF_TYPE_INVALID,	IEEE80211_IF_TYPE_AP,	IEEE80211_IF_TYPE_STA,	IEEE80211_IF_TYPE_IBSS,	IEEE80211_IF_TYPE_MNTR,	IEEE80211_IF_TYPE_WDS,	IEEE80211_IF_TYPE_VLAN,};/** * struct ieee80211_if_init_conf - initial configuration of an interface * * @if_id: internal interface ID. This number has no particular meaning to *	drivers and the only allowed usage is to pass it to *	ieee80211_beacon_get() and ieee80211_get_buffered_bc() functions. *	This field is not valid for monitor interfaces *	(interfaces of %IEEE80211_IF_TYPE_MNTR type). * @type: one of &enum ieee80211_if_types constants. Determines the type of *	added/removed interface. * @mac_addr: pointer to MAC address of the interface. This pointer is valid *	until the interface is removed (i.e. it cannot be used after *	remove_interface() callback was called for this interface). * * This structure is used in add_interface() and remove_interface() * callbacks of &struct ieee80211_hw. * * When you allow multiple interfaces to be added to your PHY, take care * that the hardware can actually handle multiple MAC addresses. However, * also take care that when there's no interface left with mac_addr != %NULL * you remove the MAC address from the device to avoid acknowledging packets * in pure monitor mode. */struct ieee80211_if_init_conf {	int if_id;	enum ieee80211_if_types type;	void *mac_addr;};/** * struct ieee80211_if_conf - configuration of an interface * * @type: type of the interface. This is always the same as was specified in *	&struct ieee80211_if_init_conf. The type of an interface never changes *	during the life of the interface; this field is present only for *	convenience. * @bssid: BSSID of the network we are associated to/creating. * @ssid: used (together with @ssid_len) by drivers for hardware that *	generate beacons independently. The pointer is valid only during the *	config_interface() call, so copy the value somewhere if you need *	it. * @ssid_len: length of the @ssid field. * @beacon: beacon template. Valid only if @host_gen_beacon_template in *	&struct ieee80211_hw is set. The driver is responsible of freeing *	the sk_buff. * @beacon_control: tx_control for the beacon template, this field is only *	valid when the @beacon field was set. * * This structure is passed to the config_interface() callback of * &struct ieee80211_hw. */struct ieee80211_if_conf {	int type;	u8 *bssid;	u8 *ssid;	size_t ssid_len;	struct sk_buff *beacon;	struct ieee80211_tx_control *beacon_control;};/** * enum ieee80211_key_alg - key algorithm * @ALG_WEP: WEP40 or WEP104 * @ALG_TKIP: TKIP * @ALG_CCMP: CCMP (AES) */enum ieee80211_key_alg {	ALG_WEP,	ALG_TKIP,	ALG_CCMP,};/** * enum ieee80211_key_flags - key flags * * These flags are used for communication about keys between the driver * and mac80211, with the @flags parameter of &struct ieee80211_key_conf. * * @IEEE80211_KEY_FLAG_WMM_STA: Set by mac80211, this flag indicates *	that the STA this key will be used with could be using QoS. * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the *	driver to indicate that it requires IV generation for this *	particular key. * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by *	the driver for a TKIP key if it requires Michael MIC *	generation in software. */enum ieee80211_key_flags {	IEEE80211_KEY_FLAG_WMM_STA	= 1<<0,	IEEE80211_KEY_FLAG_GENERATE_IV	= 1<<1,	IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,};/** * struct ieee80211_key_conf - key information * * This key information is given by mac80211 to the driver by * the set_key() callback in &struct ieee80211_ops. * * @hw_key_idx: To be set by the driver, this is the key index the driver *	wants to be given when a frame is transmitted and needs to be *	encrypted in hardware. * @alg: The key algorithm. * @flags: key flags, see &enum ieee80211_key_flags. * @keyidx: the key index (0-3) * @keylen: key material length * @key: key material */struct ieee80211_key_conf {	enum ieee80211_key_alg alg;	u8 hw_key_idx;	u8 flags;	s8 keyidx;	u8 keylen;	u8 key[0];};#define IEEE80211_SEQ_COUNTER_RX	0#define IEEE80211_SEQ_COUNTER_TX	1/** * enum set_key_cmd - key command * * Used with the set_key() callback in &struct ieee80211_ops, this * indicates whether a key is being removed or added. * * @SET_KEY: a key is set * @DISABLE_KEY: a key must be disabled */enum set_key_cmd {	SET_KEY, DISABLE_KEY,};/** * enum sta_notify_cmd - sta notify command * * Used with the sta_notify() callback in &struct ieee80211_ops, this * indicates addition and removal of a station to station table * * @STA_NOTIFY_ADD: a station was added to the station table * @STA_NOTIFY_REMOVE: a station being removed from the station table */enum sta_notify_cmd {	STA_NOTIFY_ADD, STA_NOTIFY_REMOVE};/** * enum ieee80211_hw_flags - hardware flags * * These flags are used to indicate hardware capabilities to * the stack. Generally, flags here should have their meaning * done in a way that the simplest hardware doesn't need setting * any particular flags. There are some exceptions to this rule, * however, so you are advised to review these flags carefully. * * @IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE: *	The device only needs to be supplied with a beacon template. *	If you need the host to generate each beacon then don't use *	this flag and call ieee80211_beacon_get() when you need the *	next beacon frame. Note that if you set this flag, you must *	implement the set_tim() callback for powersave mode to work *	properly. *	This flag is only relevant for access-point mode. * * @IEEE80211_HW_RX_INCLUDES_FCS: *	Indicates that received frames passed to the stack include *	the FCS at the end. * * @IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING: *	Some wireless LAN chipsets buffer broadcast/multicast frames *	for power saving stations in the hardware/firmware and others *	rely on the host system for such buffering. This option is used *	to configure the IEEE 802.11 upper layer to buffer broadcast and *	multicast frames when there are power saving stations so that *	the driver can fetch them with ieee80211_get_buffered_bc(). Note *	that not setting this flag works properly only when the *	%IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because *	otherwise the stack will not know when the DTIM beacon was sent. * * @IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED: *	Channels are already configured to the default regulatory domain *	specified in the device's EEPROM */enum ieee80211_hw_flags {	IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE		= 1<<0,	IEEE80211_HW_RX_INCLUDES_FCS			= 1<<1,	IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING	= 1<<2,	IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED	= 1<<3,};/** * struct ieee80211_hw - hardware information and state * * This structure contains the configuration and hardware * information for an 802.11 PHY. * * @wiphy: This points to the &struct wiphy allocated for this *	802.11 PHY. You must fill in the @perm_addr and @dev *	members of this structure using SET_IEEE80211_DEV() *	and SET_IEEE80211_PERM_ADDR(). * * @conf: &struct ieee80211_conf, device configuration, don't use. * * @workqueue: single threaded workqueue available for driver use, *	allocated by mac80211 on registration and flushed on *	unregistration. * * @priv: pointer to private area that was allocated for driver use *	along with this structure. * * @flags: hardware flags, see &enum ieee80211_hw_flags. * * @extra_tx_headroom: headroom to reserve in each transmit skb *	for use by the driver (e.g. for transmit headers.) * * @channel_change_time: time (in microseconds) it takes to change channels. * * @max_rssi: Maximum value for ssi in RX information, use *	negative numbers for dBm and 0 to indicate no support. * * @max_signal: like @max_rssi, but for the signal value. * * @max_noise: like @max_rssi, but for the noise value. *

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?