aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files/wps-hotplug.sh
diff options
context:
space:
mode:
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2018-12-10 17:02:27 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-02-20 13:17:11 +0100
commit2e0f41e73a93e8fa8b74f053e638f05247ee9113 (patch)
treee2b6e0633ebdae58e92575e84ea3c0108521c8ae /package/network/services/hostapd/files/wps-hotplug.sh
parent8554982e1fd0c8f25e5f154b046eb955f6af2019 (diff)
downloadupstream-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/files/wps-hotplug.sh')
-rw-r--r--package/network/services/hostapd/files/wps-hotplug.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/package/network/services/hostapd/files/wps-hotplug.sh b/package/network/services/hostapd/files/wps-hotplug.sh
index ddfd021195..d00939d769 100644
--- a/package/network/services/hostapd/files/wps-hotplug.sh
+++ b/package/network/services/hostapd/files/wps-hotplug.sh
@@ -48,7 +48,13 @@ if [ "$ACTION" = "pressed" -a "$BUTTON" = "wps" ]; then
wps_done=0
ubusobjs="$( ubus -S list wpa_supplicant.* )"
for ubusobj in $ubusobjs; do
- ubus -S call $ubusobj wps_start && wps_done=1
+ ifname="$(echo $ubusobj | cut -d'.' -f2 )"
+ multi_ap=""
+ if [ -e "/var/run/wpa_supplicant-${ifname}.conf.is_multiap" ]; then
+ ubus -S call $ubusobj wps_start '{ "multi_ap": true }' && wps_done=1
+ else
+ ubus -S call $ubusobj wps_start && wps_done=1
+ fi
done
[ $wps_done = 0 ] || wps_catch_credentials &
fi