]> git.ipfire.org Git - network.git/commitdiff
wireless: Do not attempt DFS when reg domain is set to world
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Jun 2019 10:30:17 +0000 (10:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Jun 2019 10:30:17 +0000 (10:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.wireless

index 733a35621b3efbcbc0cd19589ebdc35063f11159..860b2dd91b00af29263a1b1714d4ac91d1eb573c 100644 (file)
@@ -555,6 +555,11 @@ wireless_supports_dfs() {
        local device="${1}"
        assert isset device
 
+       # DFS is not supported if wireless reg domain is set to world
+       if [ -n "${WIRELESS_REGULATORY_DOMAIN}" ] || [ "${WIRELESS_REGULATORY_DOMAIN}" = "00" ]; then
+               return ${EXIT_FALSE}
+       fi
+
        local phy="$(device_get_phy "${device}")"
        if ! isset phy; then
                log ERROR "Could not determine PHY for ${device}"