diff --git a/src/wiphy.c b/src/wiphy.c index 4ff3085a..9ca651f4 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -526,6 +526,23 @@ const struct band_freq_attrs *wiphy_get_frequency_info( return attr; } +const struct band_freq_attrs *wiphy_get_frequency_info_list( + const struct wiphy *wiphy, + enum band_freq band, + size_t *size) +{ + struct band *bandp; + + bandp = wiphy_get_band(wiphy, band); + if (!bandp) + return NULL; + + if (size) + *size = bandp->freqs_len; + + return bandp->freq_attrs; +} + bool wiphy_band_is_disabled(const struct wiphy *wiphy, enum band_freq band) { struct band_freq_attrs attr; diff --git a/src/wiphy.h b/src/wiphy.h index 1056ac0c..d5d1cc8f 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -104,6 +104,11 @@ const struct scan_freq_set *wiphy_get_supported_freqs( const struct band_freq_attrs *wiphy_get_frequency_info( const struct wiphy *wiphy, uint32_t freq); +const struct band_freq_attrs *wiphy_get_frequency_info_list( + const struct wiphy *wiphy, + enum band_freq band, + size_t *size); + bool wiphy_band_is_disabled(const struct wiphy *wiphy, enum band_freq band); bool wiphy_supports_probe_resp_offload(struct wiphy *wiphy);