commit 1a20e37100e15d4a237b6f52c39e169e8c239699
parent 7c517b4fcfa8915f5cdd6bc4af1ea9a3b3fd45a9
Author: James Prestwood <prestwoj@gmail.com>
Date: Fri, 30 Dec 2022 14:12:13 -0800
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.
Diffstat:
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git 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
@@ -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);