Skip to content

Commit 79edfc0

Browse files
JordanYatesnashif
authored andcommitted
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 <jordan@embeint.com>
1 parent 5c0521c commit 79edfc0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/wifi/nrf_wifi/src/net_if.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <zephyr/logging/log.h>
1919
LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL);
2020

21+
#include <zephyr/net/conn_mgr_monitor.h>
2122
#include <zephyr/sys/reboot.h>
2223

2324
#include "net_private.h"
@@ -702,6 +703,11 @@ void nrf_wifi_if_init_zep(struct net_if *iface)
702703
nrf_wifi_net_iface_work_handler);
703704
#endif /* CONFIG_NRF70_DATA_TX */
704705

706+
#ifdef CONFIG_NRF70_SCAN_ONLY
707+
/* In scan only mode this interface should be ignored by the connectivity manager */
708+
conn_mgr_ignore_iface(iface);
709+
#endif /* CONFIG_NRF70_SCAN_ONLY */
710+
705711
#ifdef CONFIG_NRF_WIFI_RPU_RECOVERY
706712
k_work_init(&vif_ctx_zep->nrf_wifi_rpu_recovery_work,
707713
nrf_wifi_rpu_recovery_work_handler);

0 commit comments

Comments
 (0)