OpenBoot
Draft: this page is not reviewed yet.

Wi-Fi driverDraft

Maturity: experimental. The hardware, the way the code reaches it, firmware and results are on the page of each generation; the table at the end links them.

What the driver is#

win/obwlan is a WiFiCx client driver (KMDF with NetAdapterCx and WiFiCx) for the built-in wireless module's Wi-Fi function, bound by the PCI id of that function (given on the generation pages). The function is passed through to the guest as a PCI device with one message interrupt; the driver talks to the module's firmware over the module's own ring-based transport.

From the header of kmdf/obwlan.cpp, the driver:

  • Starts the module. It maps the first BAR, reads the machine's Wi-Fi address from a vendor capability in PCI configuration space, allocates one contiguous buffer, starts the firmware's main stage, opens the control rings and reads the firmware version, rate policy and channel list. A failed start fails the device.
  • Scans. A scan request becomes a firmware scan; every management message the firmware delivers becomes a Windows BSS entry. Scans are passive until a country is set.
  • Joins networks. The firmware runs authentication, association and the WPA2 four-way handshake (or SAE) itself, so it needs the pairwise master key or the passphrase, which WiFiCx does not give a driver. A companion user-mode DLL, obwlanihv.dll, loaded by Windows' WLAN service as an IHV extension, obtains the key from the network profile and hands it to the driver. Toward Windows the driver plays the authenticator of a local WPA2 handshake with the same key so that Windows opens the port; the frames of that local handshake are never transmitted.
  • Carries data. Receive and transmit rings are driven from the NetAdapterCx queue callbacks. The firmware exchanges Ethernet frames while Windows uses 802.11 frames with an LLC/SNAP header, so the driver converts both ways and copies each frame.
  • Survives a device restart. The firmware transport cannot be stopped and started without a function reset, so releasing the hardware parks it and the next instance takes it over.

The INF exposes advanced settings, including a preferred band.

The pure parts are the transport and message layouts (core/obwlan_core.h), the handshake and cryptography (core/obwlan_wpa.h: SHA-1, HMAC-SHA1, AES key wrap, EAPOL-Key frames) and the IHV interface (core/obwlan_ihv.h).

Build and host tests#

  • Host tests: tests/obwlan_host has no Makefile. The core is header-only, so each test is one C file compiled with a host compiler and run: cc -std=gnu11 -o /tmp/test_core tests/obwlan_host/test_core.c && /tmp/test_core, the same for test_conn.c and test_ihv.c, and then python3 tests/obwlan_host/test_handshake.py /tmp/test_conn (an independent WPA2 supplicant against the driver's authenticator; it needs the Python package cryptography). ihv_harness.c is a Windows-side harness and is not part of the host run.
  • Windows package: tools/win/build-obwlan.sh, following the overview. The build uses the WiFiCx headers of the WDK. It was not re-run for this page; its default build host belongs to the original build machine.

Generations#

The hardware reality of this stream, per generation:

Generation Page
M5 Series M5 Series