Android 6 WiFi is not enabled after restart

Hi,
I’m trying to figure out why a WiFi on Android 6 on Dragonboard 410c gets disabled after reboot. What I do:

  1. Go to seetings
  2. Enable Wifi
  3. Connect to an AP
  4. Connection is established, Internet is working
    All is OK.
  5. Press the power button and Reboot the machine via menu option.

Now the issue happens after the restart: the Wifi is not enabled anymore, but it should be.
When I manually enter the Wifi setting, then the Wifi is disabled. At this point I can click to enable it and it is enabled and works. So, there is no problem with Wifi connection as such, but some sort of issue with starting the wifi driver. In dmesg I can see this:

[ 30.243669] wcnss_wlan_ctrl_probe: SMD ctrl channel up
[ 30.244004] wcnss: version 01050102
[ 30.244025] wcnss: schedule dnld work for pronto
[ 30.245116] wcnss: build version CNSS-PR-2-0-1-2-c1-00021
[ 30.244033] wcnss: NV download
[ 30.253864] wcnss: NV bin size: 31719, total_fragments: 11
[ 30.253918] wcnss: no space available for smd frame
[ 30.284339] wcnss: no space available for smd frame
[ 30.314457] wcnss: no space available for smd frame
[ 30.344526] wcnss: no space available for smd frame
[ 30.754341] wlan: [F :HDD] hdd_driver_init: WCNSS driver not ready
[ 32.707524] init: Starting service ‘keystore’…
[ 33.248270] wcnss: received WCNSS_CBC_COMPLETE_IND from FW

The line saying: “WCNSS driver not ready” seems a bit odd. And 3 seconds after that it prints: WCNSS_CBC_COMPLETE_IND. It looks to me the Wlan tries to initialise while the qcom’s firmware binary blob has not settled yet. I found a patch that resembles the situation in here:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1160532.html

The patch seemed to be written by Bjorn from Linaro. Could this be the same issue here? The patch modifies source code that is not in Android kernel 3.10, so there is no point of applying it.
Any ideas?

Hate to say it, but that’s some really ancient software you’re running there. You probably should think about upgrading to a more recent Android. NOBODY will support that unless they just happen to recall what that issue is.

Thanks, but unfortunately no Android version I tried on Dragnboard 410c is in a good shape. The modern ones lack mature graphics driver that would render fast and without glitches. The older Android version have their “geriatric diseases” :slight_smile:

I don’t think you’ve tried it in a long time. Aosp master will render fast and glitch free, unlike those ancient blobs you’re stuck with.

I found a fix. The vendor/qcom/opensource/wlan/prima/CORE/HDD/src/wlan_hdd_main.c:hdd_driver_init() function had to be modfied. Specifically the waiting timeout for wcnss_device_ready() was increased from 5 seconds to 10 seconds. In reality the timeout waits only 4 seconds and the wcnss becomes ready after 5 seconds, therefore the hdd_driver_init() bails out and reports a fail prematurely. So increasing the max timeout fixes the issue.