Think && Act
  • Welcome
  • OpenWRT系统
    • Remote Command Execution on GL.iNet's mini-routers
    • 配置DTS支持USB存储
    • OpenWRT procd启动过程
    • udhcpc如何绑定网络接口
    • 提交新平台补丁到OpenWRT社区
  • 无线WiFi技术
    • WiFi 四次握手分析
    • mac80211框架基础
    • How to get wirelss assoclist on MT7628
    • WPS on GL.iNet's OpenWRT
  • 密码学与安全
    • Feistel Cipher
    • 数据加密标准(DES)
    • Data Encryption Standard(DES)
    • Advanced Encryption Standard(AES)
  • 数据结构与算法
  • VPN技术
    • Using Tor on GL.iNet's mini-routers
    • Using Softether VPN on GL.iNet's mini-routers
    • Using ZeroTier on GL.iNet's mini-routers
  • Go语言
    • A Quick Guide for Go Modules
  • Shell脚本
    • Parameter Expansion ${}
    • User's Guide for Awk
  • Python语言
    • Python in Visual Studio Code
  • 投资理财
    • 【入门】股票入门基础
    • 【股初】找准股票入场时机
    • 【股初】合理规避风险
    • 【股初】“好公司”投资法
    • 【股初】财务三表分析
    • 【股初】“捡烟蒂”投资法
    • 【股初】构建白马组合
    • 【股进】选择好生意
    • 【股进】好公司——商业逻辑
  • 工具箱
    • A Guide of Visual Studio Code
    • hexo搭建博客
Powered by GitBook
On this page
  • Overview
  • Mac80211 Framework
  • References

Was this helpful?

  1. 无线WiFi技术

mac80211框架基础

PreviousWiFi 四次握手分析NextHow to get wirelss assoclist on MT7628

Last updated 5 years ago

Was this helpful?

Overview

To be able to control wireless drivers from userspace, some IPC communication processes between kernel and userspace are used.

  • At first ioctl with vendor dependent APIs was used.

  • In 1996, Jean Tourrilhes creates (WE or WEXT).

The Wireless Extension (WE) is a generic API allowing a driver to expose to the user space configuration and statistics specific to common Wireless LANs.

  • In 2006, John Linville creates and Johannes Berg creates and . Together it is intended to replace wireless extensions.

+-------------+
|             |
|  Userspace  |
|             |
+-------------+
      ^
- - - | - - - - 
      | nl80211
      v
+-------------+
|             |
|  cfg80211   |
|             |
+-------------+
+-------------+
|             |
|  mac80211   |
|   driver    |
|             |
+-------------+

Mac80211 Framework

  • nl80211 is the interface between user space software (iw, wpa_supplicant, etc.) and the kernel (cfg80211 and mac80211 kernel modules, and specific drivers).

  • The WiFi drivers and hardware could be Full-MAC or Soft-MAC (see Wireless_network_interface_controller).

  • cfg80211_ops is a set of operations that Full-MAC drivers and mac80211 module register to cfg80211 module.

  • ieee80211_ops is a set of operations that Soft-MAC drivers register to mac80211 module.

References

An important point is that nl80211/cfg80211/mac80211 no longer use ioctl, they use .

So, tools like , or the use some netlink libraries (like or ) and the netlink interface public header which is of course .

There is not so much documentations, but I advice you to read the and then the (because iw use libnl).

wireless extensions
mac80211
cfg80211
nl80211
netlink
iw
hostapd
wpa_supplicant
libnl
libnl-tiny
nl80211.h
libnl documentation
iw source code
How nl80211 library & cfg80211 work?