@@ -355,6 +355,8 @@ setup_mld:
hostapd_get_mld_capa(iface);
+ hostapd_get_cip_capa(iface);
+
triggs = wpa_get_wowlan_triggers(conf->wowlan_triggers, &capa);
if (triggs && hapd->driver->set_wowlan) {
if (hapd->driver->set_wowlan(hapd->drv_priv, triggs))
@@ -1027,6 +1027,7 @@ struct hostapd_bss_config {
int mbssid_index;
bool spp_amsdu;
+ bool cip;
#ifdef CONFIG_ENC_ASSOC
unsigned int assoc_frame_encryption:1;
unsigned int pmksa_caching_privacy:1;
@@ -1260,6 +1260,22 @@ void hostapd_get_mld_capa(struct hostapd_iface *iface)
}
+void hostapd_get_cip_capa(struct hostapd_iface *iface)
+{
+ struct hostapd_data *hapd = iface->bss[0];
+ int res;
+
+ if (!hapd->driver || !hapd->driver->get_cip_capab)
+ return;
+
+ res = hapd->driver->get_cip_capab(hapd->drv_priv, WPA_IF_AP_BSS,
+ &iface->cip_capa);
+
+ if (!res)
+ iface->cip_supported = true;
+}
+
+
/**
* hostapd_drv_do_acs - Start automatic channel selection
* @hapd: BSS data for the device initiating ACS
@@ -166,6 +166,7 @@ int hostapd_drv_set_qos_map(struct hostapd_data *hapd, const u8 *qos_map_set,
void hostapd_get_ext_capa(struct hostapd_iface *iface);
void hostapd_get_mld_capa(struct hostapd_iface *iface);
+void hostapd_get_cip_capa(struct hostapd_iface *iface);
void hostapd_get_hw_mode_any_channels(struct hostapd_data *hapd,
struct hostapd_hw_modes *mode,
@@ -640,6 +640,8 @@ struct hostapd_iface {
unsigned int extended_capa_len;
u16 mld_eml_capa, mld_mld_capa;
+ bool cip_supported;
+ u8 cip_capa;
unsigned int drv_max_acl_mac_addrs;
@@ -12410,3 +12410,28 @@ u8 * hostapd_eid_mbssid(struct hostapd_data *hapd_probed, u8 *eid, u8 *end,
}
#endif /* CONFIG_NATIVE_WINDOWS */
+
+size_t hostapd_eid_cip_capab_len(struct hostapd_data *hapd)
+{
+ if (!hapd->conf->cip)
+ return 0;
+
+ return 4;
+}
+
+
+u8 * hostapd_eid_cip_capab(struct hostapd_data *hapd, u8 *eid)
+{
+ u8 *pos = eid;
+
+ /* All callers should already check the station flag */
+ if (!hapd->conf->cip)
+ return pos;
+
+ *pos++ = WLAN_EID_EXTENSION;
+ *pos++ = 2;
+ *pos++ = WLAN_EID_EXT_CIP_CAPABILITIES;
+ *pos++ = hapd->iface->cip_capa;
+
+ return pos;
+}
@@ -354,4 +354,7 @@ void hostapd_get_uhr_capab(struct hostapd_data *hapd,
struct ieee80211_uhr_capabilities *dest,
size_t len);
+size_t hostapd_eid_cip_capab_len(struct hostapd_data *hapd);
+u8 * hostapd_eid_cip_capab(struct hostapd_data *hapd, u8 *eid);
+
#endif /* IEEE802_11_H */