mac80211.h
来自「linux 内核源代码」· C头文件 代码 · 共 1,410 行 · 第 1/4 页
H
1,410 行
const struct ieee80211_ops *ops);/** * ieee80211_register_hw - Register hardware device * * You must call this function before any other functions * except ieee80211_register_hwmode. * * @hw: the device to register as returned by ieee80211_alloc_hw() */int ieee80211_register_hw(struct ieee80211_hw *hw);#ifdef CONFIG_MAC80211_LEDSextern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw);extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw);extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw);#endif/** * ieee80211_get_tx_led_name - get name of TX LED * * mac80211 creates a transmit LED trigger for each wireless hardware * that can be used to drive LEDs if your driver registers a LED device. * This function returns the name (or %NULL if not configured for LEDs) * of the trigger so you can automatically link the LED device. * * @hw: the hardware to get the LED trigger name for */static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw){#ifdef CONFIG_MAC80211_LEDS return __ieee80211_get_tx_led_name(hw);#else return NULL;#endif}/** * ieee80211_get_rx_led_name - get name of RX LED * * mac80211 creates a receive LED trigger for each wireless hardware * that can be used to drive LEDs if your driver registers a LED device. * This function returns the name (or %NULL if not configured for LEDs) * of the trigger so you can automatically link the LED device. * * @hw: the hardware to get the LED trigger name for */static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw){#ifdef CONFIG_MAC80211_LEDS return __ieee80211_get_rx_led_name(hw);#else return NULL;#endif}static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw){#ifdef CONFIG_MAC80211_LEDS return __ieee80211_get_assoc_led_name(hw);#else return NULL;#endif}/* Register a new hardware PHYMODE capability to the stack. */int ieee80211_register_hwmode(struct ieee80211_hw *hw, struct ieee80211_hw_mode *mode);/** * ieee80211_unregister_hw - Unregister a hardware device * * This function instructs mac80211 to free allocated resources * and unregister netdevices from the networking subsystem. * * @hw: the hardware to unregister */void ieee80211_unregister_hw(struct ieee80211_hw *hw);/** * ieee80211_free_hw - free hardware descriptor * * This function frees everything that was allocated, including the * private data for the driver. You must call ieee80211_unregister_hw() * before calling this function * * @hw: the hardware to free */void ieee80211_free_hw(struct ieee80211_hw *hw);/* trick to avoid symbol clashes with the ieee80211 subsystem */void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_rx_status *status);/** * ieee80211_rx - receive frame * * Use this function to hand received frames to mac80211. The receive * buffer in @skb must start with an IEEE 802.11 header or a radiotap * header if %RX_FLAG_RADIOTAP is set in the @status flags. * * This function may not be called in IRQ context. * * @hw: the hardware this frame came in on * @skb: the buffer to receive, owned by mac80211 after this call * @status: status of this frame; the status pointer need not be valid * after this function returns */static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_rx_status *status){ __ieee80211_rx(hw, skb, status);}/** * ieee80211_rx_irqsafe - receive frame * * Like ieee80211_rx() but can be called in IRQ context * (internally defers to a workqueue.) * * @hw: the hardware this frame came in on * @skb: the buffer to receive, owned by mac80211 after this call * @status: status of this frame; the status pointer need not be valid * after this function returns and is not freed by mac80211, * it is recommended that it points to a stack area */void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_rx_status *status);/** * ieee80211_tx_status - transmit status callback * * Call this function for all transmitted frames after they have been * transmitted. It is permissible to not call this function for * multicast frames but this can affect statistics. * * @hw: the hardware the frame was transmitted by * @skb: the frame that was transmitted, owned by mac80211 after this call * @status: status information for this frame; the status pointer need not * be valid after this function returns and is not freed by mac80211, * it is recommended that it points to a stack area */void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_tx_status *status);void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_tx_status *status);/** * ieee80211_beacon_get - beacon generation function * @hw: pointer obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @control: will be filled with information needed to send this beacon. * * If the beacon frames are generated by the host system (i.e., not in * hardware/firmware), the low-level driver uses this function to receive * the next beacon frame from the 802.11 code. The low-level is responsible * for calling this function before beacon data is needed (e.g., based on * hardware interrupt). Returned skb is used only once and low-level driver * is responsible of freeing it. */struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, int if_id, struct ieee80211_tx_control *control);/** * ieee80211_rts_get - RTS frame generation function * @hw: pointer obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @frame: pointer to the frame that is going to be protected by the RTS. * @frame_len: the frame length (in octets). * @frame_txctl: &struct ieee80211_tx_control of the frame. * @rts: The buffer where to store the RTS frame. * * If the RTS frames are generated by the host system (i.e., not in * hardware/firmware), the low-level driver uses this function to receive * the next RTS frame from the 802.11 code. The low-level is responsible * for calling this function before and RTS frame is needed. */void ieee80211_rts_get(struct ieee80211_hw *hw, int if_id, const void *frame, size_t frame_len, const struct ieee80211_tx_control *frame_txctl, struct ieee80211_rts *rts);/** * ieee80211_rts_duration - Get the duration field for an RTS frame * @hw: pointer obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @frame_len: the length of the frame that is going to be protected by the RTS. * @frame_txctl: &struct ieee80211_tx_control of the frame. * * If the RTS is generated in firmware, but the host system must provide * the duration field, the low-level driver uses this function to receive * the duration field value in little-endian byteorder. */__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, int if_id, size_t frame_len, const struct ieee80211_tx_control *frame_txctl);/** * ieee80211_ctstoself_get - CTS-to-self frame generation function * @hw: pointer obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @frame: pointer to the frame that is going to be protected by the CTS-to-self. * @frame_len: the frame length (in octets). * @frame_txctl: &struct ieee80211_tx_control of the frame. * @cts: The buffer where to store the CTS-to-self frame. * * If the CTS-to-self frames are generated by the host system (i.e., not in * hardware/firmware), the low-level driver uses this function to receive * the next CTS-to-self frame from the 802.11 code. The low-level is responsible * for calling this function before and CTS-to-self frame is needed. */void ieee80211_ctstoself_get(struct ieee80211_hw *hw, int if_id, const void *frame, size_t frame_len, const struct ieee80211_tx_control *frame_txctl, struct ieee80211_cts *cts);/** * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame * @hw: pointer obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. * @frame_txctl: &struct ieee80211_tx_control of the frame. * * If the CTS-to-self is generated in firmware, but the host system must provide * the duration field, the low-level driver uses this function to receive * the duration field value in little-endian byteorder. */__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, int if_id, size_t frame_len, const struct ieee80211_tx_control *frame_txctl);/** * ieee80211_generic_frame_duration - Calculate the duration field for a frame * @hw: pointer obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @frame_len: the length of the frame. * @rate: the rate (in 100kbps) at which the frame is going to be transmitted. * * Calculate the duration field of some generic frame, given its * length and transmission rate (in 100kbps). */__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, int if_id, size_t frame_len, int rate);/** * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames * @hw: pointer as obtained from ieee80211_alloc_hw(). * @if_id: interface ID from &struct ieee80211_if_init_conf. * @control: will be filled with information needed to send returned frame. * * Function for accessing buffered broadcast and multicast frames. If * hardware/firmware does not implement buffering of broadcast/multicast * frames when power saving is used, 802.11 code buffers them in the host * memory. The low-level driver uses this function to fetch next buffered * frame. In most cases, this is used when generating beacon frame. This * function returns a pointer to the next buffered skb or NULL if no more * buffered frames are available. * * Note: buffered frames are returned only after DTIM beacon frame was * generated with ieee80211_beacon_get() and the low-level driver must thus * call ieee80211_beacon_get() first. ieee80211_get_buffered_bc() returns * NULL if the previous generated beacon was not DTIM, so the low-level driver * does not need to check for DTIM beacons separately and should be able to * use common code for all beacons. */struct sk_buff *ieee80211_get_buffered_bc(struct ieee80211_hw *hw, int if_id, struct ieee80211_tx_control *control);/** * 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. * * @skb: the frame */int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);/** * ieee80211_get_hdrlen - get header length from frame control * * This function returns the 802.11 header length in bytes (not including * encryption headers.) * * @fc: the frame control field (in CPU endianness) */int ieee80211_get_hdrlen(u16 fc);/** * ieee80211_wake_queue - wake specific queue * @hw: pointer as obtained from ieee80211_alloc_hw(). * @queue: queue number (counted from zero). * * Drivers should use this function instead of netif_wake_queue. */void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue);/** * ieee80211_stop_queue - stop specific queue * @hw: pointer as obtained from ieee80211_alloc_hw(). * @queue: queue number (counted from zero). * * Drivers should use this function instead of netif_stop_queue. */void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);/** * ieee80211_start_queues - start all queues * @hw: pointer to as obtained from ieee80211_alloc_hw(). * * Drivers should use this function instead of netif_start_queue. */void ieee80211_start_queues(struct ieee80211_hw *hw);/** * ieee80211_stop_queues - stop all queues * @hw: pointer as obtained from ieee80211_alloc_hw(). * * Drivers should use this function instead of netif_stop_queue. */void ieee80211_stop_queues(struct ieee80211_hw *hw);/** * ieee80211_wake_queues - wake all queues * @hw: pointer as obtained from ieee80211_alloc_hw(). * * Drivers should use this function instead of netif_wake_queue. */void ieee80211_wake_queues(struct ieee80211_hw *hw);/** * ieee80211_scan_completed - completed hardware scan * * When hardware scan offload is used (i.e. the hw_scan() callback is * assigned) this function needs to be called by the driver to notify * mac80211 that the scan finished. * * @hw: the hardware that finished the scan */void ieee80211_scan_completed(struct ieee80211_hw *hw);#endif /* MAC80211_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?