[PATCH 05/21] nl80211: Control Integrity Protocol support information
Benjamin Berg
benjamin at sipsolutions.net
Tue Oct 27 06:16:51 PDT 2026
From: Benjamin Berg <benjamin.berg at intel.com>
Discover Control Integrity Protocol (CIP) driver support and
capabilities and provide the information.
Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/drivers/driver_nl80211.c | 25 +++++++++++++++++++++++++
src/drivers/driver_nl80211.h | 2 ++
src/drivers/driver_nl80211_capa.c | 12 ++++++++++++
3 files changed, 39 insertions(+)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index bc2e480dfc..01a65ca0fb 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -15284,6 +15284,30 @@ static int nl80211_get_mld_capab(void *priv, enum wpa_driver_if_type type,
}
+static int nl80211_get_cip_capab(void *priv, enum wpa_driver_if_type type,
+ u8 *cip_capa)
+{
+ struct i802_bss *bss = priv;
+ struct wpa_driver_nl80211_data *drv = bss->drv;
+ enum nl80211_iftype nlmode;
+ unsigned int i;
+
+ if (!cip_capa)
+ return -1;
+
+ nlmode = wpa_driver_nl80211_if_type(type);
+
+ for (i = 0; i < drv->num_iface_capa; i++) {
+ if (nlmode == drv->iface_capa[i].iftype) {
+ *cip_capa = drv->iface_capa[i].cip_capa;
+ return drv->iface_capa[i].cip_supported ? 0 : -1;
+ }
+ }
+
+ return -1;
+}
+
+
static int nl80211_update_connection_params(
void *priv, struct wpa_driver_associate_params *params,
enum wpa_drv_update_connect_params_mask mask)
@@ -16970,6 +16994,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.configure_data_frame_filters = nl80211_configure_data_frame_filters,
.get_ext_capab = nl80211_get_ext_capab,
.get_mld_capab = nl80211_get_mld_capab,
+ .get_cip_capab = nl80211_get_cip_capab,
.update_connect_params = nl80211_update_connection_params,
.send_external_auth_status = nl80211_send_external_auth_status,
.set_4addr_mode = nl80211_set_4addr_mode,
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index d612e6d352..6fa540263b 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -151,6 +151,8 @@ struct wpa_driver_nl80211_data {
unsigned int ext_capa_len;
u16 eml_capa;
u16 mld_capa_and_ops;
+ bool cip_supported;
+ u8 cip_capa;
} iface_capa[NL80211_IFTYPE_MAX];
unsigned int num_iface_capa;
unsigned int unique_drv_id;
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 01c4b32dc7..66c39c8765 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -940,6 +940,18 @@ static void wiphy_info_extended_capab(struct wpa_driver_nl80211_data *drv,
"nl80211: EML Capability: 0x%x MLD Capability: 0x%x",
capa->eml_capa, capa->mld_capa_and_ops);
+ if (tb1[NL80211_ATTR_CIP_CAPABILITIES]) {
+ capa->cip_supported = true;
+ capa->cip_capa =
+ nla_get_u8(tb1[NL80211_ATTR_CIP_CAPABILITIES]);
+ } else {
+ capa->cip_supported = false;
+ }
+
+ wpa_printf(MSG_DEBUG,
+ "nl80211: CIP Supported: %d, Capabilities: 0x%x",
+ capa->cip_supported, capa->cip_capa);
+
drv->num_iface_capa++;
if (drv->num_iface_capa == NL80211_IFTYPE_MAX)
break;
--
2.56.0
More information about the Hostap
mailing list