From b28f246f53925e4263e413f5532509b3b601c8d2 Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Mon, 30 Dec 2024 19:12:56 +0530 Subject: [PATCH] net: l2: wifi: Fix PHY rate display The WPA supplicant already converts this to Mbps. Signed-off-by: Chaitanya Tata --- include/zephyr/net/wifi_mgmt.h | 2 +- subsys/net/l2/wifi/wifi_shell.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/zephyr/net/wifi_mgmt.h b/include/zephyr/net/wifi_mgmt.h index d8a8c20a9a4..6dcafa8aee4 100644 --- a/include/zephyr/net/wifi_mgmt.h +++ b/include/zephyr/net/wifi_mgmt.h @@ -696,7 +696,7 @@ struct wifi_iface_status { unsigned short beacon_interval; /** is TWT capable? */ bool twt_capable; - /** The current 802.11 PHY TX data rate (in Kbps) */ + /** The current 802.11 PHY TX data rate (in Mbps) */ int current_phy_tx_rate; }; diff --git a/subsys/net/l2/wifi/wifi_shell.c b/subsys/net/l2/wifi/wifi_shell.c index 9322adc9fdb..ccdd2f5c7a9 100644 --- a/subsys/net/l2/wifi/wifi_shell.c +++ b/subsys/net/l2/wifi/wifi_shell.c @@ -1154,9 +1154,7 @@ static int cmd_wifi_status(const struct shell *sh, size_t argc, char *argv[]) PR("DTIM: %d\n", status.dtim_period); PR("TWT: %s\n", status.twt_capable ? "Supported" : "Not supported"); - PR("Current PHY TX rate (Mbps) : %d.%03d\n", - status.current_phy_tx_rate / 1000, - status.current_phy_tx_rate % 1000); + PR("Current PHY TX rate (Mbps) : %d\n", status.current_phy_tx_rate); } return 0;