diff options
author | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2018-12-10 17:02:27 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2019-02-20 13:17:11 +0100 |
commit | 2e0f41e73a93e8fa8b74f053e638f05247ee9113 (patch) | |
tree | e2b6e0633ebdae58e92575e84ea3c0108521c8ae /package/network/services/hostapd/src | |
parent | 8554982e1fd0c8f25e5f154b046eb955f6af2019 (diff) | |
download | upstream-2e0f41e73a93e8fa8b74f053e638f05247ee9113.tar.gz upstream-2e0f41e73a93e8fa8b74f053e638f05247ee9113.tar.bz2 upstream-2e0f41e73a93e8fa8b74f053e638f05247ee9113.zip |
hostapd: add Multi-AP patches and config options
Cherry-pick Multi-AP commits from uptream:
9c06f0f6a hostapd: Add Multi-AP protocol support
5abc7823b wpa_supplicant: Add Multi-AP backhaul STA support
a1debd338 tests: Refactor test_multi_ap
bfcdac1c8 Multi-AP: Don't reject backhaul STA on fronthaul BSS
cb3c156e7 tests: Update multi_ap_fronthaul_on_ap to match implementation
56a2d788f WPS: Add multi_ap_subelem to wps_build_wfa_ext()
83ebf5586 wpa_supplicant: Support Multi-AP backhaul STA onboarding with WPS
66819b07b hostapd: Support Multi-AP backhaul STA onboarding with WPS
8682f384c hostapd: Add README-MULTI-AP
b1daf498a tests: Multi-AP WPS provisioning
Add support for Multi-AP to the UCI configuration. Every wifi-iface gets
an option 'multi_ap'. For APs, its value can be 0 (multi-AP support
disabled), 1 (backhaul AP), 2 (fronthaul AP), or 3 (fronthaul + backhaul
AP). For STAs, it can be 0 (not a backhaul STA) or 1 (backhaul STA, can
only associate with backhaul AP).
Also add new optional parameter to wps_start ubus call of
wpa_supplicant to indicate that a Multi-AP backhaul link is required.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'package/network/services/hostapd/src')
-rw-r--r-- | package/network/services/hostapd/src/wpa_supplicant/ubus.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/package/network/services/hostapd/src/wpa_supplicant/ubus.c b/package/network/services/hostapd/src/wpa_supplicant/ubus.c index d4ed8e222a..5fdb57be7a 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ubus.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ubus.c @@ -96,6 +96,15 @@ wpas_bss_get_features(struct ubus_context *ctx, struct ubus_object *obj, } #ifdef CONFIG_WPS +enum { + WPS_START_MULTI_AP, + __WPS_START_MAX +}; + +static const struct blobmsg_policy wps_start_policy[] = { + [WPS_START_MULTI_AP] = { "multi_ap", BLOBMSG_TYPE_BOOL }, +}; + static int wpas_bss_wps_start(struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req, const char *method, @@ -103,8 +112,15 @@ wpas_bss_wps_start(struct ubus_context *ctx, struct ubus_object *obj, { int rc; struct wpa_supplicant *wpa_s = get_wpas_from_object(obj); + struct blob_attr *tb[__WPS_START_MAX], *cur; + int multi_ap = 0; + + blobmsg_parse(wps_start_policy, __WPS_START_MAX, tb, blobmsg_data(msg), blobmsg_data_len(msg)); + + if (tb[WPS_START_MULTI_AP]) + multi_ap = blobmsg_get_bool(tb[WPS_START_MULTI_AP]); - rc = wpas_wps_start_pbc(wpa_s, NULL, 0); + rc = wpas_wps_start_pbc(wpa_s, NULL, 0, multi_ap); if (rc != 0) return UBUS_STATUS_NOT_SUPPORTED; |