]> git.ipfire.org Git - telemetry.git/commitdiff
sources: Correct rate information of hostapd stations
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Oct 2025 14:09:27 +0000 (14:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Oct 2025 14:09:27 +0000 (14:09 +0000)
hostapd returns this in hundredth of kilobits. We will store it in bits.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/sources/hostapd.c

index 314de83c1fe9b8bfb29d0575cfb20925512d0825..9601f981c0c5f99b3b804e8c2530d70a0ac566a1 100644 (file)
@@ -103,8 +103,8 @@ static int hostapd_submit_station(td_ctx* ctx, hostapd_station* station) {
                station->connected_time, station->inactive_msec,
                station->signal, station->last_ack_signal,
                station->rx_packets, station->tx_packets, station->rx_bytes, station->tx_bytes,
-               station->rx_rate * 100, station->rx_mcs, station->rx_vhtmcs, station->rx_vhtnss,
-               station->tx_rate * 100, station->tx_mcs, station->tx_vhtmcs, station->tx_vhtnss);
+               station->rx_rate * 100 * 1024, station->rx_mcs, station->rx_vhtmcs, station->rx_vhtnss,
+               station->tx_rate * 100 * 1024, station->tx_mcs, station->tx_vhtmcs, station->tx_vhtnss);
 }
 
 static int hostapd_parse(td_ctx* ctx, td_file* stdout, unsigned long lineno,