From 2b0876c850017f95c92d472daed616b9ac49d7c7 Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Tue, 17 Jun 2025 22:06:06 +0530 Subject: [PATCH] modules: nrf_wifi: Remove co-ex GPIOs first Before powering off remove co-ex GPIOs. Signed-off-by: Chaitanya Tata --- modules/nrf_wifi/bus/rpu_hw_if.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/nrf_wifi/bus/rpu_hw_if.c b/modules/nrf_wifi/bus/rpu_hw_if.c index 62291251fb7..39525211486 100644 --- a/modules/nrf_wifi/bus/rpu_hw_if.c +++ b/modules/nrf_wifi/bus/rpu_hw_if.c @@ -503,6 +503,13 @@ int rpu_disable(void) { int ret; + #ifdef CONFIG_NRF70_SR_COEX_RF_SWITCH + ret = sr_gpio_remove(); + if (ret) { + goto out; + } +#endif + ret = rpu_pwroff(); if (ret) { goto out; @@ -512,12 +519,7 @@ int rpu_disable(void) goto out; } -#ifdef CONFIG_NRF70_SR_COEX_RF_SWITCH - ret = sr_gpio_remove(); - if (ret) { - goto out; - } -#endif + qdev = NULL; cfg = NULL;