eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 747cb00c31688c92e40ec943902753bc0cc02c5a
parent 2b88840316d189affc83a3afade01d53f523128c
Author: James Prestwood <prestwoj@gmail.com>
Date:   Tue, 19 Oct 2021 14:52:46 -0700

wiphy: add wiphy_can_offload

This is a convenience method for detecting any supported offload
extended features (4way/1x/SAE).

Diffstat:
Msrc/wiphy.c | 10++++++++++
Msrc/wiphy.h | 1+
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/wiphy.c b/src/wiphy.c @@ -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); diff --git a/src/wiphy.h b/src/wiphy.h @@ -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);