Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
tx.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/bitmap.h>
#include <linux/rcupdate.h>
#include <linux/export.h>
#include <net/net_namespace.h>
#include <net/ieee80211_radiotap.h>
#include <net/cfg80211.h>
#include <net/mac80211.h>
#include <asm/unaligned.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "led.h"
#include "mesh.h"
#include "wep.h"
#include "wpa.h"
#include "wme.h"
#include "rate.h"

Go to the source code of this file.

Macros

#define CALL_TXH(txh)
 

Functions

void ieee80211_xmit (struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
 
netdev_tx_t ieee80211_monitor_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
netdev_tx_t ieee80211_subif_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
void ieee80211_clear_tx_pending (struct ieee80211_local *local)
 
void ieee80211_tx_pending (unsigned long data)
 
struct sk_buffieee80211_beacon_get_tim (struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 *tim_offset, u16 *tim_length)
 
 EXPORT_SYMBOL (ieee80211_beacon_get_tim)
 
struct sk_buffieee80211_proberesp_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_proberesp_get)
 
struct sk_buffieee80211_pspoll_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_pspoll_get)
 
struct sk_buffieee80211_nullfunc_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_nullfunc_get)
 
struct sk_buffieee80211_probereq_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif, const u8 *ssid, size_t ssid_len, const u8 *ie, size_t ie_len)
 
 EXPORT_SYMBOL (ieee80211_probereq_get)
 
void ieee80211_rts_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif, const void *frame, size_t frame_len, const struct ieee80211_tx_info *frame_txctl, struct ieee80211_rts *rts)
 
 EXPORT_SYMBOL (ieee80211_rts_get)
 
void ieee80211_ctstoself_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif, const void *frame, size_t frame_len, const struct ieee80211_tx_info *frame_txctl, struct ieee80211_cts *cts)
 
 EXPORT_SYMBOL (ieee80211_ctstoself_get)
 
struct sk_buffieee80211_get_buffered_bc (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_get_buffered_bc)
 
void ieee80211_tx_skb_tid (struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, int tid)
 

Macro Definition Documentation

#define CALL_TXH (   txh)
Value:
do { \
res = txh(tx); \
if (res != TX_CONTINUE) \
goto txh_done; \
} while (0)

Function Documentation

EXPORT_SYMBOL ( ieee80211_beacon_get_tim  )
EXPORT_SYMBOL ( ieee80211_proberesp_get  )
EXPORT_SYMBOL ( ieee80211_pspoll_get  )
EXPORT_SYMBOL ( ieee80211_nullfunc_get  )
EXPORT_SYMBOL ( ieee80211_probereq_get  )
EXPORT_SYMBOL ( ieee80211_rts_get  )
EXPORT_SYMBOL ( ieee80211_ctstoself_get  )
EXPORT_SYMBOL ( ieee80211_get_buffered_bc  )
struct sk_buff* ieee80211_beacon_get_tim ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
u16 tim_offset,
u16 tim_length 
)
read

ieee80211_beacon_get_tim - beacon generation function : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback. : pointer to variable that will receive the TIM IE offset. Set to 0 if invalid (in non-AP modes). : pointer to variable that will receive the TIM IE length, (including the ID and length bytes!). Set to 0 if invalid (in non-AP modes).

If the driver implements beaconing modes, it must use this function to obtain the beacon frame/template.

If the beacon frames are generated by the host system (i.e., not in hardware/firmware), the driver uses this function to get each beacon frame from mac80211 – it is responsible for calling this function before the beacon is needed (e.g. based on hardware interrupt).

If the beacon frames are generated by the device, then the driver must use the returned beacon as the template and change the TIM IE according to the current DTIM parameters/TIM bitmap.

The driver is responsible for freeing the returned skb.

Definition at line 2281 of file tx.c.

void ieee80211_clear_tx_pending ( struct ieee80211_local local)

Definition at line 2121 of file tx.c.

void ieee80211_ctstoself_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
const void frame,
size_t  frame_len,
const struct ieee80211_tx_info frame_txctl,
struct ieee80211_cts cts 
)

ieee80211_ctstoself_get - CTS-to-self frame generation function : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback. : pointer to the frame that is going to be protected by the CTS-to-self. : the frame length (in octets). : &struct ieee80211_tx_info of the frame. : 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.

Definition at line 2636 of file tx.c.

struct sk_buff* ieee80211_get_buffered_bc ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)
read

ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames : pointer as obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback.

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.

Definition at line 2652 of file tx.c.

netdev_tx_t ieee80211_monitor_start_xmit ( struct sk_buff skb,
struct net_device dev 
)

Definition at line 1573 of file tx.c.

struct sk_buff* ieee80211_nullfunc_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)
read

ieee80211_nullfunc_get - retrieve a nullfunc template : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback.

Creates a Nullfunc template which can, for example, uploaded to hardware. The template must be updated after association so that correct BSSID and address is used.

Note: Caller (or hardware) is responsible for setting the &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields.

Definition at line 2537 of file tx.c.

struct sk_buff* ieee80211_probereq_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
const u8 ssid,
size_t  ssid_len,
const u8 ie,
size_t  ie_len 
)
read

ieee80211_probereq_get - retrieve a Probe Request template : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback. : SSID buffer : length of SSID : buffer containing all IEs except SSID for the template : length of the IE buffer

Creates a Probe Request template which can, for example, be uploaded to hardware.

Definition at line 2573 of file tx.c.

struct sk_buff* ieee80211_proberesp_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)
read

ieee80211_proberesp_get - retrieve a Probe Response template : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback.

Creates a Probe Response template which can, for example, be uploaded to hardware. The destination address should be set by the caller.

Can only be called in AP mode.

Definition at line 2465 of file tx.c.

struct sk_buff* ieee80211_pspoll_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)
read

ieee80211_pspoll_get - retrieve a PS Poll template : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback.

Creates a PS Poll a template which can, for example, uploaded to hardware. The template must be updated after association so that correct AID, BSSID and MAC address is used.

Note: Caller (or hardware) is responsible for setting the &IEEE80211_FCTL_PM bit.

Definition at line 2499 of file tx.c.

void ieee80211_rts_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
const void frame,
size_t  frame_len,
const struct ieee80211_tx_info frame_txctl,
struct ieee80211_rts rts 
)

ieee80211_rts_get - RTS frame generation function : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback. : pointer to the frame that is going to be protected by the RTS. : the frame length (in octets). : &struct ieee80211_tx_info of the frame. : 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.

Definition at line 2620 of file tx.c.

netdev_tx_t ieee80211_subif_start_xmit ( struct sk_buff skb,
struct net_device dev 
)

ieee80211_subif_start_xmit - netif start_xmit function for Ethernet-type subinterfaces (wlan#, WDS, and VLAN interfaces) : packet to be sent : incoming interface

Returns: 0 on success (and frees skb in this case) or 1 on failure (skb will not be freed, and caller is responsible for either retrying later or freeing skb).

This function takes in an Ethernet header and encapsulates it with suitable IEEE 802.11 header based on which interface the packet is coming in. The encapsulated packet will then be passed to master interface, wlan#.11, for transmission (through low-level driver).

Definition at line 1716 of file tx.c.

void ieee80211_tx_pending ( unsigned long  data)

Definition at line 2168 of file tx.c.

void ieee80211_tx_skb_tid ( struct ieee80211_sub_if_data sdata,
struct sk_buff skb,
int  tid 
)

Definition at line 2710 of file tx.c.

void ieee80211_xmit ( struct ieee80211_sub_if_data sdata,
struct sk_buff skb 
)

Definition at line 1449 of file tx.c.