From 0e3d681bd292605bb3160baa7971c350946c0b39 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Tue, 7 May 2024 13:41:15 +0200 Subject: [PATCH] [nrf toup][nrfconnect] Fixed calculation of Wi-Fi unicast counters Wi-Fi unicast tx/rx counters were calculated based on a wrong values, what could lead to getting negative results. Recent changes allow to use dedicated unicast structure field instead of obtaining the values based on calculation. Signed-off-by: Kamil Kasperczyk --- src/platform/nrfconnect/wifi/WiFiManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/nrfconnect/wifi/WiFiManager.cpp b/src/platform/nrfconnect/wifi/WiFiManager.cpp index 80caa44c53..a9a7ad38f1 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.cpp +++ b/src/platform/nrfconnect/wifi/WiFiManager.cpp @@ -299,8 +299,8 @@ CHIP_ERROR WiFiManager::GetNetworkStatistics(NetworkStatistics & stats) const stats.mPacketMulticastRxCount = data.multicast.rx; stats.mPacketMulticastTxCount = data.multicast.tx; - stats.mPacketUnicastRxCount = data.pkts.rx - data.multicast.rx - data.broadcast.rx; - stats.mPacketUnicastTxCount = data.pkts.tx - data.multicast.tx - data.broadcast.tx; + stats.mPacketUnicastRxCount = data.unicast.rx; + stats.mPacketUnicastTxCount = data.unicast.tx; stats.mBeaconsSuccessCount = data.sta_mgmt.beacons_rx; stats.mBeaconsLostCount = data.sta_mgmt.beacons_miss;