]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/functions/functions.hostapd
wireless-ap: Allow to disable DFS in configuration
[people/ms/network.git] / src / functions / functions.hostapd
index 3f64e79b9f24cc0463ba1c551c73694d0471a705..e19f9b3f16d34103d00c9b4dcc75227439313044 100644 (file)
@@ -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; then
+                       print "ieee80211h=1"
+               else
+                       print "ieee80211h=0"
+               fi
 
                print # empty line