X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Fnetwork.git;a=blobdiff_plain;f=src%2Ffunctions%2Ffunctions.hostapd;h=b8559947d81ef56dd751467b9bef1df4fd97cec2;hp=3f64e79b9f24cc0463ba1c551c73694d0471a705;hb=dc6d97fbf2064365f5b84496a77227b4e3ca03d6;hpb=6c26292250e14cf4efbc9eb8f2ace430677c749d diff --git a/src/functions/functions.hostapd b/src/functions/functions.hostapd index 3f64e79b..b8559947 100644 --- a/src/functions/functions.hostapd +++ b/src/functions/functions.hostapd @@ -36,6 +36,7 @@ hostapd_config_write() { local broadcast_ssid local channel local country_code="$(wireless_get_reg_domain)" + local dfs="on" local encryption local key local mode @@ -50,6 +51,9 @@ hostapd_config_write() { --channel=*) channel=$(cli_get_val "${1}") ;; + --dfs=*) + dfs="$(cli_get_val "${1}")" + ;; --encryption=*) encryption=$(cli_get_val "${1}") ;; @@ -177,7 +181,11 @@ hostapd_config_write() { print "ieee80211d=1" # Enable Radar Detection - print "ieee80211h=1" + if enabled dfs && wireless_supports_dfs "${device}"; then + print "ieee80211h=1" + else + print "ieee80211h=0" + fi print # empty line