Skip to content

virtio-net: virtio_net_wifi=1 shows en0 to iOS as Wi-Fi (Scion's Network setting) - #20

Merged
dylanneve1 merged 2 commits into
mainfrom
avf/net-wifi
Oct 23, 2026
Merged

dylanneve1 merged 2 commits into
mainfrom
avf/net-wifi

Conversation

@dylanneve1

Copy link
Copy Markdown
Collaborator

Guest side of Scion's AVF Network setting (Scion-Project/scion#122, merged). That setting gives the VM a virtio-net-pci card on Android's VM tethering.

  • bsd/dev/redwood_virtio_net.c: with boot-arg virtio_net_wifi=1 the virtio link is a radio (wireless). redwood_net then makes RedwoodWLAN's IOKit entries, and Apple80211 ioctls are answered by redwood_apple80211.c, as on the phone's ath11k. A virtual station behind the station boundary (sys/redwood_sta.h) hears one open network, "Scion" (virtio_net_ssid= changes the name), on channel 6. It joins it as a standing network at boot and again whenever Wi-Fi is turned back on, and only then reports link up. configd should then make a Wi-Fi service and run DHCP itself.
  • redwood_apple80211.c: AUTH_TYPE reports open system, not WPA2, for a network whose beacon has no RSN element.
  • avf/scion/avf.properties: virtio_net_wifi=1. It does nothing without a card, so install 2 is unchanged while Network is off.
  • avf/qemu-scfb.sh: NET=1 (virtio-net-pci + -netdev user, Wi-Fi presentation) and NET=wired.

Status: CI builds it (xnu-linux). Not yet booted on the phone or on QEMU: the phone lock was held for the whole session and there's no system.apfs on the Mac. Without the boot-arg nothing changes. Expected console lines: net: virtio network device on ..., net: en0 attached on a virtio network device (a radio), net: en0 is a radio (virtio_net_wifi=1): one open network, "Scion", joined at the start, then apple80211: the station says: ....

🤖 Generated with Claude Code

dylanneve1 and others added 2 commits October 23, 2026 12:17
…en network

A station of redwood_virtio_net.c's own stands behind the station boundary
(sys/redwood_sta.h): it hears one open network ("Scion", or virtio_net_ssid=),
joins it at the start and whenever iOS asks, and only then lets frames pass.
The link is a radio (wireless), so RedwoodWLAN's registry entries are made,
configd makes a Wi-Fi network service and runs DHCP by itself, and wifid and
Settings see a joined network, as with the phone's ath11k.

apple80211: AUTH_TYPE answers open system without WPA2 for a network whose
beacon has no RSN element.

avf/scion/avf.properties: virtio_net_wifi=1 (inert without a network card,
which Scion adds with its Network setting).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…work (virtio_net_wifi=1), NET=wired without

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dylanneve1
dylanneve1 merged commit 42909cf into main Oct 23, 2026
1 check passed
@dylanneve1
dylanneve1 deleted the avf/net-wifi branch November 2, 2026 01:54
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