Impossible OS Docs

Wi-Fi Drivers

What is it?

The Wi-Fi roadmap plans wireless networking for Impossible OS: a common driver interface, an 802.11 frame layer, scanning and association, drivers for Realtek, Intel and MediaTek chips, a WPA2-PSK supplicant, power management, the netsh wlan commands and an Airplane mode coordinator. Nothing in it has shipped. There is no Wi-Fi code in the tree today, so this page describes the plan and the pieces it will build on.

How will it work?

A driver interface first. Every chip driver will fill in a seven-function wifi_device_t table (scan, connect, disconnect, signal strength, set channel, transmit and receive poll) and register with a Wi-Fi manager, wifi_manager.c. The manager is the single owner of Wi-Fi state: the scan results, the active device and the connection state machine (disconnected, scanning, authenticating, associating, four-way handshake, connected). User mode reaches it through planned SYS_WIFI_SCAN, SYS_WIFI_CONNECT, SYS_WIFI_DISCONNECT and SYS_WIFI_STATUS system calls.

Into the existing stack. Once associated, a Wi-Fi interface carries ordinary Ethernet frames. Received data frames are converted from 802.11 to Ethernet framing and passed to net_rx() in ethernet.c, the same entry point the wired RTL8139 driver uses. That layer is currently hard-wired to one wired card (Network Drivers), so a second interface needs the driver table planned there too.

Security. The supplicant runs the EAPOL four-way handshake and CCMP encryption in the kernel. Random nonces come from the kernel CSPRNG (csprng_fill() in csprng.h). The roadmap names a hwrng_read() source that does not exist, and plans its own AES-CCM, PBKDF2 and HMAC-SHA1 code; the vendored mbedtls library already provides PBKDF2 and constant-time compare, which the project's vendor-first rule would prefer.

Firmware. Every supported chip needs a vendor firmware blob at start-up. The chip sections plan their own interim loading (the RTL8188 section embeds its blob in the driver), and the firmware roadmap's Driver Conversion Pass later moves every Wi-Fi driver to the shared Firmware Loader and its integrity and provenance checks. Both are unshipped.

flowchart LR
    D[Chip driver: wifi_device_t] --> M[Wi-Fi manager]
    M --> S[Scan and associate]
    S --> W[WPA2 handshake + CCMP]
    W --> F[802.11 to Ethernet]
    F --> N[net_rx]
    FW[Firmware loader] --> D

What are its interfaces?

None yet. The planned surface is the wifi_device_t table and manager, the SYS_WIFI_* system calls, Registry keys for saved networks (HKLM\SYSTEM\Network\WiFi), the netsh wlan commands and a Wi-Fi tab in the network control panel. The existing interfaces it will use are net_rx() and net_cfg (net.h) and csprng_fill().

How do I use it?

You cannot yet. A machine whose only network is Wi-Fi boots without networking. Under QEMU, use the emulated RTL8139 wired card described in Network Drivers.

What is not implemented yet?

Everything:

How does it compare with Windows 11 and Linux?

Windows 11 uses NDIS Wi-Fi miniport drivers under the wlansvc service, with the tray flyout and netsh wlan. Linux splits the work between cfg80211 and mac80211 in the kernel and wpa_supplicant or NetworkManager in user space. Impossible OS plans a single in-kernel manager and supplicant, and has no Wi-Fi support today.

See also

Impossible OS is free software under the GPL-3.0-only license. Last updated Edit this page on GitHub