← Projects

Kernel Developer

Vive Wireless Linux Driver

Kernel Developer · 2025

LinuxKernelCDriverWiGigVR/XRReverse Engineering
Kernel
Linux (out-of-tree module)
Language
C
Radio
60 GHz WiGig (IEEE 802.11ad)
Interface
PCIe + USB
  • Out-of-tree Linux kernel module targeting the Vive Wireless Adapter's PCIe radio card and USB companion interface, registering both with the appropriate kernel subsystems
  • 60 GHz WiGig (IEEE 802.11ad) link initialization: channel selection, beamforming sector sweep, and association against the adapter's firmware command interface
  • Initialization sequence, firmware command encoding, and stream framing reconstructed from Windows driver USB capture and PCIe register access patterns; no vendor documentation exists for Linux
  • WiGig interface registered with cfg80211, visible as a managed wireless device to standard Linux wireless tooling
  • Streaming path minimizes interrupt coalescing on the PCIe RX path, sizes DMA descriptors for single-frame transfers, and schedules outgoing packets against a deadline from the headset's display refresh
  • Character device node exposes the stream interface to userspace (SteamVR, OpenVR) via read/write on pre-allocated DMA-coherent buffers; no copy on the data path
Outcome Loadable kernel module enabling Vive Wireless Adapter bring-up on Linux with 60 GHz link establishment and VR stream transport.

The HTC Vive Wireless Adapter uses a 60 GHz WiGig (IEEE 802.11ad) radio link between a PCIe card in the host PC and a receiver on the headset. HTC ships no Linux driver. This is an out-of-tree kernel module that brings the adapter up on Linux: device enumeration, radio initialization, link establishment, and VR stream transport.

Device Interface

The adapter exposes two interfaces to the host: a PCIe radio card carrying the WiGig baseband, and a USB companion interface for control messaging and auxiliary data. The module registers a PCI driver for the radio card and a USB driver for the companion, coordinating bring-up across both. PCIe BAR space is mapped for direct register access to the radio firmware; USB handles the control plane.

WiGig operates in the unlicensed 60 GHz band with directional beamforming to compensate for the band’s high path loss. The module drives the firmware through the bring-up sequence: channel selection across the available 2.16 GHz-wide 802.11ad channels, a sector sweep to find the best transmit and receive beam pair with the headset receiver, and association. The firmware command interface was reconstructed from Windows driver capture. The vendor publishes no Linux documentation.

Reverse Engineering

The Windows driver’s USB traffic and PCIe register access patterns were captured and analyzed to reconstruct the initialization sequence, firmware command encoding, and stream framing format. Key targets: the control-plane handshake over USB, the register sequence that arms the radio, and the bulk transfer layout carrying compressed video and tracking data. The module’s firmware command layer replicates the required sequence without the Windows HAL layer.

cfg80211 Integration

The WiGig interface is registered with the Linux cfg80211 subsystem, making it visible as a managed wireless interface to standard tools. This reuses the kernel’s existing wireless device lifecycle infrastructure and keeps the driver’s scope limited to hardware bring-up and stream transport.

Latency Constraints

PC VR over a wireless link has hard latency budgets; frame delivery jitter causes visible artifacts and motion sickness. The streaming path minimizes interrupt coalescing on the PCIe RX path, sizes DMA descriptors for single-frame transfers to avoid scatter-gather overhead, and schedules outgoing packets against a deadline from the headset’s display refresh. A character device node exposes the stream interface to userspace via read/write on pre-allocated DMA-coherent buffers, with no copy on the data path.