@@ -3174,8 +3174,6 @@ static char **ap_ciphers_to_strv(uint16_t ciphers)
static bool ap_validate_band_channel(struct ap_state *ap)
{
struct wiphy *wiphy = netdev_get_wiphy(ap->netdev);
- const struct scan_freq_set *supported;
- const struct scan_freq_set *disabled;
uint32_t freq;
if (!(wiphy_get_supported_bands(wiphy) & ap->band)) {
@@ -3191,15 +3189,12 @@ static bool ap_validate_band_channel(struct ap_state *ap)
return false;
}
- supported = wiphy_get_supported_freqs(wiphy);
- disabled = wiphy_get_disabled_freqs(wiphy);
-
- if (!scan_freq_set_contains(supported, freq)) {
+ if (!wiphy_check_frequency(wiphy, freq, BAND_FREQ_ATTR_SUPPORTED)) {
l_error("AP hardware does not support frequency %u", freq);
return false;
}
- if (scan_freq_set_contains(disabled, freq)) {
+ if (wiphy_check_frequency(wiphy, freq, BAND_FREQ_ATTR_DISABLED)) {
l_error("AP hardware has frequency %u disabled", freq);
return false;
}