3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

wiphy: Add MAC randomization feature check API

This commit is contained in:
Tim Kourt 2019-01-15 19:14:54 -08:00 committed by Denis Kenzior
parent 37cfec01a2
commit 81d570572e
2 changed files with 6 additions and 0 deletions

View File

@ -275,6 +275,11 @@ bool wiphy_has_feature(struct wiphy *wiphy, uint32_t feature)
return wiphy->feature_flags & feature;
}
bool wiphy_can_randomize_mac_addr(struct wiphy *wiphy)
{
return wiphy_has_feature(wiphy, NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR);
}
bool wiphy_has_ext_feature(struct wiphy *wiphy, uint32_t feature)
{
return feature < sizeof(wiphy->ext_features) * 8 &&

View File

@ -46,6 +46,7 @@ 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_can_connect(struct wiphy *wiphy, struct scan_bss *bss);
bool wiphy_can_randomize_mac_addr(struct wiphy *wiphy);
bool wiphy_has_feature(struct wiphy *wiphy, uint32_t feature);
bool wiphy_has_ext_feature(struct wiphy *wiphy, uint32_t feature);
uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy);