hostapd: add missing #ifdef for non-802.11ax builds
authorFelix Fietkau <nbd@nbd.name>
Fri, 11 Aug 2023 05:10:17 +0000 (07:10 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 11 Aug 2023 05:10:23 +0000 (07:10 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/src/src/ap/ucode.c

index a41eee3fe5e0c02335a24312a97c1b0617448324..fe99c3f667ccd86cf9f42dadb60face4373f8e36 100644 (file)
@@ -332,16 +332,21 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs)
                conf->channel = intval;
        if ((intval = ucv_int64_get(ucv_object_get(info, "sec_channel", NULL))) && !errno)
                conf->secondary_channel = intval;
+#ifdef CONFIG_IEEE80211AC
        if ((intval = ucv_int64_get(ucv_object_get(info, "center_seg0_idx", NULL))) && !errno) {
                conf->vht_oper_centr_freq_seg0_idx = intval;
+#ifdef CONFIG_IEEE80211AX
                conf->he_oper_centr_freq_seg0_idx = intval;
+#endif
 #ifdef CONFIG_IEEE80211BE
                conf->eht_oper_centr_freq_seg0_idx = intval;
 #endif
        }
        if ((intval = ucv_int64_get(ucv_object_get(info, "center_seg1_idx", NULL))) && !errno) {
                conf->vht_oper_centr_freq_seg1_idx = intval;
+#ifdef CONFIG_IEEE80211AX
                conf->he_oper_centr_freq_seg1_idx = intval;
+#endif
 #ifdef CONFIG_IEEE80211BE
                conf->eht_oper_centr_freq_seg1_idx = intval;
 #endif
@@ -349,11 +354,14 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs)
        intval = ucv_int64_get(ucv_object_get(info, "oper_chwidth", NULL));
        if (!errno) {
                conf->vht_oper_chwidth = intval;
+#ifdef CONFIG_IEEE80211AX
                conf->he_oper_chwidth = intval;
+#endif
 #ifdef CONFIG_IEEE80211BE
                conf->eht_oper_chwidth = intval;
 #endif
        }
+#endif
 
 out:
        if (conf->channel)