Files
Shen MintaoandClaude Opus 5.5 332677e771 docs: document OpenWrt cfg80211 backport builds
27af5ad added the CFG80211_VERSION make variable for OpenWrt builds that
use a newer mac80211 backport than the target kernel, but it is only
described in a Makefile comment. Document how to pass it from an OpenWrt
package Makefile, link the notes from the installation steps, and add
the build script and the kernel/backports combinations verified for
issue #94.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 14:59:53 +08:00
..

OpenWrt backports build regression

This checks complete module compilation and MODPOST against real kernel and wireless-stack headers. It requires an already prepared SDK/buildroot with cfg80211/mac80211 headers and mac80211.symvers staged. It does not install packages or load modules.

For the x86_64 SDK used in issue #94:

sdk=/path/to/openwrt-sdk
kernel="$sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-6.12.94"
export STAGING_DIR="$sdk/staging_dir/target-x86_64_musl"
export PATH="$sdk/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin:$PATH"

bash tests/openwrt-backports/build.sh \
    "$kernel" "$STAGING_DIR/usr/include" \
    "$kernel/../symvers/mac80211.symvers" 6.18.26 \
    ARCH=x86_64 CROSS_COMPILE=x86_64-openwrt-linux-musl-

The script copies the current driver into a fresh temporary directory and checks that all three .ko files are produced. Additional make arguments can select a compiler or architecture. Use matching headers, configuration and symbol versions throughout; changing only the version argument is not a substitute for the matching wireless stack.

Verified on 2026-09-17

  • OpenWrt 25.12.5 x86_64 SDK: Linux 6.12.94, GCC 14.3.0, backports 6.18.26 with the mac80211 patches from OpenWrt revision f5dae5ece4 applied: all three modules compile and pass MODPOST with the kernel's -Werror.
  • Original driver revision 9594c5c, on the same kernel/backports combination: reproduces both RX argument-count errors and the four incompatible set_monitor_channel, set_wiphy_params, set_tx_power, get_tx_power callbacks. This comparison uses -Wno-error=unused-label, as the issue's log does, to reach those failures. The fixed build needs no such override.
  • Native kernel headers 6.11.0-17, 6.17.0-14 and 7.2.0-070200, with CFG80211_VERSION unset: all three modules compile and pass MODPOST. The 7.2 check uses GCC 14 and reports compiler/attribute warnings because those headers were built with GCC 15.

These are build checks. They do not validate an installable OpenWrt package, firmware loading, Wi-Fi connectivity or Bluetooth operation on hardware.