mac80211 and cfg80211 callback structures

As seen in the previous article <Linux 802.11 SoftMAC architecture>, mac80211 interacts with the SoftMAC driver via “ieee80211_ops” structure and interacts with cfg80211 via “cfg80211_ops” structure.

The structures can be found at

  1. cf80211_ops – /include/net/cfg80211.h
  2. ieee80211_ops – /include/net/mac80211.h

Snippets of both structure are provided below to provide an idea on how the structures are and how they are used.

struct 802.11_ops snippet – contains more callbacks for the softmac driver
struct cfg80211_ops snippet – contains more callbacks for mac80211 interface

The below image snippets provide how the callbacks are configured in mac80211 and a softmac driver (iwlwifi in this case) setting up mac80211 callbacks.

mac80211 fills the cfg80211_ops structure with callbacks to invoke

The above configuration ops are provided to the upper layer during initialization.

Similarly, the ieee80211_ops are filled by the softmac driver and registered to mac80211 during “ieee80211_alloc_hw” API call.

softmac driver fills the mac80211_ops structure with callbacks to invoke

nl80211 interface

Comments

  1. Pingback: Linux 802.11 SoftMAC architecture | Hitch Hiker's Guide to Learning

Leave a Reply

Your email address will not be published. Required fields are marked *