summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-09-12 14:09:26 +0200
committerFelix Fietkau <nbd@nbd.name>2023-09-12 14:09:59 +0200
commit499ca4cbe0ca2ee126c18a294f11d4c07a1699b4 (patch)
tree5f39948fc2e318eedb1ededadde7f8c5eef4c1e5 /package
parentea1787b7bcf537ffddad9aae3aab8381942c24cc (diff)
downloadopenwrt-499ca4cbe0ca2ee126c18a294f11d4c07a1699b4.tar.gz
openwrt-499ca4cbe0ca2ee126c18a294f11d4c07a1699b4.tar.bz2
openwrt-499ca4cbe0ca2ee126c18a294f11d4c07a1699b4.zip
hostapd: fix bringing up AP in AP+mesh configurations
Pass the correct frequency + secondary channel offset to hostapd Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/network/services/hostapd/src/wpa_supplicant/ucode.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c
index d120ed6217..55d22584ff 100644
--- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c
+++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c
@@ -2,6 +2,7 @@
#include "utils/common.h"
#include "utils/ucode.h"
#include "drivers/driver.h"
+#include "ap/hostapd.h"
#include "wpa_supplicant_i.h"
#include "wps_supplicant.h"
#include "bss.h"
@@ -225,6 +226,15 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs)
ucv_object_add(ret, "frequency", ucv_int64_new(bss->freq));
}
+#ifdef CONFIG_MESH
+ if (wpa_s->ifmsh) {
+ struct hostapd_iface *ifmsh = wpa_s->ifmsh;
+
+ ucv_object_add(ret, "sec_chan_offset", ucv_int64_new(ifmsh->conf->secondary_channel));
+ ucv_object_add(ret, "frequency", ucv_int64_new(ifmsh->freq));
+ }
+#endif
+
return ret;
}