diff mbox series

[2/2] hostapd: remove ieee80211v option

Message ID 20201020223326.388456-2-mail@david-bauer.net
State Accepted
Delegated to: David Bauer
Headers show
Series [1/2] hostapd: make rrm report independent of ieee80211k setting | expand

Commit Message

David Bauer Oct. 20, 2020, 10:33 p.m. UTC
Remove the ieee80211v option. It previously was required to be enabled
in order to use time_advertisement, time_zone, wnm_sleep_mode and
bss_transition, however it didn't enable any of these options by default.

Remove it, as configuring these options independently is enough.

This change does not influence the behavior of any already configured
setting.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 .../network/services/hostapd/files/hostapd.sh | 20 ++++++-------------
 1 file changed, 6 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 39a175fdb1..ffdbdd9831 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -619,20 +619,12 @@  hostapd_set_bss_options() {
 		append bss_conf "iapp_interface=$ifname" "$N"
 	}
 
-	json_get_vars ieee80211v
-	set_default ieee80211v 0
-	if [ "$ieee80211v" -eq "1" ]; then
-		json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition
-
-		set_default time_advertisement 0
-		set_default wnm_sleep_mode 0
-		set_default bss_transition 0
-
-		append bss_conf "time_advertisement=$time_advertisement" "$N"
-		[ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N"
-		append bss_conf "wnm_sleep_mode=$wnm_sleep_mode" "$N"
-		append bss_conf "bss_transition=$bss_transition" "$N"
-	fi
+	json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition
+
+	[ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N"
+	[ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N"
+	[ -n "$wnm_sleep_mode" ] && append bss_conf "wnm_sleep_mode=$wnm_sleep_mode" "$N"
+	[ -n "$bss_transition" ] && append bss_conf "bss_transition=$bss_transition" "$N"
 
 	json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report
 	set_default ieee80211k 0