Message ID | 20221230221216.2985011-1-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/4] wiphy: add wiphy_get_frequency_info_list | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-alpine-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-gitlint | success | GitLint |
prestwoj/iwd-ci-fetch | success | Fetch PR |
prestwoj/iwd-alpine-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-alpine-ci-build | success | Build - Configure |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-alpine-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
Hi James, On 12/30/22 16:12, James Prestwood wrote: > Gets the entire list of frequency attributes advertised. This is > needed for AP mode to create a country IE which includes subband > triplet fields. > --- > src/wiphy.c | 17 +++++++++++++++++ > src/wiphy.h | 5 +++++ > 2 files changed, 22 insertions(+) > All applied, thanks. Regards, -Denis
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);