wiphy: add wiphy_get_frequency_info_list

Gets the entire list of frequency attributes advertised. This is
needed for AP mode to create a country IE which includes subband
triplet fields.
This commit is contained in:
James Prestwood 2022-12-30 14:12:13 -08:00 committed by Denis Kenzior
parent 7c517b4fcf
commit 1a20e37100
2 changed files with 22 additions and 0 deletions

View File

@ -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;

View File

@ -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);