meta-somdevices: hostapd: Changed hostapd script to improve restart wilc-sdio module...
authorJosep Orga <jorga@somdevices.com>
Tue, 20 Apr 2021 06:56:07 +0000 (08:56 +0200)
committerJosep Orga <jorga@somdevices.com>
Tue, 20 Apr 2021 06:56:07 +0000 (08:56 +0200)
This solves some errors found during exhausting test:
· This is one error:
mmc0: Timeout waiting for hardware interrupt.
mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
mmc0: sdhci: Sys addr:  0x88acba88 | Version:  0x00000002
mmc0: sdhci: Blk size:  0x00000004 | Blk cnt:  0x00000001
mmc0: sdhci: Argument:  0x04021e04 | Trn mode: 0x00000013
mmc0: sdhci: Present:   0x01f8820e | Host ctl: 0x00000013
mmc0: sdhci: Power:     0x00000002 | Blk gap:  0x00000080
mmc0: sdhci: Wake-up:   0x00000008 | Clock:    0x0000002f
mmc0: sdhci: Timeout:   0x0000008f | Int stat: 0x00000000
mmc0: sdhci: Int enab:  0x107f100b | Sig enab: 0x107f100b
mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000302
mmc0: sdhci: Caps:      0x07eb0000 | Caps_1:   0x0000b400
mmc0: sdhci: Cmd:       0x0000353a | Max curr: 0x00ffffff
mmc0: sdhci: Resp[0]:   0x00001000 | Resp[1]:  0x00000000
mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
mmc0: sdhci: Host ctl2: 0x00000000
mmc0: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x8c05f204
mmc0: sdhci: ============================================
wilc_sdio mmc0:0001:1: wilc_sdio_cmd53..failed, err(-110)
wilc_sdio mmc0:0001:1: Failed cmd53, read reg (003b0000)...
[wilc start]: fail read reg 0x3b0000

· This is another error
(it is necessary to unbind "2190000.usdhc" from /sys/bus/platform/drivers/sdhci-esdhc-imx/unbind to be solved):
wilc_sdio: probe of mmc0:0001:1 failed with error -16

Signed-off-by: Josep Orga <jorga@somdevices.com>
recipes-connectivity/hostapd/hostapd/hostapd.sh

index fd4b1ab..5f19d65 100644 (file)
@@ -1,9 +1,15 @@
 #!/bin/sh
 
 sleep 1
-if [ ! -d /sys/class/net/wlan0 ]; then
+i=1
+while [[ ! -d /sys/class/net/wlan0 && $i -le 5 ]]; do
     #If wlan0 device does not exist reset wilc-sdio module
     /sbin/rmmod wilc-sdio
     sleep 1
+    echo "2190000.usdhc" > /sys/bus/platform/drivers/sdhci-esdhc-imx/unbind
+    sleep 1
+    echo "2190000.usdhc" > /sys/bus/platform/drivers/sdhci-esdhc-imx/bind
     /sbin/modprobe wilc-sdio
-fi
\ No newline at end of file
+    sleep 2
+    i=$((i+1))
+done
\ No newline at end of file