Repository navigation
Wi-Fi: reserve en0's unit so configd names it without waiting for IOKit quiet; first-time lines; DHCP lines name whose message it is - #8
Merged
Conversation
…OKit quiet; first-time lines; DHCP lines name whose message it is
The phone (2026-11-12 23:45): xnuhost had wlan0 from +0.1 s, but "the interface is enabled (en0 is up)" came at
+130 s (+162 s the boot before). Read in 24A446 and configd's source: InterfaceNamer names an interface at once only
when its database (NetworkInterfaces.plist) has its prefix and hardware address, or the IORegistry reserves a unit
(network-interface-unit-en on the interface or a parent); any other interface waits for IOKit quiet ("waiting for
quiet"; WaitQuietTimeout 240 s in configd's __data). en0's address is wlan0's, random while One UI is not joined, so
it changes between sessions. IOKit's one busy service is the service root (0042's lines), held by StartIOKitMatching
until driverkitd sends its dexts' personalities ("KextLog: driverkitd is active"). The iPhone's own Wi-Fi node
reserves the unit (24A446's device tree: /arm-io/apcie/pci-bridge0/centauri-alpha, network-interface-unit-en = <0>);
the nub oneios-wlan now does too (OneiOSWifi.cpp, in the net archive: no XNU source changed, no numbered patch).
The driver logs one "first ..." line each for the naming, enable (IFF_UP), the first Apple80211 request, power on,
the first scan and join request: who, the time after the driver's start, IOKit's busy count.
PC (qemu-aarch64, wifi=sim, load 12-24 on 4 CPUs, kernel.kc ee5a85d7): configd's log says "has reserved unit 0" and
"Known interface named unit = 0" before its *QUIET*; en0 named by configd at +1010 s, enabled by configd +1145 s,
wifid's first request +1350 s, first scan +1775 s (2 networks). On the PC driverkitd was done (+872 s) before
configd's InterfaceNamer started, so the PC cannot show the time saved; the phone's order is read from the new lines.
Without the fix (kernel.kc ee88c1b1): stopped by its 4200 s timeout, configd up ~1300 s, driverkitd not active, no
naming (configd's log not on the volume after the kill).
DHCP: "REQUEST of 0.0.0.0 from 0.0.0.0" was the line for a message from the radio, printing yiaddr and option 54,
which a REQUEST never has (yiaddr) or has only in SELECTING; iOS's own were "iOS sends ...". So those were INIT-REBOOT
or REBINDING broadcasts of other stations (that they were others' is a guess: the client was not logged), and they
used up the 16 lines a join gets. The decoder now reads chaddr, ciaddr, options 50 and 54 and the IP destination;
the REQUEST's state is named; another station's message is counted (the first one logged, the count in the 10 s
line); iOS's own back from the radio says so.
Tests (Linux x86_64): runtime/host-tests.sh, every part passes: loader 160, xnuhost 13328 (TESTKERNEL all passed;
drm2kgsl and udmabuf skipped: no /dev/udmabuf access), imageset 37, display 73 + 5, bridges 204, wifi 153 (21 new:
the four REQUEST forms built as clients send them, iOS's and another station's, ACK, DISCOVER, cut frames, each log
line), aidl binder 35, test-binder 38, thermal 56, audio helper 4051, camera 131, package 19. Kernel built
(HOSTED_OUT=fixwifi), prelink audit 0 failures, stubs-check 666 good. Not on the phone.
Docs: hardware.md 3 ("en0 late", the DHCP lines, test count), net/README.md ("en0's name", log lines), hosted
README 0042, series comment, bridges README, building.md 5 (PAC on the Linux PC; kill -QUIT ended a qemu boot).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
akshaynexus
added a commit
that referenced
this pull request
Nov 13, 2026
… 89 s after launchd with IOKit quiet); hosted 0061, oneios-ubt-count, to sample configd and wifid in a boot's first minutes; the next boot's lines and iOS log searches The phone (main c1223f8, kernel.kc 4b9a91ae, the reserved unit of #8): first naming by configd at +111 s after the driver's start (launchd + 89 s) with IOKit busy 0, IFF_UP by configd at +131 s, wifid's first scan at +201 s: as late as before. So in that boot InterfaceNamer did not wait for driverkitd; something else holds configd before it names en0. Read in configd's open source (plugin_support.c, ifnamer.c, prefsmon.c, main branch): the plugin thread dlopen()s the bundles that are not built in, then calls load() in its allow-list order, InterfaceNamer's first; its thread reads NetworkInterfaces.plist, opens IONetworkStack and names, while PreferencesMonitor's load() runs __SCNetworkConfigurationUpgrade; they share the SCPreferences locks. Which of these holds the phone's configd is not known yet. Hosted 0061 (osfmk/arm64/hosted/hosted_machine.c, under XNU_HOSTED like 0026): oneios-ubt-count=N stops 0026's reports after N (default 0: no end, as before); each report starts with "oneios-ubt: report K at +S s". For the next boot: oneios-ubt=configd,wifid oneios-ubt-at=20 oneios-ubt-every=10 oneios-ubt-count=18, and oneios-sysfail=configd; the threads' addresses go to oneios-tool sym. wifid's "sets 25 -> 102" is APPLE80211_IOC_HOST_AP_MODE refused with EOPNOTSUPP on purpose (kRefusedSets: the access point modes); wifid goes on (PC and phone). configd's IPConfiguration, not wifid, sets IFF_UP. wifid joins only by auto-join to a network of its known-networks store that the scan has: the searches that tell "none known in range" from a fault are in docs/hardware.md 3, "en0 late". Built: kernel HOSTED_OUT=fixwifi (1188 s, under other agents' load), prelink audit 0 failures (kernel.kc 84d3304c), kernel/prelink/stubs-check.py 666 good, 0 bad (the existing Python script: oneios-tool has no stub check). Not booted yet: the PC boot is in the box's qemu queue. Not on the phone. Docs: hardware.md 3 (the phone's result, who sets IFF_UP, the join rule, request 25, the next boot's boot arguments and lines, the ioslog searches), net/README.md (the reserved unit did not make Wi-Fi earlier), hosted README 0061, series, building.md 5 (oneios-ubt-count). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause (read in 24A446 and configd's source; the phone's order still to be confirmed)
The phone's en0 came up at +130 s, and at +162 s the boot before, even though xnuhost had wlan0 from +0.1 s. configd's InterfaceNamer (
Plugins/InterfaceNamer/ifnamer.c,copyUnitForEstablishedInterface) names an interface at once only in two cases: its naming database has the interface's prefix and hardware address, or the IORegistry reserves a unit for it (network-interface-unit-en). Any other interface counts as new and waits for IOKit quiet (waiting for quiet;WaitQuietTimeoutis 240 s in configd's__data).oneios-iobusy:lines).StartIOKitMatchingholds it busy until driverkitd has sent its dexts' personalities (KextLog: driverkitd is active)./arm-io/apcie/pci-bridge0/centauri-alphahasnetwork-interface-unit-en = <0>. Our nuboneios-wlandid not.Fix
network-interface-unit-en = <0>. This change is in the net archive (OneiOSWifi.cpp). No XNU source changed, so there is no numbered patch and 0061 is not used.ONEIOS WIFI: first ...lines cover the naming,enable (IFF_UP), the first Apple80211 request, power on, and the first scan and join requests. Each says who did it, how long after the driver's start, and IOKit's busy count at that moment.REQUEST of 0.0.0.0 from 0.0.0.0was not a wrong offset. It is the line for a message that came from the radio, and it printed yiaddr and option 54. A REQUEST never has yiaddr, and only a SELECTING one has option 54. So those lines were other stations' INIT-REBOOT or REBINDING broadcasts ([I] that they were other stations': the client address was not logged), and they used up the 16 lines a join gets. The decoder now reads chaddr, ciaddr, options 50 and 54, and the IP destination, and the log names the REQUEST's state. Another station's messages are counted: the first one is logged and the count goes in the 10 s line.Tests (Linux x86_64, 4 CPUs under a load of 12-24)
runtime/host-tests.sh: every part passes.HOSTED_OUT=fixwifi. Prelink audit: 0 failures. stubs-check: 666 good.wifi=sim, kernel.kcee5a85d7:has reserved unit 0and thenKnown interface named unit = 0.wifi=simapplies only to the Mac's container. Here the host has PAC (PAC yes).Waits for the phone
Check the order in
xnuhost.log:first naming ...: by configd[..], +S s ..., IOKit busy 1: the naming happened before driverkitd.KextLog: driverkitd is active.first enable (IFF_UP)andthe interface is enabled (en0 is up), which should now come well before +130 s.In iOS's log (
ioslog --proc configd), look forhas reserved unit 0orhas reserved unit 0, but it's not available. The full list is indocs/hardware.md3, "en0 late".🤖 Generated with Claude Code