Commit 7aa6601e authored by Jakob Olsson's avatar Jakob Olsson

hostapd_wave: pass unassociated sta data to ubus

parent 5c0df9d5
From 46152499221e56340195196bd90d348938023b60 Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakob.olsson@iopsys.eu>
Date: Thu, 23 Jul 2020 12:23:16 +0200
Subject: [PATCH 3/3] tmp1
---
src/ap/drv_callbacks.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 82d13ea..a29a08c 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -38,6 +38,7 @@
#include "acs.h"
#include "wmm.h"
+#include "ubus_iface.h"
/* Must be aligned with drivers wv_wds_sta_info structure */
struct wv_wds_sta_info
@@ -1167,6 +1168,16 @@ static void hostapd_event_ltq_unconnected_sta_rx(struct hostapd_data *hapd,
unc_sta->noise[2] ? unc_sta->rssi[2] - unc_sta->noise[2] : 0, /* RSSI and noise to SNR */
unc_sta->noise[3] ? unc_sta->rssi[3] - unc_sta->noise[3] : 0, /* RSSI and noise to SNR */
unc_sta->rate);
+
+
+ notify_ubus_event("wifi.sta {\"macaddr\":\"%02x:%02x:%02x:%02x:%02x:%02x\", "
+ "\"vif\":\"%s\",\"action\":\"monitor\", "
+ "\"rssi\":[%d,%d,%d,%d], "
+ "\"bssid\":\"%02x:%02x:%02x:%02x:%02x:%02x\"}",
+ MAC2STR(unc_sta->addr), hapd->conf->iface,
+ unc_sta->rssi[0], unc_sta->rssi[1],
+ unc_sta->rssi[2], unc_sta->rssi[3],
+ MAC2STR(hapd->conf->bssid));
}
static u16 check_wmm_wds(struct hostapd_data *hapd, struct sta_info *sta,
--
2.7.4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment