openwrt-mirror/package
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
..
base-files base-files: upgrade: fix efi partitions size calculation 2021-12-27 13:51:41 +01:00
boot arm-trusted-firmware-bcm63xx: add ATF for Broadcom devices 2021-12-24 22:42:03 +01:00
devel gdb: Make only full gdb depend on libgmp 2021-11-07 18:32:21 +01:00
firmware linux-firmware: amd: consolidate amd's linux-firmware entries 2021-12-27 13:51:41 +01:00
kernel kernel: mac80211: refresh patchset 2021-12-24 22:15:50 +00:00
libs tcpdump: libpcap: Remove http://www.us.tcpdump.org mirror 2021-12-27 00:49:08 +01:00
network hostapd: add fallback for WPS on stations 2021-12-27 16:32:02 +00:00
system procd: update to git HEAD 2021-12-20 02:23:47 +00:00
utils otrx: update to the latest master 2021-12-13 13:48:08 +01:00
Makefile build: fix opkg install step for large package selection 2021-05-12 11:13:53 +02:00