I want to learn about how nl80211
and cfg80211
works in detail. Function flow, how nl80211
interact with network tools like wpa_
See my reply to How to learn the structure of Linux wireless drivers (mac80211)?
In wpa_supplicant
, you can follow the code in src/drivers/driver_nl80211.c
. This is a wpa_supplicant driver (not a kernel driver but an abstraction used in wpa_supplicant
code) which uses libnl
to communicate with the kernel cfg80211
module. When wpa_supplicant
issues a scan for example then wpa_driver_nl80211_scan
gets called. It builds the netlink
message with a command called NL80211_CMD_TRIGGER_SCAN
and with all the parameters required for the scan.