3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

wiphy: add wiphy_can_offload

This is a convenience method for detecting any supported offload
extended features (4way/1x/SAE).
This commit is contained in:
James Prestwood 2021-10-19 14:52:46 -07:00 committed by Denis Kenzior
parent 2b88840316
commit 747cb00c31
2 changed files with 11 additions and 0 deletions

View File

@ -459,6 +459,16 @@ bool wiphy_can_transition_disable(struct wiphy *wiphy)
return true;
}
/* Catch all for the offload features */
bool wiphy_can_offload(struct wiphy *wiphy)
{
return wiphy_has_ext_feature(wiphy,
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK) ||
wiphy_has_ext_feature(wiphy,
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X) ||
wiphy_has_ext_feature(wiphy, NL80211_EXT_FEATURE_SAE_OFFLOAD);
}
bool wiphy_supports_ext_key_id(struct wiphy *wiphy)
{
return wiphy_has_ext_feature(wiphy, NL80211_EXT_FEATURE_EXT_KEY_ID);

View File

@ -83,6 +83,7 @@ uint32_t wiphy_get_supported_bands(struct wiphy *wiphy);
const struct scan_freq_set *wiphy_get_supported_freqs(
const struct wiphy *wiphy);
bool wiphy_can_transition_disable(struct wiphy *wiphy);
bool wiphy_can_offload(struct wiphy *wiphy);
bool wiphy_supports_cmds_auth_assoc(struct wiphy *wiphy);
bool wiphy_can_randomize_mac_addr(struct wiphy *wiphy);
bool wiphy_rrm_capable(struct wiphy *wiphy);