From 03b48b5621630abbfccee9e77c19f10e8f1385db Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 4 Jun 2021 09:20:47 -0500 Subject: [PATCH] station: Pretty-print the estimated BSS data rate --- src/station.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/station.c b/src/station.c index 0602958f..5b8b61b4 100644 --- a/src/station.c +++ b/src/station.c @@ -34,6 +34,7 @@ #include +#include "ell/useful.h" #include "src/util.h" #include "src/iwd.h" #include "src/module.h" @@ -297,12 +298,14 @@ static struct network *station_add_seen_bss(struct station *station, enum security security; const char *path; char ssid[33]; + uint32_t kbps100 = DIV_ROUND_CLOSEST(bss->data_rate, 100000); l_debug("Processing BSS '%s' with SSID: %s, freq: %u, rank: %u, " - "strength: %i", + "strength: %i, data_rate: %u.%u", util_address_to_string(bss->addr), util_ssid_to_utf8(bss->ssid_len, bss->ssid), - bss->frequency, bss->rank, bss->signal_strength); + bss->frequency, bss->rank, bss->signal_strength, + kbps100 / 10, kbps100 % 10); if (util_ssid_is_hidden(bss->ssid_len, bss->ssid)) { l_debug("BSS has hidden SSID");