Skip to content

Commit

Permalink
net: wifi: Unicast frames statistics
Browse files Browse the repository at this point in the history
Unicast RX stats
It represents total number of unicast (any type data, action or
any other unicast frames) frames received at firmware level.
The actual frames passed to host will be different as firmware
may drop packets or some packets may be dropped because of
errors.

Unicast TX stats
Transmission side the unicast packets count states the packets
handed over to firmware. The stats taken at firmware level.
Actual packets transmission may vary depending upon various factors.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
  • Loading branch information
ajayparida authored and jhedberg committed Apr 29, 2024
1 parent 65e787b commit 1542140
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/zephyr/net/net_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ struct net_stats_wifi {
struct net_stats_pkts broadcast;
struct net_stats_pkts multicast;
struct net_stats_pkts errors;
struct net_stats_pkts unicast;
};

#if defined(CONFIG_NET_STATISTICS_USER_API)
Expand Down
2 changes: 2 additions & 0 deletions subsys/net/l2/wifi/wifi_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,8 @@ static void print_wifi_stats(struct net_if *iface, struct net_stats_wifi *data,
PR("Mcast sent : %u\n", data->multicast.tx);
PR("Beacons received : %u\n", data->sta_mgmt.beacons_rx);
PR("Beacons missed : %u\n", data->sta_mgmt.beacons_miss);
PR("Unicast received : %u\n", data->unicast.rx);
PR("Unicast sent : %u\n", data->unicast.tx);
}
#endif /* CONFIG_NET_STATISTICS_WIFI && CONFIG_NET_STATISTICS_USER_API */

Expand Down

0 comments on commit 1542140

Please sign in to comment.