Commit Graph

1363 Commits

Author SHA1 Message Date
vasilito 3b03e2ef5e W78: Keymap tests for Ctrl-X chords + VFS connect Cmds
Add 2 keymap test blocks:
- all_ctrl_x_chord_cmds_have_names: verifies all 21 Ctrl-X chord
  Cmd variants have nonempty description strings
- connect_cmds_have_names: verifies ConnectFtp/Shell/Sftp

Tests: 1434 pass (was 1432), zero warnings.
2026-07-08 14:58:32 +03:00
vasilito 703d6c8cea W77: Viewer file history (MC CK_History / Alt-Shift-E)
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.
2026-07-08 14:53:26 +03:00
vasilito e6fb2c40c3 stp: unicast blocking + enhanced per-iface stats (mtu, link) 2026-07-08 14:53:19 +03:00
vasilito aebca2bb50 iwlwifi: EHT rate support + firmware SEC_RT chunk protocol docs
MCS rate bounds verified against live BE201 hardware (FW v101):
  Band 1 (2.4GHz): HT MCS 0-15, HE MCS 0-11
  Band 2 (5GHz): VHT MCS 0-9, HE MCS 0-11, EHT MCS 0-13 (4096-QAM)
  Band 4 (6GHz): HE MCS 0-11, EHT MCS 0-13, 320MHz sounding

Firmware chunk loading protocol documented (Linux 7.1 iwl-drv.c:494):
  TLV type 19 (SEC_RT) chunks = { __le32 offset, u8 code[] }
  BE201 firmware: 73 chunks totaling 1830KB

PNVM structure documented: multi-SKU calibration data (289KB, 16 SKUs).
rb_iwl_mvm_rate_to_mcs() now uses EHT_MAX (13) at highest signal tier.
2026-07-08 14:52:58 +03:00
vasilito 83a30fa3c2 docs: update gap docs — Minstrel implemented, TLV verified against BE201 2026-07-08 14:35:08 +03:00
vasilito 40eb36e01a iwlwifi: Minstrel rate control — statistics accumulator + rate selection
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.
2026-07-08 14:34:43 +03:00
vasilito a849fa91f0 iwlwifi: dual-format firmware TLV parser (Red Bear + Linux Intel)
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.
2026-07-08 14:30:26 +03:00
vasilito bdb1e27816 tcp: extended TCP_INFO (cwnd, queues, MSS) 2026-07-08 14:30:15 +03:00
vasilito e85bac45f6 W76: Editor SaveSettings + Refresh (MC CK_OptionsSaveMode/CK_Refresh)
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.
2026-07-08 14:29:22 +03:00
vasilito 05ad05c4c2 Update base submodule for acpid power scheme 2026-07-08 14:04:26 +03:00
vasilito f2122cdebe netdiag: live bandwidth monitoring tool 2026-07-08 14:03:01 +03:00
vasilito f4702e714b docs: update IMPROVEMENT-PLAN — iwlwifi MVM, TLV parser, PCI table done 2026-07-08 14:01:11 +03:00
vasilito c2539f4a74 W75: Keymap tests for F3/Shift-F3 View/ViewRaw bindings
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.
2026-07-08 14:00:21 +03:00
vasilito 8958ed5a6f submodules: update kernel pointer for /scheme/sys/mem 2026-07-08 13:59:41 +03:00
vasilito 069178df95 iwlwifi: firmware TLV parser — capabilities, version, scan channels
Added rb_iwl_mvm_parse_firmware() — walks Intel firmware TLV sections cross-referenced from Linux 7.1 fw/file.h (struct iwl_ucode_tlv).

Extracts:
- IWL_UCODE_TLV_ENABLED_CAPABILITIES (type 30) — capability bitmap
- IWL_UCODE_TLV_N_SCAN_CHANNELS (type 31) — firmware channel limit
- IWL_UCODE_TLV_FW_VERSION (type 36) — human-readable version string

Wired into rb_iwlwifi_linux_prepare() — capabilities and version logged at
info level during firmware load. TLV entries are 4-byte aligned per Intel
firmware specification.
2026-07-08 13:59:39 +03:00
vasilito ecad753f5f udp: SO_REUSEADDR, SO_BROADCAST, IP_TTL socket options 2026-07-08 13:57:13 +03:00
vasilito 20c1867794 Update kernel submodule for sys mem resource 2026-07-08 13:56:05 +03:00
vasilito 947e778800 iwlwifi: mini-MVM layer with RX descriptor parsing
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.
2026-07-08 13:54:55 +03:00
vasilito 08063e4643 tlc: word completion and spell check in editor menubar 2026-07-08 13:48:42 +03:00
vasilito 3e16977dda iwlwifi: 6GHz scan channels, rate scaling, gap docs
6GHz UNII-5 (5955-6415 MHz, 93 channels) scan support. Fixed-rate MCS table (RSSI→MCS 1-9) replacing hardcoded rate_idx=0. Updated gap documentation: removed resolved AMPDU/rate items, remaining RSSI extraction blocked by MVM layer RX_MPDU_NOTIF descriptor parsing (Linux 7.1 iwl-mvm-rxmq.c).
2026-07-08 13:48:31 +03:00
vasilito bacca83ecc tun: wire scheme into event loop + SLAAC IPv6 autoconfig 2026-07-08 13:47:14 +03:00
vasilito 8d9269c717 stp: integrate BPDU (802.1D) processing into BridgeDevice 2026-07-08 13:38:48 +03:00
vasilito 5dfd4093bb base: bump (usbscsid SCSI tests) 2026-07-08 13:37:17 +03:00
vasilito dcb91e929d base: bump (TRB tests + quirks fix + Cargo.lock) 2026-07-08 13:31:03 +03:00
vasilito 726384329d base: restore networking stack from reflog + add STP module 2026-07-08 13:28:18 +03:00
vasilito 4de85daeb5 stp: add Bridge Spanning Tree Protocol module 2026-07-08 13:26:57 +03:00
vasilito f0cb2cbe49 linux-kpi: P2 transmute audit — add SAFETY comments, type safety
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.
2026-07-08 10:44:19 +03:00
vasilito 9954687c22 netcfg: expose socket set via sockets/list scheme node 2026-07-08 09:42:04 +03:00
vasilito 1cbfda3550 Wi-Fi: P2 — PCI device table expanded from 7→37 entries
Cross-referenced with Linux 7.1 iwlwifi/pcie/drv.c.

