[PATCH v11 0/7] Introduce Automated Frequency Coordination (AFC) support

Allen Ye allen.ye at mediatek.com
Thu Apr 2 02:53:49 PDT 2026


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 v10:
- fix compile warning
- fix memory leak when building afc request
- add bandwidth 320 afc testcase in hwsim test
- rebase on top of hostapd main branch
Changes since v9:
- add afc event for EasyMesh spec 8.2.5 requirements
- fix Wsign-compare
- rebase on top of hostapd main branch
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 and 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                       | 1122 ++++++++++++++++++++++++++++
 src/ap/ap_config.c                 |   15 +
 src/ap/ap_config.h                 |   46 ++
 src/ap/hostapd.c                   |   24 +
 src/ap/hostapd.h                   |   58 ++
 src/ap/hw_features.c               |  128 +++-
 src/ap/hw_features.h               |    7 +
 src/ap/ieee802_11.c                |   53 +-
 src/common/wpa_ctrl.h              |    3 +
 src/utils/json.c                   |  137 +++-
 src/utils/json.h                   |    3 +
 tests/hwsim/example-hostapd.config |    1 +
 tests/hwsim/test_afc.py            |  335 +++++++++
 23 files changed, 2899 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.43.0




More information about the Hostap mailing list