hostapd: add beacon_interval to get_status ubus output
authorDavid Bauer <mail@david-bauer.net>
Mon, 25 Oct 2021 19:33:40 +0000 (21:33 +0200)
committerDavid Bauer <mail@david-bauer.net>
Sun, 20 Mar 2022 00:31:47 +0000 (01:31 +0100)
Add the beacon interval to hostapd status output. This allows external
services to discover the beacon interval for a specific VAP.

This way, external wireless management daemons can correctly calculate
fields containing TBTT value from absolute time-values.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 3ba98468424db1f081818982dfa2a07ab85ae136)

package/network/services/hostapd/src/src/ap/ubus.c

index 64d417a758aef1557ac969779f45fc59fcf7ae0a..a9cded01132cd6b18f461d6d405b3df8b9ff4339 100644 (file)
@@ -423,6 +423,7 @@ hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
 
        blobmsg_add_u32(&b, "freq", hapd->iface->freq);
        blobmsg_add_u32(&b, "channel", ieee80211_frequency_to_channel(hapd->iface->freq));
+       blobmsg_add_u32(&b, "beacon_interval", hapd->iconf->beacon_int);
 
        snprintf(phy_name, 17, "%s", hapd->iface->phy);
        blobmsg_add_string(&b, "phy", phy_name);