]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Fix build failure when EHT enabled while OCV disabled
authorChien Wong <m@xv97.com>
Sun, 21 Sep 2025 13:15:58 +0000 (21:15 +0800)
committerJouni Malinen <j@w1.fi>
Mon, 29 Sep 2025 10:55:01 +0000 (13:55 +0300)
Signed-off-by: Chien Wong <m@xv97.com>
src/ap/ieee802_11_eht.c

index eb71a7df890caf7f6538b899825314720898a1bf..243e50b9f39adc969ec13d2767667f079c7b432e 100644 (file)
@@ -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 */