]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/functions/functions.wireless
hostapd: Disable DFS automatically when not supported by hardware
[people/ms/network.git] / src / functions / functions.wireless
index 3608e1195c2c496bccdfdb9e83b918840a95b297..221866ec63342056034a178c1e5df24262baa130 100644 (file)
@@ -515,3 +515,16 @@ wireless_get_vht_caps() {
 
        network-phy-list-vht-caps "${phy}"
 }
+
+wireless_supports_dfs() {
+       local device="${1}"
+       assert isset device
+
+       local phy="$(device_get_phy "${device}")"
+       if ! isset phy; then
+               log ERROR "Could not determine PHY for ${device}"
+               return ${EXIT_ERROR}
+       fi
+
+       phy_supports_dfs "${phy}"
+}