diff --git a/src/wiphy.c b/src/wiphy.c index 4e27f0cd..3c70a381 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -109,6 +109,14 @@ const char *wiphy_get_path(struct wiphy *wiphy) return path; } +uint32_t wiphy_get_supported_bands(struct wiphy *wiphy) +{ + if (!wiphy->supported_freqs) + return 0; + + return scan_freq_set_get_bands(wiphy->supported_freqs); +} + static void wiphy_print_basic_info(struct wiphy *wiphy) { uint32_t bands; diff --git a/src/wiphy.h b/src/wiphy.h index f7cbc0ac..961e6e43 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -31,6 +31,7 @@ enum ie_rsn_cipher_suite wiphy_select_cipher(struct wiphy *wiphy, struct wiphy *wiphy_find(int wiphy_id); const char *wiphy_get_path(struct wiphy *wiphy); +uint32_t wiphy_get_supported_bands(struct wiphy *wiphy); bool wiphy_init(struct l_genl_family *in); bool wiphy_exit(void);