From ec0b9ccbc1231fca067ab7f84fde225e9c957121 Mon Sep 17 00:00:00 2001 From: Kapil Bhatt Date: Mon, 26 Aug 2024 17:12:23 +0530 Subject: [PATCH] hostap: Add currnet PHY rate to status Add current PHY rate to the wifi status. It will a TX data rate in bits per second. Signed-off-by: Kapil Bhatt --- modules/hostap/src/supp_api.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/hostap/src/supp_api.c b/modules/hostap/src/supp_api.c index 5a83f91753d..8a93e258ad4 100644 --- a/modules/hostap/src/supp_api.c +++ b/modules/hostap/src/supp_api.c @@ -953,6 +953,15 @@ int supplicant_status(const struct device *dev, struct wifi_iface_status *status } os_free(conn_info); + + ret = wpa_drv_signal_poll(wpa_s, si); + if (!ret) { + status->current_phy_rate = si->current_txrate; + } else { + wpa_printf(MSG_WARNING, "%s: Failed to get signal info\n", __func__); + status->current_phy_rate = 0; + ret = 0; + } } else { ret = 0; }