From 79edfc012803572b1c75a4667f03bfbb4fa9b6b0 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sun, 29 Jun 2025 20:01:59 +1000 Subject: [PATCH] wifi: nrf_wifi: ignore interface if TX disabled Automatically hide the nRF7x interface from the connection manager if the TX path is disabled (scan only mode). This prevents function calls like `conn_mgr_all_if_up(true)` from bringing up the interface which can never result in a connection. Signed-off-by: Jordan Yates --- drivers/wifi/nrf_wifi/src/net_if.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/wifi/nrf_wifi/src/net_if.c b/drivers/wifi/nrf_wifi/src/net_if.c index 82945ff55c2..a49fdc16498 100644 --- a/drivers/wifi/nrf_wifi/src/net_if.c +++ b/drivers/wifi/nrf_wifi/src/net_if.c @@ -18,6 +18,7 @@ #include LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL); +#include #include #include "net_private.h" @@ -702,6 +703,11 @@ void nrf_wifi_if_init_zep(struct net_if *iface) nrf_wifi_net_iface_work_handler); #endif /* CONFIG_NRF70_DATA_TX */ +#ifdef CONFIG_NRF70_SCAN_ONLY + /* In scan only mode this interface should be ignored by the connectivity manager */ + conn_mgr_ignore_iface(iface); +#endif /* CONFIG_NRF70_SCAN_ONLY */ + #ifdef CONFIG_NRF_WIFI_RPU_RECOVERY k_work_init(&vif_ctx_zep->nrf_wifi_rpu_recovery_work, nrf_wifi_rpu_recovery_work_handler);