mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
wiphy: Add MAC randomization feature check API
This commit is contained in:
parent
37cfec01a2
commit
81d570572e
@ -275,6 +275,11 @@ bool wiphy_has_feature(struct wiphy *wiphy, uint32_t feature)
|
|||||||
return wiphy->feature_flags & 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)
|
bool wiphy_has_ext_feature(struct wiphy *wiphy, uint32_t feature)
|
||||||
{
|
{
|
||||||
return feature < sizeof(wiphy->ext_features) * 8 &&
|
return feature < sizeof(wiphy->ext_features) * 8 &&
|
||||||
|
@ -46,6 +46,7 @@ struct wiphy *wiphy_find(int wiphy_id);
|
|||||||
const char *wiphy_get_path(struct wiphy *wiphy);
|
const char *wiphy_get_path(struct wiphy *wiphy);
|
||||||
uint32_t wiphy_get_supported_bands(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_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_feature(struct wiphy *wiphy, uint32_t feature);
|
||||||
bool wiphy_has_ext_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);
|
uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy);
|
||||||
|
Loading…
Reference in New Issue
Block a user