]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/functions/functions.hostapd
wireless-ap: Enable ACS only for ath* devices
[people/ms/network.git] / src / functions / functions.hostapd
index 57f8c1e4fc470803555f98f3f2a5f543904ac0cf..9024ab25aea538adfc8234fda9d2dea4a0b5b57c 100644 (file)
@@ -111,6 +111,12 @@ hostapd_config_write() {
                assert isset key
        fi
 
+       # With channel 0, ACS must be supported
+       if [ ${channel} -eq 0 ] && ! wireless_supports_acs "${device}"; then
+               error "ACS requested, but not supported by ${device}"
+               return ${EXIT_ERROR}
+       fi
+
        # Check channel bandwidth for validity
        if isset channel_bandwidth && ! wireless_channel_bandwidth_is_valid "${mode}" "${channel_bandwidth}"; then
                error "Invalid channel bandwidth for ${mode}: ${channel_bandwidth}"