From: Chien Wong Date: Sun, 21 Sep 2025 13:15:58 +0000 (+0800) Subject: AP: Fix build failure when EHT enabled while OCV disabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0225a1585cf4dc578d55f5af7a19546330b579b3;p=thirdparty%2Fhostap.git AP: Fix build failure when EHT enabled while OCV disabled Signed-off-by: Chien Wong --- diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c index eb71a7df8..243e50b9f 100644 --- a/src/ap/ieee802_11_eht.c +++ b/src/ap/ieee802_11_eht.c @@ -1880,8 +1880,10 @@ hostapd_send_link_reconf_resp(struct hostapd_data *hapd, assoc_sta->wpa_sm, req_list->links_add_ok) + 1; len += kde_len; +#ifdef CONFIG_OCV if (wpa_auth_uses_ocv(assoc_sta->wpa_sm)) len += OCV_OCI_EXTENDED_LEN; +#endif /* CONFIG_OCV */ mld.mld_sta = true; dl_list_for_each(info, &req_list->add_req, @@ -1978,6 +1980,7 @@ hostapd_send_link_reconf_resp(struct hostapd_data *hapd, pos_len += kde_len; } +#ifdef CONFIG_OCV /* OCI element for add links */ if (wpa_auth_uses_ocv(assoc_sta->wpa_sm)) { struct wpa_channel_info ci; @@ -1999,6 +2002,7 @@ hostapd_send_link_reconf_resp(struct hostapd_data *hapd, pos += OCV_OCI_EXTENDED_LEN; pos_len += OCV_OCI_EXTENDED_LEN; } +#endif /* CONFIG_OCV */ /* Basic Multi-Link element for add links */ if (mle_len) { @@ -2663,6 +2667,7 @@ hostapd_handle_link_reconf_req(struct hostapd_data *hapd, const u8 *buf, if (dl_list_empty(&req_list->add_req)) goto skip_oci_validation; +#ifdef CONFIG_OCV if (!elems.oci || !elems.oci_len) { if (wpa_auth_uses_ocv(assoc_sta->wpa_sm) == 1) { wpa_printf(MSG_INFO, @@ -2692,6 +2697,7 @@ hostapd_handle_link_reconf_req(struct hostapd_data *hapd, const u8 *buf, goto out; } } +#endif /* CONFIG_OCV */ skip_oci_validation: /* Do STA profile validation */