diff --git a/src/wiphy.c b/src/wiphy.c index 3812256b..37e5ba54 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -450,6 +450,21 @@ bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss, return true; } +bool wiphy_can_transition_disable(struct wiphy *wiphy) +{ + /* + * WPA3 Specification version 3, Section 2.2: + * A STA shall not enable WEP and TKIP + */ + if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_CCMP)) + return false; + + if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP)) + return false; + + return true; +} + bool wiphy_supports_cmds_auth_assoc(struct wiphy *wiphy) { return wiphy->support_cmds_auth_assoc; diff --git a/src/wiphy.h b/src/wiphy.h index 2a38860f..3361a849 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -80,6 +80,7 @@ const struct scan_freq_set *wiphy_get_supported_freqs( const struct wiphy *wiphy); bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss, bool fils_hint); +bool wiphy_can_transition_disable(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);