Main index | Section 9 | Options |
#include <net80211/ieee80211_var.h>
There are two control paths by which frames reach a driver for transmit. Data packets are queued to the device's if_snd queue and the driver's if_start method is called. Other frames are passed down using the ic_raw_xmit method without queueing (unless done by the driver). The raw transmit path may include data frames from user applications that inject them through bpf(4) and NullData frames generated by net80211 to probe for idle stations (when operating as an access point).
net80211 handles all state-related bookkeeping and management for the handling of data frames. Data frames are only transmit for a vap in the IEEE80211_S_RUN state; there is no need, for example, to check for frames sent down when CAC or CSA is active. Similarly, net80211 handles activities such as background scanning and power save mode, frames will not be sent to a driver unless it is operating on the BSS channel with "full power".
All frames passed to a driver for transmit hold a reference to a node table entry in the m_pkthdr.rcvif field. The node is associated with the frame destination. Typically it is the receiver's entry but in some situations it may be a placeholder entry or the "next hop station" (such as in a mesh network). In all cases the reference must be reclaimed with ieee80211_free_node() when the transmit work is completed. The rule to remember is: net80211 passes responsibility for the mbuf and "node reference" to the driver with each frame it hands off for transmit.
PAE/EAPOL frames are tagged with an M_EAPOL mbuf flag; drivers should transmit them with care, usually by using the transmit rate for management frames. Multicast/broadcast frames are marked with the M_MCAST mbuf flag. Frames coming out of a station's power save queue and that have more frames immediately following are marked with the M_MORE_DATA mbuf flag. Such frames will be queued consecutively in the driver's if_snd queue and drivers should preserve the ordering when passing them to the device.
IEEE80211_OUTPUT (9) | March 29, 2010 |
Main index | Section 9 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | A child of 5 could understand this! Fetch me a child of 5. | ” |