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 <hector.palacios@digi.com> https://onedigi.atlassian.net/browse/DEL-8821
This commit is contained in:
parent
0aa5003267
commit
9248c9ab79
|
|
@ -35,7 +35,7 @@ fi
|
||||||
WLANADDR=$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/wireless/mac-address 2>/dev/null | sed 's/:$//g')
|
WLANADDR=$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/wireless/mac-address 2>/dev/null | sed 's/:$//g')
|
||||||
modprobe mlan && \
|
modprobe mlan && \
|
||||||
modprobe moal ${MOAL_PARAMS} mac_addr=${WLANADDR} && \
|
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"
|
log "[ERROR] cannot load Wi-Fi driver"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue