Skip to content

Reinstall keeps drivers with the assign; wifipi uses the canonical extension header - #129

Merged
tinic merged 5 commits into
mainfrom
fix/reinstall-device-paths
Oct 1, 2026
Merged

tinic merged 5 commits into
mainfrom
fix/reinstall-device-paths

Conversation

@tinic

@tinic tinic commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Two beta7 defects found on the A1200 today.

1. A "Keep it" reinstall kept absolute driver paths (4d656aa). #127 fixed newly written interface files only. On a drawer-layout reinstall that keeps Devs/NetInterfaces, a DEVICE= line naming one of our drivers by absolute path into this drawer (or the one AmiNetXDuo: points at) kept opening that drawer's drivers. The Installer cannot read a file back, so InstallSameFile DEVICES (new mode of the existing helper) rewrites only such a line to AmiNetXDuo:Devs/Networks/<name>, by SameLock on the directory; everything else stays byte-identical (third-party drivers, our drivers elsewhere, relative and assign names, comments, quoting). Rule in src/tools/devicehome.c, host test devicehome_rewrites_only_ours (the lab A1200's exact file + 13 must-not-change lines). Not yet run on AmigaOS: needs codex's drawer-mode harness fix.

2. anxwifipi.device compiled against a drifted copy of anxs2ext.h (518404a, f00b33a). The fork's copy said extension version 2 and tested == 2; the library has offered 3 since 9277398 (2026-09-20, which changed only the RX_BATCH record, not AnxdS2Extension). So every wifipi since 09-20 declined the extension and ran the plain receive path. Now: the tree's include/ first for wifipi; the fork's copy deleted and the driver accepts versions 2..3 like netdev_extension.c:11-12 (WiFiPi maint/beta4 6594680); check-anxs2ext-abi.cmake pins AnxdS2Extension offsets 0/2/4/8/12/16/20 and size 24. Layout identical under both headers; packet.c codegen identical.

Effect to validate on hardware: wifipi now accepts RX_DIRECT/RX_LINK_HDR/RX_VERIFIED, a path that has never run under -mregparm. The A1200 Wi-Fi 49.5 Mbit/s figure was the fallback path; the final-archive hardware pass must re-measure it.

tools/check-call-abi.sh: files=1831 findings=0.

🤖 Generated with Claude Code

tinic and others added 5 commits October 1, 2026 04:31
fa671b0 made a drawer install write DEVICE=AmiNetXDuo:Devs/Networks/
for its drivers, but only for files it writes.  A reinstall that
answers "Keep it" leaves the old DEVICE=SYS:AmiNetXDuo/Devs/Networks/
anxnet.device in place (the lab A1200's file), and that drawer goes on
opening the old drawer's drivers under a library from wherever the
assign points next.

The Installer cannot read a line back, so InstallSameFile gains a
DEVICES mode: for each kept file in drawer layout it rewrites a DEVICE
line only when it names anxnet/anxgenet/anxwifipi/anxzz9000.device by
an absolute path whose directory is, by SameLock, this drawer's
Devs/Networks or the one AmiNetXDuo: still names.  Only the value
changes; spacing, quotes, comments, other pairs and every other line
stay byte-identical.  A third-party driver, one of ours elsewhere, a
relative name, a commented line or an escaped quoted value is left
alone.  The file is replaced through .new.info/.old.info as NetPrefs
does, and a volume that is not mounted raises no requester.

The rule is pure text in devicehome.c, covered on the host by
test_devicehome (ctest devicehome_rewrites_only_ours).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
third_party/wifipi carries include/aminetxduo/anxs2ext.h, a hand-kept
copy that src/wifipi/CMakeLists.txt put first.  #126's callback pin
reached the driver only when #128 patched the copy, and the copy still
says ABI version 2: the driver tests Version == ANXD_S2_ABI_VERSION,
the library sends 3 (9277398), so every open declined the extension
and the single-copy receive never ran.

The tree's include/ now comes first, so the driver reads the one
header the library is built from.  v2 to v3 changed only the
ANXD_CMD_RX_BATCH record (Version/Size prefix), which the driver does
not implement; the AnxdS2Extension prefix it reads is identical, and
check-anxs2ext-abi now pins those offsets (0/2/4/8/12/16/20, size 24)
for every version from MIN on.  Codegen against the pinned toolchain:
packet.c is instruction-identical, device.c differs only in the
version constant (2 -> 3).

Effect: anxwifipi.device accepts RX_DIRECT, RX_LINK_HDR and
RX_VERIFIED from the library and the direct receive path runs for the
first time since 2026-09-20, with no hardware run yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WiFiPi maint/beta4 6594680 deletes its copy of anxs2ext.h, builds
against ours, and accepts extension versions 2..3 as netdev_extension.c
does, instead of exactly its copy's 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
replace_file() renamed a fresh file into place, so a kept interface
file lost its protection bits and filenote.  They are copied from the
original onto the new file before the rename; a file that cannot be
examined is replaced as before.  devicehome.h named CheckNetConfig as
a user; only InstallSameFile and its host test link it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new host test registers on every host: 494 expected, 466 on
darwin-arm64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tinic
tinic merged commit 10df49d into main Oct 1, 2026
42 of 43 checks passed
@tinic
tinic deleted the fix/reinstall-device-paths branch October 1, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant