Skip to content

Say which of the two addresses actually wakes the device - #842

Merged
chrisgleissner merged 1 commit into
GideonZ:test-mergefrom
enver-haase:fix/wol-wifi-only
Sep 4, 2026
Merged

Say which of the two addresses actually wakes the device#842
chrisgleissner merged 1 commit into
GideonZ:test-mergefrom
enver-haase:fix/wol-wifi-only

Conversation

@enver-haase

Copy link
Copy Markdown
Contributor

The description of GET /v1/info added in #827 says that ethernet_mac and wifi_mac are "what a caller sends a Wake-on-LAN magic packet to". That holds for one of the two.

The only magic packet matcher in the tree is software/u64ctrl/main/wol_magic.c, and it is reached from exactly one place, wifi_modem.c:164 on the ESP32. The setting is CFG_WAKE_ON_WIFI, "Wake On Wi-Fi", added in #815. There is nothing equivalent on the RMII side — no config item, no matcher, no caller. So a magic packet sent to ethernet_mac wakes nothing, and someone reading the current wording and building against it gets a feature that does not exist.

My fault, and I would rather fix it than leave it: I wrote that sentence.

While the paragraph is open it also gains something the code has always done but never said — only the first interface of each kind is reported, routes.cc skips any later one with if (reported[kind]) continue;.

Both OpenAPI documents are regenerated from the changed string rather than hand-edited, so make openapi_check still passes.

Verified

  • make openapi_check — 2 documents match the sources.
  • make openapi_test — 191 tests, OK.
  • make u64ii_no_esp in ghcr.io/gideonz/riscv, from a tree with every output/ and result/ under target/ removed first: exit 0, zero errors, routes.cc compiles for both the application and the updater, update.ue2 and update.cfw produced.

The companion change is GideonZ/1541u-documentation#33, which documents these fields for the first time and now says the same thing. Merging one without the other leaves the two sources disagreeing, which is what prompted this.

The description of GET /v1/info tells a caller that `ethernet_mac` and
`wifi_mac` are "what a caller sends a Wake-on-LAN magic packet to". That is
true of one of them.

The only magic packet matcher in the tree is
`software/u64ctrl/main/wol_magic.c`, and it is reached from a single place,
`wifi_modem.c:164` on the ESP32. The setting is `CFG_WAKE_ON_WIFI`, "Wake On
Wi-Fi". Nothing equivalent listens on the wired side, so a packet sent to
`ethernet_mac` wakes nothing, and a caller who reads the current wording and
builds against it gets a feature that does not exist.

The same paragraph now also states what the loop below it already does but
never said: only the first interface of each kind is reported.

The two OpenAPI documents are regenerated from this string rather than edited,
so `make openapi_check` still passes.
@chrisgleissner
chrisgleissner merged commit ac2fe90 into GideonZ:test-merge Sep 4, 2026
1 check passed
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.

2 participants