Update Wi-Fi assessment and linux-kpi wireless layer findings

- WIFI-IMPLEMENTATION-PLAN.md: add comprehensive linux-kpi wireless
  layer assessment confirming headers are real (not stubs), 2770 lines
  Rust impl, no TODO/FIXME/STUB markers in wireless code
- LOWLEVEL-INFRASTRUCTURE-REASSESSMENT: update linux-kpi verdict from
  'structurally complete' to 'verified real', update Wi-Fi verdict with
  linux-kpi sufficiency note, add assessment finding #7
This commit is contained in:
2026-06-08 18:26:29 +03:00
parent 7177a263bf
commit 072274526f
2 changed files with 49 additions and 2 deletions
@@ -27,9 +27,9 @@ This document is a **code-grounded reassessment** of four interdependent low-lev
| **PCI enumeration** | Userspace-only (correct), pcid complete | No |
| **Driver binding** | Manual class-code matching, no ACPI _HID/_CID | Partial — limited device coverage |
| **redox-driver-sys** | Production quality, zero stubs | No |
| **linux-kpi** | Structurally complete for GPU+Wi-Fi | No |
| **linux-kpi** | **Verified real** for Wi-Fi: 2770 lines Rust impl, no stubs | No |
| **GPU drivers** | Compile-only, synthetic EDID everywhere | **Yes** — no real display detection |
| **Wi-Fi** | Compile+host-test only | Yes — no HW validation |
| **Wi-Fi** | Compile+host-test only, **linux-kpi wireless layer verified real** | Yes — no HW validation; linux-kpi headers/impl sufficient for driver compilation |
| **USB** | xhcid only, no EHCI/UHCI/OHCI | **Yes** — legacy USB keyboards unreachable |
### What changed since last assessment (2026-05-20)
@@ -40,6 +40,7 @@ This document is a **code-grounded reassessment** of four interdependent low-lev
4. **APIC timer disabled** (`local_apic.rs:81`) — not flagged in any existing plan as a blocker.
5. **Synthetic EDID used in all GPU drivers** — blocks real display detection on bare metal.
6. **40 total TODOs** in ACPI code (16 kernel + 24 userspace) — higher than previously documented.
7. **linux-kpi wireless layer verified real** (2026-06-08): Comprehensive code audit confirmed all Wi-Fi headers (`cfg80211.h`, `mac80211.h`, `netdevice.h`, `skbuff.h`) are real implementations backed by 2770 lines of Rust code (`wireless.rs` 1002 lines, `mac80211.rs` 959 lines, `net.rs` 809 lines). No TODO/FIXME/STUB markers found in wireless code. The `amdgpu_stubs.h` stub file is GPU-specific and does not affect Wi-Fi.
---
+46
View File
@@ -81,6 +81,52 @@ Without real hardware + firmware:
The code reports these states honestly (timeout, no results) rather than fabricating success.
Hardware runtime validation is the required next gate.
### Linux-KPI Wireless Layer Assessment (2026-06-08)
A comprehensive code-level assessment of the `linux-kpi` wireless/networking compatibility
layer confirmed that the headers and Rust implementations are **real code, not stubs**.
#### Header Completeness
| Header | Lines | Status | Detail |
|--------|-------|--------|--------|
| `net/cfg80211.h` | 140 | **REAL** | Full struct definitions + extern fns. Backed by `rust_impl/wireless.rs` (1002 lines) |
| `net/mac80211.h` | 122 | **REAL** | ieee80211_hw/ops/sta/vif + full extern fns. Backed by `rust_impl/mac80211.rs` (959 lines) |
| `linux/ieee80211.h` | 27 | **MINIMAL** | Types only: ieee80211_channel, ieee80211_rate, IEEE80211_MAX_SSID_LEN |
| `linux/nl80211.h` | 31 | **MINIMAL** | Enums only: nl80211_iftype, band, commands. No netlink runtime dependency |
| `linux/netdevice.h` | 51 | **REAL** | Full struct net_device, napi_struct + all extern fns. Backed by `rust_impl/net.rs` |
| `linux/skbuff.h` | 46 | **REAL** | Full struct sk_buff, sk_buff_head + queue/buffer fns. Backed by `rust_impl/net.rs` |
| `linux/types.h` | 69 | **REAL** | Kernel types: u8/u16/u32/u64, atomic_t, gfp_t, __le16/__be16 |
| `linux/device.h` | 33 | **MINIMAL** | Basic device/driver structs + devm_kzalloc/kfree externs |
Total Rust implementation: **2770 lines** across `wireless.rs` (1002), `mac80211.rs` (959),
`net.rs` (809). All implementations include comprehensive unit tests.
#### Findings
- **No TODO/FIXME/STUB markers** in any wireless/networking header or Rust implementation
- **No `.c` implementation files** — all implementation is Rust, consistent with the project's
Rust-first policy for system infrastructure
- **`nl80211.h` is minimal by design** — it provides constants for driver capability
advertisement, not runtime netlink protocol handling (which is a kernel-to-userspace concern
that Red Bear's native control plane replaces)
- **The `amdgpu_stubs.h` file** (143 lines of GPU stubs) is GPU-specific and does not affect Wi-Fi
#### Gaps and Limitations
- No `wpa_supplicant`, `iwd`, `hostapd`, `iw`, or `wireless-tools` recipes exist — the native
`redbear-wifictl` + `redbear-netctl` stack replaces them entirely
- No NetworkManager or D-Bus Wi-Fi surface (Phase W6, future)
- Security scope is open + WPA2-PSK only. WPA3, 802.1X, AP mode, roaming, monitor mode are out
of scope for Phase W4
#### Readiness Verdict
The linux-kpi wireless compatibility layer is **sufficient for the bounded iwlwifi transport port
to compile and link**. The header layer provides real struct definitions and function APIs, backed
by 2770 lines of tested Rust implementation. The remaining gap is real hardware + firmware
validation, not header or API completeness.
## Architecture
### Subsystem Boundaries