linux-kernelwifilinux-device-driver

Do Access points use softMAC or hardMAC?


I am trying to understand the working of wireless in linux. I started with wpa_supplicant, hostapd applications with the help of their documentation and source code.Understood the flow and basic functionalities of :

  1. wpa_supplicant,nl80211(driver interface)
  2. libnl library(socket communication between user space and kernel using netlink protocol)
  3. cfg80211(kernel interface used for communicating with the driver from userspace with the help of nl80211 implementation in user space),mac80211(software media access control layer)
  4. driver(loadable driver ex:ath6kl - atheros driver).

I understood the above software flow and in my exploration I came to know that for providing freedom for developers MAC layer is implemented in software(popular implementation mac80211).

Is this true in all the cases ? If so what are pros and cons of softMAC and hardMAC ? Do cfg80211 interface in kernel directly communicates with the driver ? who and how communication with mac80211 happens ?

Thanks in advance.


Solution

  • The term 'SoftMAC' refers to a wireless network interface device (WNIC) which does not implement the MAC layer in hardware, rather it expects the drivers to implement the MAC layer.

    'HardMAC' (also called 'FullMAC') describes a WNIC which implements the MAC layer in hardware.

    The advantages of SoftMAC are:

    An additional advantage (in the Linux kernel at least) is that many different drivers for different types of WNIC can all share the same MAC implementation, provided by the kernel itself.

    Despite the advantages, not all WNICs use SoftMAC. The main advantages of HardMAC is that since the MAC functions are implemented in hardware, they contribute less CPU load.

    mac80211 is the framework within the Linux kernel for implementing SoftMAC drivers. It implements the cfg80211 callbacks which would otherwise have to be implemented by the driver itself, and also implements the MAC layer functions. As such it goes between cfg80211 and the SoftMAC drivers.

    HardMAC drivers have to implement the cfg80211 interfaces fully themselves.