2025q1 Homework1 (ideas)
contributed by < timsong1 >
vwifi 是個程式碼約~三千行,具體而微的 WiFi 裝置驅動程式,採用 cfg80211 框架。目前 vwifi 支援 scan, connect, disconnect 等 cfg80211 的介面操作,並得以正確處理 Tx/Rx 封包。
FullMAC vs. SoftMAC
主要就是差在 MLME (MAC layer management entity) 是在硬體還是軟體上實現
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
FullMAC :
- MLME 透過硬體實現,所有 WIFI 協議的部分都交由韌體處理
- 執行快、不占用 CPU
SoftMAC :
- MLME 透過軟體實現
- 硬體成本低
- 驅動如果要更新,可以直接透過更新軟體來實現
不管是 FullMAC SoftMAC 設備都需要透過 cfg80211 來讓 linux 核心知道他們的存在
cfg80211, mac80211, nl80211
cfg80211 subsystem 提供了一個統一的 API,使得驅動可以對 WIFI 設備進行配置管理
- 不直接處理 WIFI 數據資料,而是負責設備配置與管理
- 通常會與 FullMAC, Mac80211, nl80211 一起工作,即便不使用 mac80211,仍可用於 FullMAC 設備驅動
- 提供與 user space 溝通的介面 (搭配 nl80211)
mac80211 subsystem 是專門寫 SoftMAC 驅動的框架,意思就是只適用於 SoftMAC 設備,負責處理 IEEE 802.11 協議的部分
- 不會直接與 user space 溝通,而是透過 cfg80211 來處理來自 user space 的請求
簡單來說,cfg80211 負責解析 user space 請求,透過 callback 函數來呼叫 mac80211 來執行 WIFI 操作 (如掃描、連接等等)
nl80211 是 linux 核心的 user space API for IEEE 802.11,像是 iw
、wpa_supplicant
來與 cfg80211 和 mac80211 subsystem 溝通
- cfg80211 是在 linux 核心裡對 WIFI 設備進行配置管理,而 nl80211 則是在 user space 對 WIFI 設備進行配置管理
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
支援 linux v6.8+