Skip to content

wifi: apple: centauri: add the AWDL interface (awdl0) - #3462

Open
m0d16l14n1 wants to merge 12 commits into
aurora-silicon:mainfrom
m0d16l14n1:feat/centauri-awdl
Open

m0d16l14n1 wants to merge 12 commits into
aurora-silicon:mainfrom
m0d16l14n1:feat/centauri-awdl

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What: add awdl0, the N1's peer-to-peer interface (AWDL), so AirDrop-like transfers to and from iPhones and Macs nearby can run from Linux userspace. The firmware runs AWDL on its interface 1. The driver opens that interface's rings, configures and starts it, joins the peers' election and channel sequence, and carries data frames as an Ethernet device. It also starts AWDL again after a sleep, follows the station's channel, and registers each peer with the channel sequence that peer advertises, and hands a peer that has been idle for 4 s back to the firmware afresh, after which a Mac's later connections were no longer lost in our runs. Values, TLV layouts and command order are the ones seen in our own traces of a working link and in over-the-air captures. Stacked on #3460 (base feat/centauri-keep-crash-record f8442a4900bf, on #3458), because a firmware fault while bringing AWDL up needs that restart path. This PR's own commits are the eight listed under Details.
Tested: J815 (MacBook Air 15" M5) with an iPhone and a MacBook Air (M4) as peers, all four directions:

  • Mac to Linux: PASS on 2026-12-02 with this head's AWDL code. 5 of 5 sends arrived, and all 6 of the Mac's connections were answered within 0.35 s, with no traffic from the kit to the Mac. The same build with the idle peer reset switched off (the head before the last commit) also delivered 2 of 2 files, but one connection was answered only after 19.6 s (the lost-SYN problem below). With the reset, that did not recur in 10 of 10 Mac connections (6 here, 4 around the sleep), a small sample.
  • iPhone to Linux: PASS on 2026-12-02 (3 uploads in the receive leg, 2 around a sleep), and in the 2026-11-28 and 2026-11-29 runs (7 files up to 140 MB, every size matched).
  • Linux to Mac: PASS on 2026-11-28; the Mac took the file.
  • Linux to iPhone: PASS in the 2026-11-28 runs 143609 and 184943 and the 2026-11-29 run 141744.
  • Sleep with awdl0 up: 5 deep suspends (2 to 190 s). AWDL restarted after each wake (resume_rc 0), and a file arrived after the wake in 4 of them; the fifth predates a userspace fix. On 2026-12-02, files from the Mac and the iPhone arrived both before and after a 30.7 s sleep.

Host tests: run-host-tests.py --only centauri 22 of 22. centauri-awdl-tests.py PASS, and 39 of 39 negative controls caught, 3 of them for the idle peer reset (a peer due on every poll, traffic ignored, an active peer evicted). The driver builds at this head with W=1 and no warnings; checkpatch --strict clean. Regression (2026-12-02): 0 failed units, 0 N1 driver errors, 0 WARN/BUG/Oops. SELinux is not built on this image.
Risk: two-way door; N1 boards on the shared transport (J813, J815 and the other T8142/T8152 boards). awdl0 exists from probe and stays down until something brings it up. NetworkManager sees it as an Ethernet port and may bring it up unless told not to (the client below ships a udev rule that marks it unmanaged). The station link shares the radio and stayed up in every run. apple_centauri.awdl_enable=0 leaves the interface out.
Not yet:

  • Other N1 boards (J813, J704 and others).
  • Sending from Linux has not been run again since the idle peer reset (the last commit closes an idle peer's TX ring and opens it again on the next frame).
  • More than one peer at a time.
  • A station on a DFS or 6 GHz channel while AWDL runs.
  • Userspace other than the client used here.

There is one unicast TX ring in total, shared by all peers, because opening a second one has faulted the firmware. One firmware fault in the runs since 2026-11-28 (mid-session, 2026-11-28) was recovered by #3460's restart; its cause is not known yet.

Details

Commits of this PR (on top of #3460):

  • wifi: apple: centauri: add the AWDL interface (awdl0):
    • Bringing awdl0 up opens interface 1's data rings in the traced order next to the shared ones (18 RX completions, 78 TX completions, 79 type 7 events). It then reads the firmware defaults, sets the address and starts the interface.
    • Election: start as top master with own metric 65 and PSF periods 110/0. Follow a peer whose election beats ours, with its timing from the frame that announced it, and become top master again 5 s after the parent goes quiet. Election, 0xfe00 and channel sequence TLVs go out at 19, 43 and 38 bytes, 0xff04 carries a (flags, channel) pair per slot, and the election and sync state are refreshed every 3.15 s.
    • Frame templates (election tree, data-path state, HT/VHT capabilities, hostname, version, service parameters) are appended to sync and master-indication frames.
    • Every peer heard is registered with the firmware. LLC/SNAP + AWDL data header are added or stripped when the firmware leaves that to the host, and RX is told apart from the station's by the interface ID in the completion footer.
    • debugfs awdl_status, awdl_peers, awdl_chanseq, awdl_arpa, awdl_service_tlvs.
  • docs: apple: centauri: document AWDL, add its host tests: the AWDL section of centauri.rst; tools/asahi/centauri-awdl-tests.py builds the AWDL helpers on the host, registered in run-host-tests.py.
  • wifi: apple: centauri: restart AWDL after a sleep: the sleep handshake stops AWDL in the firmware and nothing started it again, so after a wake awdl0 was up with no AWDL running. Start it again when awdl0 is still up, after the wake and on both refused-suspend paths; awdl_status counts the restarts.
  • wifi: apple: centauri: move AWDL to the station's channel when it joins: after a wake AWDL starts before the station rejoins and falls back to channels 6 and 149. When the station joins, follow its channel and push the new sequence (unless one was written through debugfs).
  • wifi: apple: centauri: register each AWDL peer with its own channel sequence: peers were registered with our sequence. A Mac that is idle advertises its 5 GHz channel in slots 0-2 and 9-10 and channel 6 in slot 8; registered with ours, its frames reached us while ours did not reach it. Parse each peer's channel sequence TLV (0x12, channel and operating class per slot, idle slots allowed), keep it for the last 16 peers, and register the peer with it.
  • wifi: apple: centauri: keep AWDL on the station's 5 GHz channel but slot 8: with the station on 5 GHz the sequence was 4-slot blocks of 6 and that channel, which shares only slot 8 with an idle peer. Use that channel in every slot but slot 8, which stays on channel 6.
  • wifi: apple: centauri: let awdl_chanseq go back to the station's sequence: writing station to awdl_chanseq drops a written sequence without a module reload.
  • wifi: apple: centauri: give an idle AWDL peer to the firmware afresh: a Mac opens a second connection when the file is dropped, and its SYNs were acknowledged over the air but never reached awdl0. The firmware counted them as duplicates, one per lost copy. The driver now notes unicast data to and from each peer. When a peer has had none for 4 s, the driver deletes it and adds it back at once with its own channel sequence, once per pause. awdl_status counts these resets.

Userspace used for the transfers: https://github.com/m0d16l14n1/aurora-awdl (BLE wake, mDNS on awdl0, HTTPS on the link-local address); its README has the test steps for an iPhone and a Mac.

Evidence

Tested tree, 2026-12-02: the J815 nightly 7.3.0-aurora-j815-dev (built in Docker, clang 19). Its N1 code is main fdad0c5804d8 with this PR's first seven commits (7e722b3ea360, with #3460) merged and the last commit picked on top behind a test switch. On top of that are test-only switches (an RX ring left out: off; stop/start variants: 0, both this head's behaviour), a switch for the idle peer reset (on is this head; off for the first Mac to Linux leg, on for the leg after it and the sleep), a per-interface counter selector, and station commits outside the AWDL code (an RSSI threshold monitor, #3921). The idle peer reset in this head is the tested one without its switch (always on). No centauri or Bluetooth words were on the command line; the station was on 5 GHz channel 149. The Mac's side comes from its own capture on awdl0 and its transfer log, taken during the run.

Hardware rows, 2026-12-02 (run 131914):

leg idle peer reset sent received connection answered
Mac to Linux (head before the last commit) off 2 drops from the Mac 2 of 2 files; the Mac logged both as succeeded first after 19.6 s (13th SYN copy), second in 0.04 s
Mac and iPhone to Linux (this head) on 5 from the Mac, 3 from the iPhone 10 files; the Mac logged all 5 as succeeded 6 of 6 Mac connections in 0.02-0.35 s
sleep, 30.7 s deep suspend (this head) on 1 from the Mac and 1 from the iPhone before, the same after 4 of 4 uploads; AWDL restarted 1x, resume_rc 0, station rejoined on 149 4 of 4 Mac connections in 0.05-0.23 s
PASS awdl receive-x-maci0 [continued]: 2 file(s) received; rx_action +4823 rx_frames +320 tx_mcbc +51 tx_unicast +178 ring_reuses +0 peer_holds +3007 rx_dropped +0
PASS awdl receive-x-maci1 [continued]: 10 file(s) received; rx_action +7696 rx_frames +51256 tx_mcbc +20109 tx_unicast +492 ring_reuses +1 peer_holds +6958 rx_dropped +0
PASS awdl sleep: a file before the sleep (the same session goes to sleep)
INFO awdl sleep: slept (suspended for 30.687 seconds); handshake: Alpha firmware host sleep: ret=0;Alpha ACIPC host sleep: ret=0;Alpha ACIPC host wake: ret=0;Alpha firmware host awake: ret=0;
PASS awdl sleep: a file after the wake in the same session (the receiver kept running; it republished its services after the 20 s pause)
PASS regress: no N1 driver errors since the kit started
PASS regress: 0 failed units

The kit's "no /Ask after the drop" lines in that run are a timing artifact of the test script: the tester pressed Enter a few seconds after the drop, after the Mac's /Ask had already arrived. A Mac connection attempt made while awdl0 was being restarted between legs is not counted.

Earlier tested tree (2026-11-28 to 2026-12-01): the J815 N1 test branch at f6add1dd4c18, with a debugfs selector for the firmware's per-interface counters. It is this head's AWDL code plus #3207, #3459, #3461 and #2385 (with #3136, for the Alpha sleep handshake), plus test switches left at the values this head now has as code: each peer registered with its own sequence (on), the stop/start variants (off), restart on station join (off), a fault-injection switch (off). git diff of centauri_awdl.c between this head and the test branch shows only those switches. The modules were built by the J815 test kit and loaded into the running 7.3.0-aurora-j815-dev kernel, with no centauri or Bluetooth words on the command line. Station on 5 GHz during every run.

Linux to Mac, 2026-11-28 run 143609 on the tested tree: PASS awdl send-mac: the Mac took the file (Upload framed).

Mac to Linux, 2026-11-30 (awdl_status and the Mac's own log; addresses and names removed):

PASS awdl receive-x-maca [continued]: 2 file(s) received; rx_action +9091 rx_frames +1018 tx_mcbc +93 tx_unicast +800 ring_reuses +0 peer_holds +6102 rx_dropped +0
INFO awdl x-maca: requests by time: D+0 A+5 U+5 A+121 U+121
INFO awdl receive-x-maca: unicast ping <mac>: 674 of 675 answered; gaps over 1 s: none
INFO awdl receive-x-maca: TCP round trips: handshakes 3, median 5 ms, max 5 ms; data acks 18, median 5 ms, max 11 ms; sequence 149,149,149,149,149,149,149,149,6,149,149,149,149,149,149,149
INFO awdl receive-x-maca: peer sequences: 5 heard, 4 differ from ours; peer_seq_adds=127 peer_seq_differs=126
PASS regress: no N1 driver errors since the kit started
PASS regress: 0 failed units

On the Mac both sends went from Ask to the end of the upload in 0.13 s and 0.33 s.

Sleep with awdl0 up (four earlier runs, 2026-11-28 and 2026-11-29, plus the 2026-12-02 one above); every one was a deep suspend (PM: suspend entry (deep)):

run suspended handshake after the wake file after the wake
143609 189.5 s sleep/wake ret=0 AWDL restarted 1x, resume_rc 0, station rejoined on 149, sequence followed only after a quiet pause (before the client's republish fix)
184943 48.4 s ret=0 restarted 1x, resume_rc 0 iPhone, PASS
194258 19.7 s ret=0 restarted 1x, resume_rc 0 Mac, PASS
141744 2.3 s ret=0 restarted 1x, resume_rc 0 iPhone, PASS

iPhone, 2026-11-28 (an earlier build of this branch, before the last three commits):

PASS awdl receive: 7 file(s) received; rx_action +776 rx_frames +108766 tx_mcbc +76 tx_unicast +20177 ring_reuses +0 rx_dropped +0
PASS awdl send: the iPhone took the file (Upload framed); rx_action +146 rx_frames +63 tx_mcbc +12 tx_unicast +65

The same iPhone receive and send steps passed again on the tested tree on 2026-11-28 and 2026-11-29.

Host tests at this head: run-host-tests.py --only centauri 22 of 22; centauri-awdl-tests.py PASS, --negative-controls 39 of 39 caught (among them an idle peer whose traffic is ignored and an active peer evicted, a peer sequence that is ignored, idle slots rejected, the station sequence ignored or built as 4-slot blocks, a station join ignored). make W=1 drivers/net/wireless/apple/centauri/ (clang, arm64): no warnings.

…, and data path

Add full station telemetry, channel survey, band capability reporting,
ethtool firmware version reporting, and data-path improvements:

- Parse firmware statistics reports using packed wire structures with
  compile-time layout checks: TX retries/failures and live RX/TX bitrates
  (TLV 0xf901), beacon RX/loss (TLV 0xf915), TX power and rate history
  (TLV 0xf920), per-chain RSSI and noise floor (TLV 0xf923), station
  noise (TLV 0xf908), and CCA channel survey (TLV 0xf903).
- Populate wiphy->fw_version from firmware version query and wire
  ethtool_ops.get_drvinfo = cfg80211_get_drvinfo on both T8142/T8152 and
  T6050 Wi-Fi netdevs so ethtool -i reports the running firmware version.
- Populate HT, VHT, and 2.4/5/6 GHz HE band capabilities, decode
  disconnect reason codes, apply initial firmware regulatory country hint,
  and avoid restricting channel widths absent from 20 MHz-only lists.
- Add NAPI GRO receive processing, TX in-flight cap with bypass watchdog,
  and TCP pacing shift; add Centauri driver documentation.

Signed-off-by: Nick <nekreshen@yandex.ru>
The firmware reserves a crash region in its secondary memory, which
debugfs firmware_crash reads. A restart after a firmware fault frees
that memory before anyone can read it, so the region of the firmware
that stopped is lost and the fault leaves no record of its own.

Copy the region before the restart frees anything and expose the copy
as debugfs firmware_crash_saved. The restart log says how large it was
and whether it held anything.

Signed-off-by: Nick <nekreshen@yandex.ru>
Alpha can leave execution stage 2 without raising a fault interrupt.
The link worker then only reported a disconnect and the scan worker an
aborted scan, and Wi-Fi stayed down until the module was reloaded.

When either worker finds Alpha out of stage 2 while the transport is
neither stopping nor paused, request the firmware restart.

Signed-off-by: Nick <nekreshen@yandex.ru>
The firmware faults seen on the J815 leave nothing to read: the crash
region in secondary memory is all zero after an Alpha stop, and the
restart frees the Alpha DRAM log, the only record the firmware keeps
of what it did last, together with the rest of the IPC buffers.

When fwlog_start set the log up, copy it before the restart frees it
and expose the copy as debugfs firmware_log_saved; the restart log
gives its size and the consumer and producer indices. Log the Alpha
execution stage value seen when the stop is detected, which the fault
message did not give.

Signed-off-by: Nick <nekreshen@yandex.ru>
The N1 firmware runs Apple Wireless Direct Link on its interface 1.
Register awdl0 as an Ethernet device on it, so AirDrop-style peer to
peer links to phones and Macs nearby can run from Linux userspace.

Bringing awdl0 up opens the data rings interface 1 needs next to the
shared ones (18 for receive completions, 78 for transmit completions,
79 for type 7 events), reads the firmware defaults, sets the address
and starts the interface. The values the host sends, the TLV layouts
and lengths and the order of the commands are the ones traced on a
working link and captured over the air:

- start as top master with own metric 65, PSF periods 110/0 and an
  empty general configuration TLV; follow a peer whose election beats
  ours, with its timing from the frame that announced it, and become
  top master again 5 s after the parent goes quiet;
- send the election, 0xfe00 and channel sequence TLVs at 19, 43 and
  38 bytes, and 0xff04 with a (flags, channel) pair per slot;
- re-send the election and sync state every 3.15 s;
- append the frame templates nearby peers send (election tree,
  data-path state, HT/VHT capabilities, hostname, version, service
  parameters) to sync and master-indication frames;
- take the channel sequence from the station channel (6 plus the lower
  channel of a 5 GHz 40 MHz pair, else 6 and 149), 5 GHz slots in the
  80 MHz operating class;
- register every peer heard with the firmware, open one unicast TX
  ring (a second one faulted the firmware), and add or strip the
  LLC/SNAP + AWDL data header when the firmware leaves it to the host.

Received data is told apart from the station's by the interface ID in
the completion footer. debugfs awdl_status, awdl_peers, awdl_chanseq,
awdl_arpa and awdl_service_tlvs show the state and let userspace set
the channel sequence, hostname and service responses. Module parameter
awdl_enable=0 leaves the interface out (default 1).

Signed-off-by: Nick <nekreshen@yandex.ru>
Describe what awdl0 sends and expects in the Centauri driver document
and add tools/asahi/centauri-awdl-tests.py: host builds of the AWDL
helpers (channel encoding and sequences, frame encapsulation, start
payload, sync parameters, frame templates, action frame and radiotap
parsing, parent choice and timing, peer re-add hold) with 32 negative
controls that each break one rule and must be caught.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@sithglan @gig3m, and anyone else with an N1 Mac (J813, J815, J704 or another T8142/T8152 board) and an iPhone or a Mac nearby: could you test AirDrop both ways on this branch?

  1. Build feat/centauri-awdl (or apply this PR on main); apple_centauri should register awdl0 at probe.
  2. Get the client: https://github.com/m0d16l14n1/aurora-airdrop. Its README has the steps (udev rule, two sysctls, then receive and send as root).
  3. Receive: run the receiver and share a photo or file to the Linux Mac from the phone's AirDrop row. Send: with the phone's AirDrop sheet open, send a file with send --to-model iPhone and accept it on the phone.

Please report:

  • your Mac model and the kernel commit;
  • which direction worked, and what was sent (type and rough size, no file names);
  • awdl_status from debugfs after the transfer, with MAC addresses removed;
  • any firmware fault / recovery: lines in dmesg.

A Mac as the peer, other boards, and a station on a DFS or 6 GHz channel are the parts with no result yet. On the J815 a 140 MB file arrived in about 26 s.

A sleep with the Alpha sleep handshake stops AWDL in the firmware first,
but nothing started it again: after the wake awdl0 stayed up with no AWDL
running, and every frame sent to it was dropped until userspace took the
interface down and up. A suspend refused by the -EBUSY check or by the
firmware left it the same way, and no resume callback follows those.

Start AWDL again when awdl0 is still up, after the wake and on both refused
paths, and count the restarts in awdl_status. The start pushes the stored
hostname, service TLVs and a debugfs channel sequence again.

Signed-off-by: Nick <nekreshen@yandex.ru>
The AWDL channel sequence is taken from the station when awdl0 comes up.
After a wake AWDL starts again before the station has rejoined, so it
falls back to channels 6 and 149; a station that then joins on another
5 GHz channel leaves the radio splitting its time over three channels.

When the station joins while AWDL runs and no channel sequence was set
through debugfs, follow the station again and push the new sequence if
it changed; awdl_status counts these. The host test covers the decision,
with a negative control that ignores the join.

Signed-off-by: Nick <nekreshen@yandex.ru>
@sithglan

Copy link
Copy Markdown
Contributor

Tested both ways between a MacBook Air M5 (J813 / T8142) running apple_centauri from feat/centauri-awdl (18078270b6ff, built out-of-tree against 7.3.0-aurora-j813-main+ with apple_smc_warm_reset* stubbed) and a Linux MacBook Air M1 (J313, BCM4378 brcmfmac + omdrop-awdl) as the peer, using aurora-airdrop.

  • Station channel: J813 wlp1s0f0 associated on 5 GHz channel 40 (5200 MHz, country DE). Note: because channel 40 does not match (c - 36) % 8 == 0, cen_awdl_follow_station_chanseq() fell back to 6,0,149 instead of using channel 44 (or 36), leaving only 1/16 slot overlap with the DE ch 44/6 peer (~900 ms RTT). Writing 6,44,44 to awdl_chanseq dropped 1400 B ping6 RTT on awdl0 to ~4.3 ms.
  • Send (J813 -> peer): Worked cleanly (mDNS discovery, BLE wake, TLSv1.3 /Discover, /Ask, /Upload). Sent binary payloads of ~200 KB, ~2 MB (~7 s), and ~10 MB (~24 s); all arrived intact (SHA-256 verified, 9,660 unicast TX frames, comp=9660 fail=0 bad=0).
  • Receive (peer -> J813): ~200 KB binary payload arrived in <1 s and SHA-256 verified. Larger sends (2 MB, 10 MB) from the BCM4378 peer stalled mid-upload on the sender side (known BCM4378 TX caveat; J813 RX remained healthy with 4,652 frames, rx_dropped=0).
  • dmesg: No firmware fault or recovery: lines.

awdl_status after the transfers (MACs and host label redacted):

interface=awdl0 active=1 defaults_loaded=1 mac=<SELF_MAC> bssid=00:25:00:ff:94:73
sync_addr=<PEER_MAC> distance=1 top_master=<PEER_MAC> top_metric=100 self_metric=65
following=1 adoptions=1 reverts=0 follow_fails=0 follow_rc=0 bad_sync=0 no_time=0 rx_root_us=9 rx_timed=11531 rtap_len=96 rtap_present=4840006f rtap_fallbacks=0
refreshes=438 refresh_rc=0
master_channel=6 sync_state=0 max_peers=8 fw_llc_encap=0 extra_tlvs=150 arpa=<HOST> mif_tlvs=297 svc_tlvs=135 vht_ie=14 tlv_pushes=887
rx_frames=4652 rx_decap=4648 rx_dropped=0 rx_action=11531 rx_psf=11531 rx_mif=0 tx_mcbc=267 tx_unicast=9660 tx_encap=9927 tx_queued=0 auto_peers=43 ring_reuses=0 peer_holds=1746
events=26601 sync=24256 election=0 peer=2345 last_event=0x1c last_status=0 last_peer=<PEER_MAC> last_peer_state=0 rx_peer=<PEER_MAC> rx_metric=100 rx_chan=6
ring=26 role=mcbc peer=ff:ff:ff:ff:ff:ff sub=267 comp=267 fail=0 bad=0
ring=27 role=peer peer=<PEER_MAC> sub=9660 comp=9660 fail=0 bad=0

…equence

Every peer was given to the firmware peer cache with our own channel
sequence. A peer whose sequence differs (a Mac that is idle advertises
its 5 GHz channel in slots 0-2 and 9-10 and channel 6 in slot 8) was
registered with slots in which it is on another channel. In that state
a Mac's frames reached us while ours did not reach it.

Parse the channel sequence TLV (0x12, encoding 3: a channel and an
operating class per slot, idle slots allowed) from each peer's action
frames, keep it for the last 16 peers heard, and register a peer with
its own sequence; ours stands in only until one is heard.

awdl_status counts the peers added with their own sequence and how many
of those differ from ours; awdl_peers lists each advertised sequence.
The host test parses a captured sequence with idle slots, with negative
controls that drop the sequence or reject idle slots.

Signed-off-by: Nick <nekreshen@yandex.ru>
…lot 8

With the station on the lower channel of a 5 GHz 40 MHz pair, the AWDL
channel sequence was 4-slot blocks of channel 6 and that channel
(6 6 6 6 c c c c 6 6 6 6 c c c c). The sequences Apple peers advertise
when idle have that channel in slots 0-2 and 9-10 and channel 6 in
slot 8, so the only slot both sides spend on the same channel is slot 8.
In such sessions peers fetched /Discover, and their next connection came
late or not at all.

Use the sequence the traced host also sends with a station on such a
channel: that channel in every slot but slot 8, which stays on channel 6.
The firmware takes 0xff12 and 0xff04 per slot, so nothing else changes.
Writing awdl_chanseq (e.g. "6,149,149") still gives the 4-slot blocks.

Signed-off-by: Nick <nekreshen@yandex.ru>
…ence

A write to the awdl_chanseq debugfs file fixes the channel sequence until
the module is reloaded. Accept "station" to drop that and follow the
station's channel again, so a test can compare a written sequence with
the default and then return to it without a reload.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

tested with send/receive with iPhone and Macbook Air 13 M4 (macOS, Tahoe) - working both ways, deep sleep is seems to be working also + send/receive after sleep

A Mac sending to awdl0 opens one connection to show its file, then a
second one when the file is dropped, a few seconds later. The second
connection's SYNs were acknowledged over the air but never reached
awdl0: the firmware's receive counters for the AWDL interface counted
them as duplicate MPDUs, one per lost SYN copy (13 and 12 against 13 and
13), and counted no duplicates in between. The Mac gave up after 13
copies in ~20 s, or got through on a late copy. With unicast traffic
kept flowing between the two (a ping every 200 ms) every send went
through.

The firmware seems to keep a peer's receive state while the peer stays
in its cache, and the driver never takes a peer out of it. Take an idle
peer out and put it back before its next flow: note unicast data to and
from each peer, and when a peer has had none for 4 s, delete it and add
it back at once with its own channel sequence, so the next frames meet a
fresh entry. A peer is reset once per pause. Its TX ring closes with it
and opens again on the next unicast frame to it.

awdl_status counts the resets, and among them those of the peer we
synchronize to. The host tests cover the per-peer bookkeeping.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1
m0d16l14n1 marked this pull request as ready for review December 2, 2026 12:03
@m0d16l14n1
m0d16l14n1 requested review from a team and DjDeveloperr as code owners December 2, 2026 12:03
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Merge readiness at 8dd296aa: not ready yet

Check Detail
CI at head ok 4 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 8dd296aa; a row at an earlier commit could not be compared yet (checked again on the next run)
Conflicts no merge conflicts with main: merge it in (no force push)
PR text ok Risk: two-way · N1 boards on the shared transport (J813, J815 and the other T8142/T8152 boards). awdl0 exists from probe and stays down until something brings it up. NetworkManager sees it as an Ethernet port and may bring it up unless told not to (the client below ships a udev rule that marks it unmanaged). The station link shares the radio and stayed up in every run. applecentauri.awdlenable=0 leaves the interface out.

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH at 8dd296a

Failure: Suspend can tear down an active AWDL session even when Wi-Fi refuses the suspend. In centauri_wifi_suspend(), with the existing sleep handshake enabled, wifi->connected true and awdl0 active, centauri_awdl_suspend() runs before the -EBUSY preflight. It closes the rings and clears peer state. The subsequent restart leaves the system awake but restores a fresh interface, losing the existing AWDL session. Keep AWDL intact when the preflight refuses sleep.

Failure: The advertised J815 resume path is unreachable in the exact patch stack. Both Wi-Fi PM callbacks return before reaching the new AWDL hooks when machine compatibility is apple,j815. The reported J815 run used another stack with the Alpha handshake. Align the stated resume scope and the integration so the supported path and evidence refer to the same code.

Checked: The existing AWDL production host test passed at this head. I compared the eight feature commits to their stated parent so inherited station changes were excluded.

Follow-ups: Please split the interface implementation and its PM integration into independently reviewable changes. The patch is already organized into commits that provide a starting point.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants