From 9248c9ab791ce26cb4fcd56ba4ab7280ccb3f6d5 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Wed, 10 Jan 2024 09:34:57 +0100 Subject: [PATCH] cc93 wlan: fix the check for Wi-Fi module correctly loaded The result of the modprobe operation doesn't guarantee the driver loaded correctly. The module may succeed and be loaded, but failures during the probe may not propagate and result in an error of modprobe. The valid condition is to check the existence of the interface in /sys/class/net/wlan0. Signed-off-by: Hector Palacios https://onedigi.atlassian.net/browse/DEL-8821 --- .../kernel-modules/kernel-module-nxp-wlan/load_iw612.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/load_iw612.sh b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/load_iw612.sh index e6acea5c5..678b8f292 100644 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/load_iw612.sh +++ b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/load_iw612.sh @@ -35,7 +35,7 @@ fi WLANADDR=$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/wireless/mac-address 2>/dev/null | sed 's/:$//g') modprobe mlan && \ modprobe moal ${MOAL_PARAMS} mac_addr=${WLANADDR} && \ -log "Wi-Fi activated" && exit 0 +[ -d "/sys/class/net/wlan0" ] && log "Wi-Fi activated" && exit 0 log "[ERROR] cannot load Wi-Fi driver" exit 1