Expand description
Radio multiplexer: shares the one physical radio among multiple clients.
Today the clients are the ULCP session and the device node. The
physical radio’s Channels bundle has a single tx_done signal, so
completion attribution breaks the moment two clients transmit. The mux
owns the real bundle and gives every client a private virtual
Channels of the same type:
- TX: requests are granted one at a time (round-robin under
contention) and forwarded to the real TX queue; the real
tx_doneresult is routed to the granting client’s owntx_done, so each client sees exactly the completions for its own requests. Once the frame is on the air every other client receives a copy of it, marked [RxOrigin::LocalTx]. A radio cannot hear itself, but the clients share one antenna, and a client that never learns what the antenna beside it emitted cannot talk to it at all. - RX: every received frame is fanned out to every client. Dual delivery is what the ULCP spec requires — frames addressed to the device identity are processed by the device itself and independently offered to host receive filtering. A client whose RX queue is full loses that frame (the same drop policy the radio runner applies to the real queue) without stalling the others.
RX fan-out continues while a transmit is in flight; only the grant of
the next TX waits for the previous completion. The runner-side
controls (DeviceControl: settings, RSSI sampling) are single-owner
device-domain state and bypass the mux entirely.
§Backhaul mode
MuxMode::set_backhaul moves the session client off the shared
medium and onto a point-to-point link with the rest of the clients:
- Receptions off the air go to the medium clients only.
- A session transmit never reaches the radio. It is handed to the
medium clients as [
RxOrigin::Backhaul], which the MAC treats as a frame heard from a neighbor and may therefore repeat. - Medium transmits are unchanged, so the session still sees everything the device puts on the air.
The device’s own repeater then carries traffic in both directions between the attached host and the mesh, which is what a bridge needs: its forwarding rules, duplicate suppression, and hop accounting all apply to the tunneled traffic instead of being reimplemented above it.
Structs§
- MuxMode
- How the mux is routing, written by whoever handles
Effect::ApplyBackhauland read by the mux as each frame is routed.
Statics§
- MUX_
MODE - The mode cell every board’s mux and session driver share.
Functions§
- radio_
mux - Run the multiplexer over the real radio
Channelsbundle.