|ic_ifp||Backpointer to the physical devices ifnet.|
|ic_caps||Device/driver capabilities; see below for a complete description.|
|Table of channels the device is capable of operating on. This is initially provided by the driver but may be changed through calls that change the regulatory state.|
|ic_nchan||Number of entries in ic_channels.|
On return from
the driver is expected to override default callback functions in the
.Vt ieee80211com structure to register its private routines. Methods marked with a "*" must be provided by the driver.
|Create a vap instance of the specified type (operating mode). Any fixed BSSID and/or MAC address is provided. Drivers that support multi-bssid operation may honor the requested BSSID or assign their own.|
|Destroy a vap instance created with ic_vap_create.|
|Return the list of calibrated channels for the radio. The default method returns the current list of channels (space permitting).|
|Process a request to change regulatory state. The routine may reject a request or constrain changes (e.g. reduce transmit power caps). The default method accepts all proposed changes.|
|Send an 802.11 management frame. The default method fabricates the frame using IEEE80211 state and passes it to the driver through the ic_raw_xmit method.|
|Transmit a raw 802.11 frame. The default method drops the frame and generates a message on the console.|
|Update hardware state after an 802.11 IFS slot time change. There is no default method; the pointer may be NULL in which case it will not be used.|
|Update hardware for a change in the multicast packet filter. The default method prints a console message.|
|Update hardware for a change in the promiscuous mode setting. The default method prints a console message.|
|Update driver/device state for association to a new AP (in station mode) or when a new station associates (e.g. in AP mode). There is no default method; the pointer may be NULL in which case it will not be used.|
Allocate and initialize a
.Vt ieee80211_node structure. This method cannot sleep. The default method allocates zerod memory using malloc(9). Drivers should override this method to allocate extended storage for their own needs. Memory allocated by the driver must be tagged with M_80211_NODE to balance the memory allocation statistics.
|Reclaim storage of a node allocated by ic_node_alloc. Drivers are expected to interpose their own method to cleanup private state but must call through this method to allow IEEE80211 to reclaim its private state.|
Cleanup state in a
.Vt ieee80211_node created by ic_node_alloc. This operation is distinguished from ic_node_free in that it may be called long before the node is actually reclaimed to cleanup adjunct state. This can happen, for example, when a node must not be reclaimed due to references held by packets in the transmit queue. Drivers typically interpose ic_node_cleanup instead of ic_node_free.
|Age, and potentially reclaim, resources associated with a node. The default method ages frames on the power-save queue (in AP mode) and pending frames in the receive reorder queues (for stations using A-MPDU).|
|Reclaim all optional resources associated with a node. This call is used to free up resources when they are in short supply.|
|Return the Receive Signal Strength Indication (RSSI) in .5 dBm units for the specified node. This interface returns a subset of the information returned by ic_node_getsignal. The default method calculates a filtered average over the last ten samples passed in to ieee80211_input(9) or ieee80211_input_all(9).|
|Return the RSSI and noise floor (in .5 dBm units) for a station. The default method calculates RSSI as described above; the noise floor returned is the last value supplied to ieee80211_input(9) or ieee80211_input_all(9).|
|Return MIMO radio state for a station in support of the IEEE80211_IOC_STA_INFO ioctl request. The default method returns nothing.|
|Prepare driver/hardware state for scanning. This callback is done in a sleepable context.|
|Restore driver/hardware state after scanning completes. This callback is done in a sleepable context.|
Set the current radio channel using
.Vt ic_curchan . This callback is done in a sleepable context.
|Start scanning on a channel. This method is called immediately after each channel change and must initiate the work to scan a channel and schedule a timer to advance to the next channel in the scan list. This callback is done in a sleepable context. The default method handles active scan work (e.g. sending ProbeRequest frames), and schedules a call to ieee80211_scan_next(9) according to the maximum dwell time for the channel. Drivers that off-load scan work to firmware typically use this method to trigger per-channel scan activity.|
|Handle reaching the minimum dwell time on a channel when scanning. This event is triggered when one or more stations have been found on a channel and the minimum dwell time has been reached. This callback is done in a sleepable context. The default method signals the scan machinery to advance to the next channel as soon as possible. Drivers can use this method to preempt further work (e.g. if scanning is handled by firmware) or ignore the request to force maximum dwell time on a channel.|
|Process a received Action frame. The default method points to ieee80211_recv_action(9) which provides a mechanism for setting up handlers for each Action frame class.|
|Transmit an Action frame. The default method points to ieee80211_send_action(9) which provides a mechanism for setting up handlers for each Action frame class.|
|Check if transmit A-MPDU should be enabled for the specified station and AC. The default method checks a per-AC traffic rate against a per-vap threshold to decide if A-MPDU should be enabled. This method also rate-limits ADDBA requests so that requests are not made too frequently when a receiver has limited resources.|
|Request A-MPDU transmit aggregation. The default method sets up local state and issues an ADDBA Request Action frame. Drivers may interpose this method if they need to setup private state for handling transmit A-MPDU.|
|Process a received ADDBA Response Action frame and setup resources as needed for doing transmit A-MPDU.|
|Shutdown an A-MPDU transmit stream for the specified station and AC. The default method reclaims local state after sending a DelBA Action frame.|
|Process a response to a transmitted BAR control frame.|
|Prepare to receive A-MPDU data from the specified station for the TID.|
|Terminate receipt of A-MPDU data from the specified station for the TID.|
Once the IEEE80211 layer is attached to a driver there are two more steps typically done to complete the work:
State is torn down and reclaimed with a call to ieee80211_ifdetach. Note this call may result in multiple callbacks into the driver so it should be done before any critical driver state is reclaimed. On return from ieee80211_ifdetach all associated vaps and ifnet structures are reclaimed or inaccessible to user applications so it is safe to teardown driver state without worry about being re-entered. The driver is responsible for calling if_free(9) on the ifnet it allocated for the physical device.
Driver/device capabilities are specified using several sets of flags in the
.Vt ieee80211com structure. General capabilities are specified by
.Vt ic_caps . Hardware cryptographic capabilities are specified by
.Vt ic_cryptocaps . 802.11n capabilities, if any, are specified by
.Vt ic_htcaps . The IEEE80211 layer propagates a subset of these capabilities to each vap through the equivalent fields:
.Vt iv_caps ,
.Vt iv_cryptocaps , and
.Vt iv_htcaps . The following general capabilities are defined:
IEEE80211_C_STA Device is capable of operating in station (aka Infrastructure) mode. IEEE80211_C_8023ENCAP Device requires 802.3-encapsulated frames be passed for transmit. By default IEEE80211 will encapsulate all outbound frames as 802.11 frames (without a PLCP header). IEEE80211_C_FF Device supports Atheros Fast-Frames. IEEE80211_C_TURBOP Device supports Atheros Dynamic Turbo mode. IEEE80211_C_IBSS Device is capable of operating in adhoc/IBSS mode. IEEE80211_C_PMGT Device supports dynamic power-management (aka power save) in station mode. IEEE80211_C_HOSTAP Device is capable of operating as an Access Point in Infrastructure mode. IEEE80211_C_AHDEMO Device is capable of operating in Adhoc Demo mode. In this mode the device is used purely to send/receive raw 802.11 frames. IEEE80211_C_SWRETRY Device supports software retry of transmitted frames. IEEE80211_C_TXPMGT Device support dynamic transmit power changes on transmitted frames; also known as Transmit Power Control (TPC). IEEE80211_C_SHSLOT Device supports short slot time operation (for 802.11g). IEEE80211_C_SHPREAMBLE Device supports short preamble operation (for 802.11g). IEEE80211_C_MONITOR Device is capable of operating in monitor mode. IEEE80211_C_DFS Device supports radar detection and/or DFS. DFS protocol support can be handled by IEEE80211 but the device must be capable of detecting radar events. IEEE80211_C_MBSS Device is capable of operating in MeshBSS (MBSS) mode (as defined by 802.11s Draft 3.0). IEEE80211_C_WPA1 Device supports WPA1 operation. IEEE80211_C_WPA2 Device supports WPA2/802.11i operation. IEEE80211_C_BURST Device supports frame bursting. IEEE80211_C_WME Device supports WME/WMM operation (at the moment this is mostly support for sending and receiving QoS frames with EDCF). IEEE80211_C_WDS Device supports transmit/receive of 4-address frames. IEEE80211_C_BGSCAN Device supports background scanning. IEEE80211_C_TXFRAG Device supports transmit of fragmented 802.11 frames. IEEE80211_C_TDMA Device is capable of operating in TDMA mode.
The follow general crypto capabilities are defined. In general IEEE80211 will fall-back to software support when a device is not capable of hardware acceleration of a cipher. This can be done on a per-key basis. IEEE80211 can also handle software Michael calculation combined with hardware AES acceleration.
IEEE80211_CRYPTO_WEP Device supports hardware WEP cipher. IEEE80211_CRYPTO_TKIP Device supports hardware TKIP cipher. IEEE80211_CRYPTO_AES_OCB Device supports hardware AES-OCB cipher. IEEE80211_CRYPTO_AES_CCM Device supports hardware AES-CCM cipher. IEEE80211_CRYPTO_TKIPMIC Device supports hardware Michael for use with TKIP. IEEE80211_CRYPTO_CKIP Devices supports hardware CKIP cipher.
The follow general 802.11n capabilities are defined. The first capabilities are defined exactly as they appear in the 802.11n specification. Capabilities beginning with IEEE80211_HTC_AMPDU are used solely by the IEEE80211 layer.
IEEE80211_HTCAP_CHWIDTH40 Device supports 20/40 channel width operation. IEEE80211_HTCAP_SMPS_DYNAMIC Device supports dynamic SM power save operation. IEEE80211_HTCAP_SMPS_ENA Device supports static SM power save operation. IEEE80211_HTCAP_GREENFIELD Device supports Greenfield preamble. IEEE80211_HTCAP_SHORTGI20 Device supports Short Guard Interval on 20MHz channels. IEEE80211_HTCAP_SHORTGI40 Device supports Short Guard Interval on 40MHz channels. IEEE80211_HTCAP_TXSTBC Device supports Space Time Block Convolution (STBC) for transmit. IEEE80211_HTCAP_RXSTBC_1STREAM Device supports 1 spatial stream for STBC receive. IEEE80211_HTCAP_RXSTBC_2STREAM Device supports 1-2 spatial streams for STBC receive. IEEE80211_HTCAP_RXSTBC_3STREAM Device supports 1-3 spatial streams for STBC receive. IEEE80211_HTCAP_MAXAMSDU_7935 Device supports A-MSDU frames up to 7935 octets. IEEE80211_HTCAP_MAXAMSDU_3839 Device supports A-MSDU frames up to 3839 octets. IEEE80211_HTCAP_DSSSCCK40 Device supports use of DSSS/CCK on 40MHz channels. IEEE80211_HTCAP_PSMP Device supports PSMP. IEEE80211_HTCAP_40INTOLERANT Device is intolerant of 40MHz wide channel use. IEEE80211_HTCAP_LSIGTXOPPROT Device supports L-SIG TXOP protection. IEEE80211_HTC_AMPDU Device supports A-MPDU aggregation. Note that any 802.11n compliant device must support A-MPDU receive so this implicitly means support for transmit of A-MPDU frames. IEEE80211_HTC_AMSDU Device supports A-MSDU aggregation. Note that any 802.11n compliant device must support A-MSDU receive so this implicitly means support for transmit of A-MSDU frames. IEEE80211_HTC_HT Device supports High Throughput (HT) operation. This capability must be set to enable 802.11n functionality in IEEE80211. IEEE80211_HTC_SMPS Device supports MIMO Power Save operation. IEEE80211_HTC_RIFS Device supports Reduced Inter Frame Spacing (RIFS).
ioctl(2), ndis(4), ieee80211_amrr(9), ieee80211_beacon(9), ieee80211_bmiss(9), ieee80211_crypto(9), ieee80211_ddb(9), ieee80211_input(9), ieee80211_node(9), ieee80211_output(9), ieee80211_proto(9), ieee80211_radiotap(9), ieee80211_regdomain(9), ieee80211_scan(9), ieee80211_vap(9), ifnet(9), malloc(9)