openwrt/package/network/services/hostapd/files
Raphaël Mélotte 69ce75fb12 hostapd: add fallback for WPS on stations
Up to now the WPS script triggered WPS on the stations only if it
could not trigger it successfully on any hostapd instance.

In a Multi-AP context, there can be a need (to establish a new
wireless backhaul link) to trigger WPS on the stations, regardless of
whether there is already a hostapd instance configured or not. The
current script makes it impossible, as if hostapd is running and
configured, WPS would always be triggered on hostapd only.

To allow both possibilities, the following changes are made:

- Change the "pressed" action to "release", so that we can make use of
the "$SEEN" variables (to know for how long the button was pressed).

- If the button is pressed for less than 3 seconds, keep the original
behavior.

- If the button is pressed for 3 seconds or more, trigger WPS on the
stations, regardless of the status of any running hostapd instance.

- Add comments explaining both behaviors.

- While at it, replace the usage of '-a' with a '[] && []'
construct (see [1]).

This gives users a "fallback" mechanism to onboard a device to a
Multi-AP network, even if the device already has a configured hostapd
instance running.

[1]: https://github.com/koalaman/shellcheck/wiki/SC2166

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
2021-12-27 16:32:02 +00:00
..
dhcp-get-server.sh hostapd: add support for specifying the FILS DHCP server 2021-12-10 11:33:49 +01:00
hostapd-basic.config hostapd: enable proxy-arp support for hostapd-full 2021-08-28 01:31:15 +02:00
hostapd-full.config hostapd: enable FILS support in the full config and add build feature discovery 2021-12-10 11:33:49 +01:00
hostapd-mini.config hostapd: enable proxy-arp support for hostapd-full 2021-08-28 01:31:15 +02:00
hostapd.sh hostapd: add support for specifying the FILS DHCP server 2021-12-10 11:33:49 +01:00
multicall.c
wpa_supplicant-basic.config hostapd: enable the epoll-based event loop 2020-11-23 03:02:21 +00:00
wpa_supplicant-full.config hostapd: enable FILS support in the full config and add build feature discovery 2021-12-10 11:33:49 +01:00
wpa_supplicant-mini.config hostapd: enable the epoll-based event loop 2020-11-23 03:02:21 +00:00
wpa_supplicant-p2p.config hostapd: enable FILS support in the full config and add build feature discovery 2021-12-10 11:33:49 +01:00
wpad_acl.json hostapd: run as user 'network' if procd-ujail is installed 2021-01-14 00:52:50 +00:00
wpad.init hostapd: run as user 'network' if procd-ujail is installed 2021-01-14 00:52:50 +00:00
wpad.json hostapd: run as user 'network' if procd-ujail is installed 2021-01-14 00:52:50 +00:00
wps-hotplug.sh hostapd: add fallback for WPS on stations 2021-12-27 16:32:02 +00:00