hostapd: add DPP ucode API for external frame handling master
authorFelix Fietkau <nbd@nbd.name>
Tue, 3 Feb 2026 19:13:24 +0000 (19:13 +0000)
committerFelix Fietkau <nbd@nbd.name>
Sat, 7 Feb 2026 09:27:57 +0000 (09:27 +0000)
commit09de75950678db1d41aeb5840b41af432a4d4163
tree45c5663ecb2d43d6827fcb77748b9515ed9277dd
parent68c2ab8f5fdf1c12966fa0cdf3c13d889beccdbe
hostapd: add DPP ucode API for external frame handling

Add a ucode API to hostapd and wpa_supplicant for external DPP frame
handling. This allows an external controller to intercept DPP frames
and handle the DPP protocol externally.

The API provides:
- RX callbacks (dpp_rx_action, dpp_rx_gas) called when DPP frames are
  received, allowing external handling before internal processing
- TX methods (dpp_send_action, dpp_send_gas_resp/dpp_send_gas_req) for
  transmitting DPP frames
- A ubus channel-based API (dpp_channel) for bidirectional communication
  with exclusive hook registration per interface
- CCE control for hostapd (set_cce method)

The wpa_supplicant API mirrors hostapd but adapted for STA role:
- Uses tx_gas_req instead of tx_gas_resp
- GAS RX provides full frame instead of parsed query
- No CCE control (AP-only feature)

Both implementations include:
- Timeout handling with automatic channel disconnect after 3 failures
- Hook cleanup on interface removal
- Last-caller-wins semantics for hook registration

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/files/hostapd.uc
package/network/services/hostapd/files/wpa_supplicant.uc
package/network/services/hostapd/patches/161-wpa_supplicant-avoid-stopping-DPP-chirp-when-offchan.patch [new file with mode: 0644]
package/network/services/hostapd/patches/601-ucode_support.patch
package/network/services/hostapd/src/src/ap/ucode.c
package/network/services/hostapd/src/src/ap/ucode.h
package/network/services/hostapd/src/wpa_supplicant/ucode.c
package/network/services/hostapd/src/wpa_supplicant/ucode.h