Add file history to the viewer — the last remaining MC viewer gap.
open_next/open_prev push the current path to a file_history vec.
Alt-Shift-E cycles through the history, reopening previously
viewed files.
- Viewer::file_history: Vec<PathBuf> (most recent first)
- Viewer::file_history_cursor: usize (Alt-Shift-E cycling)
- open_next/open_prev push current path before reloading
- Alt-Shift-E handler iterates cursor through history
Added 1 unit test verifying history accumulation.
Tests: 1432 pass (was 1431), zero warnings.
Basic Minstrel rate adaptation, cross-referenced from Linux 7.1 mvm/rs.h + mvm/rs.c.
rb_iwl_mvm_rs_state tracks per-MCS (attempts, successes, success_ratio × 12800).
Algorithm: probe alternate rates every 10 frames, promote if success ratio exceeds
current best, select best known rate with signal-based upper bound.
Uses TX status codes from fw/api/tx.h: TX_STATUS_SUCCESS (0x01),
TX_STATUS_FAIL_SHORT_LIMIT (0x82), TX_STATUS_FAIL_LONG_LIMIT (0x83).
Wired into iwl_pcie_rx_handle() — rate_idx now comes from rs_select() which
adapts based on accumulated statistics instead of using a fixed lookup table.
When no TX statistics are available (fresh boot / no firmware feedback),
rs_select() falls through to rb_iwl_mvm_rate_to_mcs() as a cold-start default.
Support both firmware formats:
- Red Bear simple format: magic 0x0A4F5749 (IWO\n) at offset 0, version/build at 4-11
- Linux Intel TLV format: zero at offset 0, magic 0x0a4c5749 (IWL\n) at offset 4,
version string (64 bytes) at offset 8, TLVs from offset 88.
TLV type 30 (ENABLED_CAPABILITIES) now correctly parses {api_index, bitmap} pairs per
Linux 7.1 iwl-drv.c. Multiple type-30 TLVs are merged via bitmap << (api_index*16).
Verified against real firmware: iwlwifi-bz-b0-fm-c0-c101.ucode (BE201 Wi-Fi 7)
extracts api_index 0..4, 67 scan channels, version string + major version.
Add two remaining MC editor commands:
SaveSettings (CK_OptionsSaveMode): directs user to save via
F9→Options→Save setup (the filemanager-level config save).
Refresh (CK_Refresh): no-op since TLC redraws every frame.
Added 2 unit tests.
Tests: 1431 pass, zero warnings.
Add 2 keymap unit tests:
- f3_is_view_and_shift_f3_is_view_raw: verifies the MC-parity
binding (F3=View, Shift-F3=ViewRaw)
- appearance_has_nonempty_name: verifies the new Cmd::Appearance
variant has a description string
Tests: 1431 pass (was 1429), zero warnings.
Added linux_mvm.h/.c — a minimal MAC Virtualization layer cross-referenced from Linux 7.1 iwl-mvm-rxmq.c and fw/api/rx.h.
Key features:
- iwl_rx_mpdu_desc v1/v3 detection via heuristic (802.11 Frame Control vs mpdu_len)
- energy_a/energy_b extraction → dBm signal (identical to Linux 7.1 logic)
- rb_iwl_mvm_rate_to_mcs() — bounded fixed-rate lookup (stand-in for Minstrel)
- Four notification IDs defined: RX_PHY_CMD, RX_MPDU_CMD, BA_NOTIF, RX_NO_DATA
Wired into iwl_pcie_rx_handle(): if firmware sends descriptors, signal is extracted automatically. If firmware sends raw frames (current path), falls back to -42 dBm. Zero behavior change for existing raw-frame firmware.
IMPROVEMENT-PLAN.md §10.3 item 7: HIGH severity transmute audit.
mac80211.rs:469:
- RxCallback type changed from extern "C" fn to unsafe extern "C" fn
- Callback call now wrapped in unsafe { } (correct for FFI callback)
- Added SAFETY comment: explains HashMap<usize,usize> storage pattern
and why usize→fn pointer transmute is sound (same size, valid ABI)
timer.rs:202:
- Added SAFETY comment: explains Linux kernel timer callback ABI
(setup_timer/mod_timer always uses void (*)(unsigned long))
- transmute remains (necessary: usize from C → fn pointer)
Both transmutes are now documented with soundness invariants.
No actual UB was found — both transmutes were already safe.
The fix is documentation, not behavioral change.
IMPROVEMENT-PLAN.md §10.3 items 4-5: P1 Wi-Fi fixes.
Scan channels expanded from 2.4GHz-only (11 channels) to
include 5GHz UNII bands (25 channels, 36-165). Total scan
now covers 36 channels across both bands.
MAX_SCAN_CHANNELS increased from 16 to 64 to accommodate
dual-band scan.
Gap documentation added as a comment block at the file header:
- No MVM layer (iwl-mvm.c ~5200 lines)
- No firmware TLV/NVM parser
- rate_idx hardcoded to 0 (no Minstrel)
- RSSI hardcoded to -42
- No AMPDU aggregation
- No power management
- Only 7 PCI device IDs (vs Linux's ~500+)
- No 6GHz support
rate_idx and signal lines marked with TODO(REDBEAR-WIFI)
tags pointing to Linux 7.1 reference files for future porting.
Cross-referenced with Linux 7.1 iwl-mvm-rs.c, iwl-nvm-parse.c.
Phase 4 (syscall): merged upstream 0.9.0 — reservation API (openat_into/dup_into) + removed legacy syscalls. Both old and new APIs coexist for backward compatibility.
Phase 2 (kernel): added openat_into() and dup_into() handlers to fs.rs, registered SYS_OPENAT_INTO and SYS_DUP_INTO in syscall dispatch mod.rs.
Phase 1 (bootstrap): migrated initnsmgr.rs from openat_with_filter→openat_into + unlinkat_with_filter→unlinkat.
SYSCALL-MIGRATION-PLAN.md:
- Detailed analysis of upstream 0.9.0 BREAKING changes (FD reservation refactor,
removed syscalls, new *_into variants)
- Complete consumer impact catalog: 2 bootstrap call sites, 7 kernel/relibc
constant references, 26 recipes (no impact)
- 5-phase migration plan: bootstrap→kernel→relibc→syscall sync→full build
- Risk assessment with rollback procedure
- Clear migration table: old API → new API for each deprecated function/constant
- Execution order with time estimates (~1-2 days total)
NETWORKING-IMPROVEMENT-PLAN.md:
- Phase 0 updated from 'workstreams' to COMPLETE with verified upstream commits
- Added fork state table (8 components, HEADs, upstream HEADs, gaps)
- All 7 required upstream commits verified present in local forks
- syscall flagged as BREAKING (removed syscalls, FD reservation refactor)
IMPLEMENTATION-MASTER-PLAN.md:
- Added section 11: Upstream Sync Status (2026-07-07)
- Fork state table with gap analysis per component
- Key upstream changes to track: syscall breaking refactor, kernel NUMA, libredox fcntl
- Renumbered sections 11-15
Findings:
- All 8 forks at +rb0.3.0 with Red Bear changes intact
- Gaps are minor (2-3 commits each) except syscall (BREAKING)
- UPSTREAM-SYNC-PROCEDURE.md (770 lines) is comprehensive and current
- No stale plan parts to remove — all docs are active and referenced
Update the master implementation plan to reference the new
IMPROVEMENT-PLAN.md which contains the comprehensive quality
gaps found during the 2026-07-07 USB/Wi-Fi/Bluetooth audits.
Key changes:
- Added IMPROVEMENT-PLAN.md to the authoritative plans table
- Added §10 Quality Gaps section with USB/Wi-Fi/Bluetooth audit findings
- Updated §11 Execution Priority with P0/P1/P2/P3 tiers
- Cross-references Linux 7.1 source files for each improvement task
- The IMPROVEMENT-PLAN.md has detailed file:line references for every gap
This establishes the two-plan architecture:
- IMPLEMENTATION-MASTER-PLAN.md: feature work, P0 from build
- IMPROVEMENT-PLAN.md: quality work, P0 from safety
No new repositories or submodules created.
Cross-compile error: from_bits_truncate requires u8 but
O_STAT/O_RDWR are usize. Cast with 'as u8'.
Applied to all 4 scheme wrappers: acmd, ftdi, ecmd, usbaudiod.