[PATCH v9 0/7] Introduce Automated Frequency Coordination (AFC) support
Allen Ye
allen.ye at mediatek.com
Mon Dec 1 03:10:35 PST 2025
This patch series introduces Automated Frequency Coordination (AFC) support
for Standard Power Devices (SPDs) operating in the 6GHz UNII-5 and UNII-7
bands. AFC is a regulatory requirement for SPDs to determine a list of
available channels and their permissible power levels.
The implementation introduces a new standalone daemon, afcd, to manage
communication with the AFC server. A client within hostapd then interacts
with afcd via a Unix socket to fetch spectrum availability and update AP
parameters accordingly. The series also includes hwsim tests for validation.
The implementation has been tested against the Wi-Fi Alliance's AFC DUT
Test Harness [0].
[0] https://github.com/Wi-FiTestSuite/AFC-DUT/tree/main
Changes since v8:
- rework afc request with internal JSON implementation
- add hwsim test case to mock afcd and AFC server
- add ctrl interface commands to dump AFC information and resend requests
- rebase on top of hostapd main branch
Changes since v7:
- fix 320MHz channel width support
- rebase on top of hostapd main branch
Changes since v6:
- do not run acs in hostapd_afc_handle_request() if the configured channel is
available in the AFC list from the coordinator
- fix possible crash in hostap_afc_disable_channels()
- add more debug log in hostapd_afc_parse_reply()
Changes since v5:
- rebased on top of hostapd main branch
Changes since v4:
- fix curl header parsing
- increase afc buffer size
- fix afc-reply.txt
- add some more error logging
- add sanity check for some afc config file data
Changes since v3:
- fix compilation errors when IEEE80211_AX is not enabled
- fix a leftover crash stopping the interface
- make sure rx buffer is null-terminated
Changes since v2:
- multiple fixes testing with AFC DUT Test Harness
Changes since v1:
- use unix socket instead of a tcp one
Changes since rfc:
- move curl connection to a dedicated afc daemon
Allen Ye (4):
JSON: Add double type support
hostapd: Expand hostapd_cli can ctrl_iface buffer size
hostapd: Support 80/160/320 MHz widths in hostapd_is_usable_chans
tests: Add AFC hwsim tests
Lorenzo Bianconi (3):
hostapd: afcd: Add AFC daemon support
hostapd: ap: Add AFC client support
hostapd: Update TPE IE according to AFC
afc/.gitignore | 1 +
afc/Makefile | 31 ++
afc/afc-reply.txt | 219 ++++++++
afc/afcd.c | 402 ++++++++++++++
hostapd/Makefile | 8 +
hostapd/config_file.c | 250 +++++++++
hostapd/ctrl_iface.c | 53 +-
hostapd/defconfig | 3 +
hostapd/hostapd.conf | 41 ++
hostapd/hostapd_cli.c | 31 +-
src/ap/afc.c | 1114 +++++++++++++++++++++++++++++++++++++++
src/ap/ap_config.c | 15 +
src/ap/ap_config.h | 46 ++
src/ap/hostapd.c | 19 +
src/ap/hostapd.h | 62 +++
src/ap/hw_features.c | 129 ++++-
src/ap/hw_features.h | 7 +
src/ap/ieee802_11.c | 53 +-
src/utils/json.c | 137 ++++-
src/utils/json.h | 3 +
tests/hwsim/test_afc.py | 253 +++++++++
21 files changed, 2805 insertions(+), 72 deletions(-)
create mode 100644 afc/.gitignore
create mode 100644 afc/Makefile
create mode 100644 afc/afc-reply.txt
create mode 100644 afc/afcd.c
create mode 100644 src/ap/afc.c
create mode 100644 tests/hwsim/test_afc.py
--
2.45.2
More information about the Hostap
mailing list