From ee6866e81ab1f50ff3ca8f0088fc9be749892517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Fri, 6 Sep 2024 18:32:49 +0200 Subject: [PATCH] drivers: siwx917_wifi: Report RSSI in iface_status() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RSSI is easy to report. Signed-off-by: Jérôme Pouiller --- drivers/wifi/siwx917/siwx917_wifi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/wifi/siwx917/siwx917_wifi.c b/drivers/wifi/siwx917/siwx917_wifi.c index a28064b..43283ad 100644 --- a/drivers/wifi/siwx917/siwx917_wifi.c +++ b/drivers/wifi/siwx917/siwx917_wifi.c @@ -278,9 +278,12 @@ static int siwx917_scan(const struct device *dev, struct wifi_scan_params *z_sca static int siwx917_status(const struct device *dev, struct wifi_iface_status *status) { struct siwx917_dev *sidev = dev->data; + int32_t rssi = -1; memset(status, 0, sizeof(*status)); status->state = sidev->state; + sl_wifi_get_signal_strength(SL_WIFI_CLIENT_INTERFACE, &rssi); + status->rssi = rssi; return 0; }