Logo Search packages:      
Sourcecode: linux version File versions  Download package

ieee80211_ops Struct Reference

#include <mac80211.h>

List of all members.

Detailed Description

struct ieee80211_ops - callbacks from mac80211 to the driver

This structure contains various callbacks that the driver may handle or, in some cases, must handle, for example to configure the hardware to a new channel or to transmit a frame.

: Handler that 802.11 module calls for each transmitted frame. skb contains the buffer starting from the IEEE 802.11 header. The low-level driver should send the frame out based on configuration in the TX control data. Must be implemented and atomic.

: Called before the first netdevice attached to the hardware is enabled. This should turn on the hardware and must turn on frame reception (for possibly enabled monitor interfaces.) Returns negative error codes, these may be seen in userspace, or zero. When the device is started it should not have a MAC address to avoid acknowledging frames before a non-monitor device is added. Must be implemented.

: Called after last netdevice attached to the hardware is disabled. This should turn off the hardware (at least it must turn off frame reception.) May be called right after add_interface if that rejects an interface. Must be implemented.

: Called when a netdevice attached to the hardware is enabled. Because it is not called for monitor mode devices, and must be implemented. The driver should perform any initialization it needs before the device can be enabled. The initial configuration for the interface is given in the conf parameter. The callback may refuse to add an interface by returning a negative error code (which will be seen in userspace.) Must be implemented.

: Notifies a driver that an interface is going down. The callback is called after this if it is the last interface and no monitor interfaces are present. When all interfaces are removed, the MAC address in the hardware must be cleared so the device no longer acknowledges packets, the mac_addr member of the conf structure is, however, set to the MAC address of the device going away. Hence, this callback must be implemented.

: Handler for configuration requests. IEEE 802.11 code calls this function to change hardware configuration, e.g., channel.

: Handler for configuration requests related to interfaces (e.g. BSSID changes.)

: Configure the device's RX filter. See the section "Frame filtering" for more information. This callback must be implemented and atomic.

: Set TIM bit. If the hardware/firmware takes care of beacon generation (that is, IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set) mac80211 calls this function when a TIM bit must be set or cleared for a given AID. Must be atomic.

: See the section "Hardware crypto acceleration" This callback can sleep, and is only called between add_interface and remove_interface calls, i.e. while the interface with the given local_address is enabled.

: Ask the hardware to service the scan request, no need to start the scan state machine in stack.

: return low-level statistics

: For devices that have internal sequence counters this callback allows mac80211 to access the current value of a counter. This callback seems not well-defined, tell us if you need it.

: Configuration of RTS threshold (if device needs it)

: Configuration of fragmentation threshold. Assign this if the device does fragmentation by itself; if this method is assigned then the stack will not do fragmentation.

: Configuration of retry limits (if device needs it)

: Notifies low level driver about addition or removal of assocaited station or AP.

: Handle ERP IE change notifications. Must be atomic.

: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), bursting) for a hardware TX queue. The parameter uses the IEEE80211_TX_QUEUE_* constants. Must be atomic.

: Get statistics of the current TX queue status. This is used to get number of currently queued packets (queue length), maximum queue size (limit), and total number of packets sent using each TX queue (count). This information is used for WMM to find out which TX queues have room for more packets and by hostapd to provide statistics about the current queueing state to external programs.

: Get the current TSF timer value from firmware/hardware. Currently, this is only used for IBSS mode debugging and, as such, is not a required function. Must be atomic.

: Reset the TSF timer and allow firmware/hardware to synchronize with other STAs in the IBSS. This is only used in IBSS mode. This function is optional if the firmware/hardware takes full care of TSF synchronization.

: Setup beacon data for IBSS beacons. Unlike access point, IBSS uses a fixed beacon frame which is configured using this function. If the driver returns success (0) from this callback, it owns the skb. That means the driver is responsible to kfree_skb() it. The control structure is not dynamically allocated. That means the driver does not own the pointer and if it needs it somewhere outside of the context of this function, it must copy it somewhere else. This handler is required only for IBSS mode.

: Determine whether the last IBSS beacon was sent by us. This is needed only for IBSS mode and the result of this function is used to determine whether to reply to Probe Requests.

Definition at line 1001 of file mac80211.h.

Public Attributes

int(* add_interface )(struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf)
int(* beacon_update )(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_tx_control *control)
int(* conf_tx )(struct ieee80211_hw *hw, int queue, const struct ieee80211_tx_queue_params *params)
int(* config )(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
int(* config_interface )(struct ieee80211_hw *hw, int if_id, struct ieee80211_if_conf *conf)
void(* configure_filter )(struct ieee80211_hw *hw, unsigned int changed_flags, unsigned int *total_flags, int mc_count, struct dev_addr_list *mc_list)
void(* erp_ie_changed )(struct ieee80211_hw *hw, u8 changes, int cts_protection, int preamble)
int(* get_sequence_counter )(struct ieee80211_hw *hw, u8 *addr, u8 keyidx, u8 txrx, u32 *iv32, u16 *iv16)
int(* get_stats )(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats)
u64(* get_tsf )(struct ieee80211_hw *hw)
int(* get_tx_stats )(struct ieee80211_hw *hw, struct ieee80211_tx_queue_stats *stats)
int(* hw_scan )(struct ieee80211_hw *hw, u8 *ssid, size_t len)
void(* remove_interface )(struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf)
void(* reset_tsf )(struct ieee80211_hw *hw)
int(* set_frag_threshold )(struct ieee80211_hw *hw, u32 value)
int(* set_key )(struct ieee80211_hw *hw, enum set_key_cmd cmd, const u8 *local_address, const u8 *address, struct ieee80211_key_conf *key)
int(* set_retry_limit )(struct ieee80211_hw *hw, u32 short_retry, u32 long_retr)
int(* set_rts_threshold )(struct ieee80211_hw *hw, u32 value)
int(* set_tim )(struct ieee80211_hw *hw, int aid, int set)
void(* sta_notify )(struct ieee80211_hw *hw, int if_id, enum sta_notify_cmd, const u8 *addr)
int(* start )(struct ieee80211_hw *hw)
void(* stop )(struct ieee80211_hw *hw)
int(* tx )(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_tx_control *control)
int(* tx_last_beacon )(struct ieee80211_hw *hw)

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index