* Re: [PATCH v2 1/2] wiphy: add wiphy_can_offload
@ 2021-10-19 22:05 Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-10-19 22:05 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
Hi James,
On 10/19/21 4:52 PM, James Prestwood wrote:
> This is a convenience method for detecting any supported offload
> extended features (4way/1x/SAE).
> ---
> src/wiphy.c | 11 +++++++++++
> src/wiphy.h | 1 +
> 2 files changed, 12 insertions(+)
>
All applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 1/2] wiphy: add wiphy_can_offload
@ 2021-10-19 21:52 James Prestwood
0 siblings, 0 replies; 2+ messages in thread
From: James Prestwood @ 2021-10-19 21:52 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
This is a convenience method for detecting any supported offload
extended features (4way/1x/SAE).
---
src/wiphy.c | 11 +++++++++++
src/wiphy.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/src/wiphy.c b/src/wiphy.c
index 1a333aad..4d740ba3 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -459,6 +459,17 @@ 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
index f7b6e1c4..9f0d6d07 100644
--- 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);
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-19 22:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 22:05 [PATCH v2 1/2] wiphy: add wiphy_can_offload Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2021-10-19 21:52 James Prestwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.