mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-11-10 16:49:17 +00:00
fix(legacy-mcu1): backport Linux 7.3 cfg80211 support
Backport main commit 2c4ab4b421 to
legacy-mcu1, preserving the branch's MCU1 firmware and loader profile.
Adapt the probe status link ID, probe_peer callback and input cookie APIs;
retain cfg80211-assigned cookies through asynchronous completion paths.
Add an isolated native-kernel build check and record the regression results.
The original branch reproduces all six reported errors on 7.3-rc3. The fix
builds all three modules and passes MODPOST on upstream 7.3 final and Ubuntu
7.3-rc3, 7.2 and 6.17 headers. The final-release module_layout CRCs match
the fully built test kernel. Hardware operation has not been tested.
Refs #111
Co-authored-by: MastaG <badouri.g@gmail.com>
This commit is contained in:
1 parent
e074b7ea98
commit
a9683a4560
10 files changed
+313
-34
No files matched your search
@@ -0,0 +1 @@
|
||||
*.sh text eol=lf
|
||||
@@ -0,0 +1,69 @@
|
||||
# Native kernel build regression
|
||||
|
||||
Build the current driver against real, prepared kernel headers and symbol
|
||||
versions. The script cleans a temporary source copy, builds all three modules
|
||||
and leaves the results for inspection. It does not install or load them.
|
||||
|
||||
```sh
|
||||
bash tests/kernel-build/build.sh /path/to/kernel/build CC=gcc-14
|
||||
```
|
||||
|
||||
Set `JOBS` to choose parallelism and `TMPDIR` to an existing directory if
|
||||
build outputs need to survive system temporary-directory cleanup.
|
||||
|
||||
Use the kernel's matching compiler and configuration. For a custom kernel,
|
||||
pass the exact output directory used to build it, including `O=...` when
|
||||
applicable. `make modules_prepare` alone does not generate `Module.symvers`;
|
||||
see the [external module build documentation](https://docs.kernel.org/kbuild/modules.html).
|
||||
|
||||
For OpenWrt wireless backports, use the separate
|
||||
[backports build check](../openwrt-backports/README.md), which supplies the
|
||||
staged wireless headers, symbol versions and `CFG80211_VERSION` together.
|
||||
|
||||
## Issue #111: Linux 7.3 on legacy-mcu1
|
||||
|
||||
The `legacy-mcu1` branch was missing `main`'s Linux 7.3 compatibility commit
|
||||
[`2c4ab4b`](https://github.com/shenmintao/aic8800d80/commit/2c4ab4b421d6a780842deeef700f23ba9ecf7578).
|
||||
The backport adapts `cfg80211_probe_status()`'s link ID, the renamed
|
||||
`probe_peer` callback, and the input cookies for probe, management TX and
|
||||
remain-on-channel operations. Completion notifications retain the cookie
|
||||
assigned by cfg80211; internal TX/RoC callers keep their driver-assigned
|
||||
cookies. The existing MCU1 firmware and loader profile are unchanged.
|
||||
|
||||
The original branch at `e074b7e` reproduces all six errors from the
|
||||
[issue's build log](https://github.com/shenmintao/aic8800d80/issues/111#issuecomment-6294321166)
|
||||
against Linux 7.3-rc3 headers: two probe-status argument errors, the renamed
|
||||
probe callback and its resulting initializer error, and incompatible
|
||||
management TX and remain-on-channel callback types.
|
||||
|
||||
## Verified on 2026-10-21
|
||||
|
||||
| Kernel/build headers | Fixed legacy-mcu1 result |
|
||||
| --- | --- |
|
||||
| Upstream Linux 7.3.0 final, x86_64 test configuration | All three modules built; MODPOST passed |
|
||||
| Ubuntu 7.3.0-070300rc3-generic headers | All three modules built; MODPOST passed |
|
||||
| Ubuntu 7.2.0-070200-generic headers | All three modules built; MODPOST passed |
|
||||
| Ubuntu 6.17.0-14-generic headers | All three modules built; MODPOST passed |
|
||||
|
||||
The final-release check uses the upstream `linux-7.3.tar.xz` source, checked
|
||||
against kernel.org's SHA-256 manifest. The test kernel enables modules,
|
||||
symbol versioning, cfg80211, USB, Bluetooth and kprobes. Both `vmlinux` and
|
||||
the in-tree modules were built with GCC 14.2.0 to generate matching headers
|
||||
and `Module.symvers` before running this script. No symbol-version or
|
||||
MODPOST checks were bypassed. All three modules report `7.3.0` vermagic and
|
||||
the same `module_layout` CRC as that kernel's `Module.symvers`.
|
||||
|
||||
The Ubuntu header checks also use GCC 14.2.0. The 7.2 and 7.3-rc3 headers
|
||||
were generated with GCC 15 and produce compiler/attribute warnings; BTF
|
||||
generation is skipped where a matching `vmlinux` is unavailable. The rc3
|
||||
`cfg80211.h` is byte-identical to the
|
||||
[upstream 7.3 final header](https://github.com/torvalds/linux/blob/v7.3/include/net/cfg80211.h).
|
||||
|
||||
These checks cover compilation and symbol resolution. They do not test the
|
||||
reporter's custom `7.3.0-lxpup64` configuration, module loading, firmware
|
||||
startup, Wi-Fi traffic or Bluetooth operation on hardware.
|
||||
|
||||
After a successful build, install only the newly built modules against the
|
||||
same kernel. Chain build and installation with `&&` so a failed build cannot
|
||||
lead to an attempt to install stale modules. MCU1 hardware should continue
|
||||
using `legacy-mcu1`.
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build a source copy against a prepared native kernel; never install or load it.
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Usage: $0 KERNEL_BUILD_DIR [make arguments...]" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
kernel_dir=$(realpath "$1")
|
||||
shift
|
||||
|
||||
for required in "$kernel_dir/Makefile" "$kernel_dir/Module.symvers" \
|
||||
"$kernel_dir/include/generated/autoconf.h"; do
|
||||
if [ ! -s "$required" ]; then
|
||||
echo "Missing build input: $required" >&2
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
repo_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
build_dir=$(mktemp -d "${TMPDIR:-/tmp}/aic8800-kernel-build.XXXXXX")
|
||||
cp -a "$repo_dir/drivers/aic8800/." "$build_dir/"
|
||||
echo "Build directory: $build_dir"
|
||||
|
||||
# Discard copied build outputs so stale modules cannot satisfy the check.
|
||||
make -C "$kernel_dir" M="$build_dir" "$@" clean
|
||||
make -C "$kernel_dir" M="$build_dir" -j"${JOBS:-2}" "$@" modules
|
||||
|
||||
for module in aic_load_fw/aic_load_fw.ko aic8800_fdrv/aic8800_fdrv.ko \
|
||||
aic_zlp_quirk/aic_zlp_quirk.ko; do
|
||||
test -s "$build_dir/$module"
|
||||
done
|
||||
|
||||
echo "All three modules built successfully in $build_dir"
|
||||
Reference in new issue
Block a user