aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2022-05-14 21:50:51 +0200
committerDavid Bauer <mail@david-bauer.net>2022-06-08 23:16:20 +0200
commit6ee4383350bc5b1920f81095f2ecd05b14e3bff6 (patch)
tree17bf74b265adce6ff25c4be342dbebaf942d52b5 /package/network
parent6c152ce5b0c003099dc1d9076fc3c38d061c1137 (diff)
downloadupstream-6ee4383350bc5b1920f81095f2ecd05b14e3bff6.tar.gz
upstream-6ee4383350bc5b1920f81095f2ecd05b14e3bff6.tar.bz2
upstream-6ee4383350bc5b1920f81095f2ecd05b14e3bff6.zip
hostapd: ubus: add bss-color to get_status
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@david-bauer.net> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/hostapd/src/src/ap/ubus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 5f598d1c2c..1199098b1e 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);