$ show open-sdr/openwifi
The openwifi repository provides a full-stack IEEE 802.11 (Wi-Fi) implementation for Software Defined Radio (SDR) hardware, specifically targeting Xilinx Zynq/ZynqMP SoCs with AD9361/AD9364 RF transceivers. It consists of a Linux kernel driver (split into multiple modules for OFDM, TX/RX interfaces, and side-channel processing) and user-space tools for hardware configuration, FPGA bitstream loading, and Wi-Fi interface management. The system supports standard Wi-Fi modes (AP, STA, ad-hoc, monitor) and experimental features like Channel State Information (CSI) extraction, packet injection/fuzzing, and radar sensing. The build system uses Buildroot to generate bootable SD card images, and the project includes extensive documentation for experimentation and hardware bring-up.
The LLM identified 3 files worth highlighting for reuse:
Provides a command-line interface for reading and writing hardware registers via the nl80211 testmode interface. The register definitions are contained in a header file, making it easy to adapt to different hardware by modifying the register map. The implementation is self-contained and demonstrates a clean separation between the register map and the access mechanism.
The driver is split into multiple independent kernel modules (tx_intf, rx_intf, openofdm_tx, openofdm_rx, xpu, side_ch) each with well-defined APIs. Each module exposes configurable parameters and statistics via sysfs using standard Linux driver patterns. This modularity allows for independent development, testing, and reloading of driver components without rebooting the system.
Implements a nl80211 testmode command handler that allows user-space tools to send custom commands to the driver for hardware configuration and experimentation (e.g., setting test modes, reading/writing registers, controlling RF parameters). This pattern provides a safe and standardized way to expose hardware-specific controls to user-space without requiring custom ioctls, making it reusable for other wireless drivers that need to support experimentation.