[openwrt/openwrt] hostapd: add raw beacon report data to ubus notification
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 26 09:47:22 PST 2026
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b44d4290fe8324c1705c192c02f5d4a452a43552
commit b44d4290fe8324c1705c192c02f5d4a452a43552
Author: John Crispin <john at phrozen.org>
AuthorDate: Mon Aug 4 07:37:47 2025 +0200
hostapd: add raw beacon report data to ubus notification
Add the complete base64-encoded beacon report structure to the
"beacon-report" ubus notification event.
Signed-off-by: John Crispin <john at phrozen.org>
---
package/network/services/hostapd/src/src/ap/ubus.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index ff0ea312df..247230a243 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -24,6 +24,7 @@
#include "taxonomy.h"
#include "airtime_policy.h"
#include "hw_features.h"
+#include "base64.h"
static struct ubus_context *ctx;
static struct blob_buf b;
@@ -2005,6 +2006,8 @@ void hostapd_ubus_notify_beacon_report(
struct hostapd_data *hapd, const u8 *addr, u8 token, u8 rep_mode,
struct rrm_measurement_beacon_report *rep, size_t len)
{
+ char *encoded;
+
if (!hapd->ubus.obj.has_subscribers)
return;
@@ -2024,7 +2027,11 @@ void hostapd_ubus_notify_beacon_report(
blobmsg_add_u16(&b, "antenna-id", rep->antenna_id);
blobmsg_add_u16(&b, "parent-tsf", rep->parent_tsf);
blobmsg_add_u16(&b, "rep-mode", rep_mode);
-
+ encoded = base64_encode(rep, len, NULL);
+ if (encoded) {
+ blobmsg_add_string(&b, "report", encoded);
+ os_free(encoded);
+ }
ubus_notify(ctx, &hapd->ubus.obj, "beacon-report", b.head, -1);
}
More information about the lede-commits
mailing list