Skip to content

Commit

Permalink
[nrf toup][nrfconnect] Fixed calculation of Wi-Fi unicast counters
Browse files Browse the repository at this point in the history
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 <kamil.kasperczyk@nordicsemi.no>
  • Loading branch information
kkasperczyk-no committed May 7, 2024
1 parent e734b79 commit 0e3d681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/nrfconnect/wifi/WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0e3d681

Please sign in to comment.