From 1517c5a7fcadd7bd95b8e65b552bf220099f5f9a Mon Sep 17 00:00:00 2001 From: Arunmani Alagarsamy Date: Tue, 21 Jan 2025 16:40:34 +0530 Subject: [PATCH] driver: wifi: siwx917: Fix scan configuration handling Fixed the handling of active and passive scan user arguments to ensure correct behavior. Removed forced active scan and updated it to respect the user-provided options. Signed-off-by: Arunmani Alagarsamy --- drivers/wifi/siwx917/siwx917_wifi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/wifi/siwx917/siwx917_wifi.c b/drivers/wifi/siwx917/siwx917_wifi.c index 14093fb..6c03494 100644 --- a/drivers/wifi/siwx917/siwx917_wifi.c +++ b/drivers/wifi/siwx917/siwx917_wifi.c @@ -203,8 +203,10 @@ static int siwx917_scan(const struct device *dev, struct wifi_scan_params *z_sca return -EBUSY; } - /* FIXME: fill sl_scan_config with values from z_scan_config */ - sl_scan_config.type = SL_WIFI_SCAN_TYPE_ACTIVE; + if (z_scan_config) { + sl_scan_config.type = z_scan_config->scan_type; + } + sl_scan_config.channel_bitmap_2g4 = 0xFFFF; memset(sl_scan_config.channel_bitmap_5g, 0xFF, sizeof(sl_scan_config.channel_bitmap_5g));