NOTE: this page is for archival only, see the note at the end of the page.

About mac80211

mac80211 is a framework which driver developers can use to write drivers for SoftMAC wireless devices. SoftMAC devices allow for a finer control of the hardware, allowing for 802.11 frame management to be done in software for them, for both parsing and generation of 802.11 wireless frames. Most 802.11 devices today tend to be of this type. mac8011 implements the cfg80211 callbacks for SoftMAC devices, mac80211 then depends on cfg80211 for both registration to the networking subsystem and for configuration. Configuration is handled by cfg80211 both through nl80211 and wireless extensions.

In mac8021 the MLME is done in the kernel for station mode (STA) and userspace for AP mode (hostapd).

If you have new userspace utilities which support nl80211 you do not need wireless-extensions to support a mac80211 device.

Supported features

Here is a quick review of the features supported in mac80211.

  • IEEE 802.11abgn
  • IEEE 802.11d
  • Integration of work for the emerging 802.11s standard
  • Roaming using wpa_supplicant (802.11r as well). See Roaming TODO section for more details

  • Different types of interfaces, see supported wireless modes for details.

  • Vendor specific rate support
  • QoS

The mac80211 book

We are working on a mac80211 book which is generated from comments in the various mac80211 source files. You will find a more thorough review of mac80211 in it; the wiki pages can be used as a quick reference for mac80211 development. The book incorporates the kernel-doc docs below.

mac80211 driver API

The new mac80211 driver interface semantics gives an overview of the expected and suggested driver behavior.

The API page lists notes about using the driver API.

The tracing page has notes on how to trace what mac80211 is asking the driver to do.

mac80211 drivers

mac80211 drivers are listed on the drivers table

mac80211 802.11d support

mac80211 supports 802.11d by processing country information element on beacons after association with an AP. You should still be able to associate to the AP in your region as cfg80211 allows users to set the regulatory domain from userspace before country information elements are parsed, this is expected to be set via wpa_supplicant upon initialization. We let cfg80211 parse the country information element for us and deal with reviewing regulatory enforcement for us. To review that please see cfg80211's regulatory support.

mac80211 rate control algorithms

Here is a list of current mac80211 rate control algorithms:

  • PID - PID (proportional-integral-derivative) rate control algorithm

  • minstrel - a rate control algorithm making use of multi-rate retries

The master device wmaster0

/!\ This information is no longer relevant as – since kernel version 2.6.32 – the master interface is no longer created.

mac80211 creates creates one master device and as many other secondary devices as requested to represent interfaces for the wireless card you have. mac80211 asks for the master device to appear as named as wmaster%d, and wlan%0 for the interfaces. udev may override the naming convention used though. wmaster%d is an internal master device used only by mac80211. It is currently visible only because it uses netdevice structure which we must allocate and use for for QoS. It also serves as a holder for all interfaces we have, and represent the underlying hardware. For example, when TXing your wlan0 STA interface will actually add IEEE-802.11 header data to a frame with just Ethernet headers, and then pass it down to the master device for actual transmission using the low level drivers.

The wlan%d devices (interfaces) are the devices you would use to configure your wireless settings.

other documentation

mac80211 files and kernel docs

There are more files, these have kerneldocs available. The rest of the files are in net/mac80211/.

File location / kerneldoc (kernel-doc warnings)

Branch

Branch

include/net/mac80211.h (W)

master

everything

net/mac80211/ieee80211.c (W)

master

everything

net/mac80211/ieee80211_i.h (W)

master

everything

net/mac80211/rc80211_pid.h (W)

master

everything

net/mac80211/sta_info.c (W)

master

everything

net/mac80211/sta_info.h (W)

master

everything

net/mac80211/tx.c (W)

master

everything


This is a static dump of the wiki, taken after locking it in January 2015. The new wiki is at https://wireless.wiki.kernel.org/.
versions of this page: last, v55, v54, v53, v52, v51, v50, v49, v48, v47, v46, v45, v44, v43, v42, v41, v40, v39, v38, v37, v36, v35, v34, v33, v32, v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21, v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1