[PATCH 3/3] hostapd: ubus: add bss-color to get_status
David Bauer
mail at david-bauer.net
Mon Jun 6 15:29:08 PDT 2022
Add the current BSS color to hostapd get_status method. This field is
set to -1 in case BSS color is not active for the BSS.
Signed-off-by: David Bauer <mail at david-bauer.net>
---
package/network/services/hostapd/src/src/ap/ubus.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 8a963647cd..751b9f5588 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -445,6 +445,12 @@ hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
blobmsg_add_u32(&b, "channel", channel);
blobmsg_add_u32(&b, "op_class", op_class);
blobmsg_add_u32(&b, "beacon_interval", hapd->iconf->beacon_int);
+#ifdef CONFIG_IEEE80211AX
+ blobmsg_add_u32(&b, "bss-color", hapd->iface->conf->he_op.he_bss_color_disabled ? -1 :
+ hapd->iface->conf->he_op.he_bss_color);
+#else
+ blobmsg_add_u32(&b, "bss-color", -1);
+#endif
snprintf(phy_name, 17, "%s", hapd->iface->phy);
blobmsg_add_string(&b, "phy", phy_name);
--
2.35.1
More information about the openwrt-devel
mailing list