Added 30 device IDs covering the most common Intel Wi-Fi chips:
- AX200/201/210/211 (Wi-Fi 6/6E)
- BE200/202 (Wi-Fi 7)
- 9000-series: 9560, 9260, 9462
- 8000-series: 8265, 8260
- 7000-series: 7265, 7260
- 3000-series: 3165, 3168
- 6000-series: 6200, 6205, 6250, 6300
- 5000-series: 5100, 5300

Organized by generation with comments labeling each group.

Linux 7.1 has ~500+ entries; this adds the most widely-deployed
consumer chips.  Remaining gaps: Killer Wi-Fi rebrands, vPro/ePO
variants, Sandy Bridge/Ivy Bridge PCH, and older Centrino models.
2026-07-08 09:37:09 +03:00
vasilito ccb93da7ff tlc: bump version to 0.3.0 2026-07-08 01:14:36 +03:00
vasilito eeb0292572 redbear-power: consume real /scheme/coretemp and /scheme/sys/cpu sources 2026-07-08 01:14:26 +03:00
vasilito 838e17f4fa coretempd: implement per-CPU die temperature daemon 2026-07-08 01:14:16 +03:00
vasilito 207dddff9e thermald: use Redox /scheme/sys/msr for CPU temperature reads 2026-07-08 01:14:05 +03:00
vasilito 5cf66bcf3c Wi-Fi: P1 — 5GHz scan channels + gap documentation
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.
2026-07-08 00:59:46 +03:00
vasilito e6878066be submodules: update syscall and kernel pointers 2026-07-08 00:58:56 +03:00
vasilito 68f9acbcaa base: bump (bounded channels) 2026-07-08 00:54:54 +03:00
vasilito d517355619 bootstrap: fix — use openat (auto-allocate) not openat_into (requires fd reservation) 2026-07-08 00:53:36 +03:00
vasilito fcfdea1998 syscall migration: sync forks to 0.9.0 upstream + update submodule pointers
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.
2026-07-08 00:50:10 +03:00
vasilito 3787844b07 base: bump submodule to 0f533161 (BROKEN_STREAMS behavioral quirk) 2026-07-08 00:44:33 +03:00
vasilito 5d891c06ac base: bump submodule to 2c6c4302 (P1 BOS + event ring growth) 2026-07-08 00:39:22 +03:00
vasilito 7e34c4c251 docs: create comprehensive syscall migration plan
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)
2026-07-08 00:33:17 +03:00
vasilito c71dd84188 base: bump submodule to 11ef8173 (P0 usbscsid runtime panics + Xhci Send/Sync docs) 2026-07-08 00:31:36 +03:00
vasilito cab28bd2ab docs: upstream sync status — cross-reference Redox forks with master plan
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
2026-07-08 00:26:31 +03:00
vasilito c39523a574 docs: update IMPLEMENTATION-MASTER-PLAN with IMPROVEMENT-PLAN reference and quality audit integration
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.
2026-07-08 00:05:27 +03:00
vasilito 304548b741 base: bump submodule to f646e42e (P0 usbscsid .unwrap → .expect) 2026-07-07 23:59:10 +03:00
vasilito aa2185152a docs: comprehensive driver infrastructure assessment and cleanup
IMPLEMENTATION-MASTER-PLAN.md:
  - Updated Phase 2 Network Drivers to COMPLETE status
  - Added NETWORKING-IMPROVEMENT-PLAN.md to authority table
  - Comprehensive driver inventory (5 Ethernet, 7 storage, 4 USB, 4 GPU, etc.)
  - Linux 7.1 cross-references for every driver
  - Network stack completion summary (9,212 LoC, all protocols)
  - Updated e1000d/rtl8168d file statuses (was 'Truncated', now 'Complete')
  - Remaining smoltcp-dependent gaps documented

Archived stale docs:
  - C7-STATUS.md → archived/ (KF6/Plasma migration, completed)
  - BUILD-TOOLS-PORTING-PLAN.md → archived/ (superseded)
  - 0.2.5-GRAPHICS-FREEZE-PLAN.md → archived/ (version-specific)
2026-07-07 23:46:41 +03:00
vasilito 6e808741ea redbear-power: per-core governor display and Ctrl+g control 2026-07-07 22:16:27 +03:00
vasilito 596407a52d redbear-power: upower client + render/sensor/battery/dmi updates 2026-07-07 22:00:54 +03:00
vasilito 33c002d563 USB: cast O_* flags to u8 for NewFdFlags::from_bits_truncate
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.
2026-07-07 21:54:39 +03:00
vasilito 1b3b29ba91 networking: update base submodule pointer (comprehensive TCP/IP stack) 2026-07-07 21:49:35 +03:00