# Ath10k (QCA9377) firmware load fail after firmware update

## bjdacre

Gentlepeople,

Rebooting after the linux firmware update to version 20181026 has caused my previously working QCA9377 wireless adapter to fail the firmware load and thus cease to work.

```
lspci -k

02:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)

   Subsystem: Dell QCA9377 802.11ac Wireless Network Adapter

   Kernel driver in use: ath10k_pci

   Kernel modules: ath10k_pci
```

```
dmesg | grep -i ath10k

[    9.381418] ath10k_pci 0000:02:00.0: enabling device (0000 -> 0002)

[    9.384323] ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0

[    9.598369] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:02:00.0.bin failed with error -2

[    9.598384] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/cal-pci-0000:02:00.0.bin failed with error -2

[    9.969628] ath10k_pci 0000:02:00.0: qca9377 hw1.1 target 0x05020001 chip_id 0x003821ff sub 1028:1810

[    9.969633] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0

[    9.971155] ath10k_pci 0000:02:00.0: firmware ver WLAN.TF.2.1-00021-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 42e41877

[   13.034010] ath10k_pci 0000:02:00.0: unable to read from the device

[   13.034012] ath10k_pci 0000:02:00.0: could not execute otp for board id check: -110

[   13.034013] ath10k_pci 0000:02:00.0: failed to get board id from otp: -110

[   13.034029] ath10k_pci 0000:02:00.0: could not probe fw (-110)
```

```
ls -al /lib/firmware/ath10k/QCA9377/hw1.0/

total 1.9M

drwxr-xr-x 2 root root 4.0K Oct 31 01:22 .

drwxr-xr-x 3 root root 4.0K Nov  2 13:07 ..

-rw-r--r-- 1 root root 298K Oct 31 01:22 board-2.bin

-rw-r--r-- 1 root root 8.0K Oct 31 01:22 board.bin

-rw-r--r-- 1 root root 765K Oct 31 01:22 firmware-5.bin

-rw-r--r-- 1 root root 734K Oct 31 01:22 firmware-6.bin

-rw-r--r-- 1 root root  46K Oct 31 01:22 notice_ath10k_firmware-5.txt

-rw-r--r-- 1 root root  53K Oct 31 01:22 notice_ath10k_firmware-6.txt
```

I have compiled ath10k support as modules, so I believe I do not need to explicitly list the firmware in my kernel configuration.

It was working before the update and having done some searching on the net, wiki and forums, I vaguely remember having this problem when I set up the laptop initially earlier this year, but I can't remember how I fixed it.

It appears to find the firmware-6.bin file because when I renamed the hw1.0 directory to hw1.1 (see dmesg output), there were extra firmware not found messages, i.e. firmware-1 to firmware-6.

BTW, the sha256sum of my board.bin does not match any of the examples I found in the wiki.  I have therefore not touched that file.

```
sha256sum /lib/firmware/ath10k/QCA9377/hw1.0/board*

0fdcc7838f478da81704de88f7b33e28862110c6d5decf7818543f8e37e6cd98  /lib/firmware/ath10k/QCA9377/hw1.0/board-2.bin

127d35d82edb46278f30c448cbca664d755ff0d5fed57b649959cdbc4208c768  /lib/firmware/ath10k/QCA9377/hw1.0/board.bin
```

Help...    :Sad: 

Brendan

----------

## Anon-E-moose

I had that happen on my laptop a while back, I just masked that particular version of linux firmware.

Barring that rather than renaming hw1.0 to hw1.1 I would have done a symbolic link of 1.0 to 1.1

----------

## bjdacre

Anon-E-moose, I thought about reverting to the previous working version of linux firmware (20180825) but when I went to the linux firmware package page https://packages.gentoo.org/packages/sys-kernel/linux-firmware it seemed to be saying all previous versions had been dropped (deleted?).  I also don't have a local copy since my monthly old package cleanup ran on 2018/11/01...

As for the directory renaming, an unintended consequence was that I was able to conclude that it was actually finding at least one of the firmware files (I have renamed it back, and yes, a symbolic link would have been cleaner way of doing what I originally intended  :Smile:  ).  As for the error messages in syslog, they are completely unhelpful since they name files that don't and never existed, although similar error messages were generated for other users who had similar firmware loading issues, but those that were solved did not seem relevant to my case.

I wish I could remember how I managed to get it going after the original installation...

----------

## carante

Hi, 

download this file manjaro.moson.eu/pool/overlay/linux-firmware-20181026.1cb4e51-0.1-any.pkg.tar.xz , unpack it, delete the directory /lib/firmware/ath10k/QCA9377 and replace it with QCA9377 in the file you downloaded. That's how I solved it.

Sorry for my English

----------

## Anon-E-moose

 *bjdacre wrote:*   

> Anon-E-moose, I thought about reverting to the previous working version of linux firmware (20180825) but when I went to the linux firmware package page https://packages.gentoo.org/packages/sys-kernel/linux-firmware it seemed to be saying all previous versions had been dropped (deleted?).  I also don't have a local copy since my monthly old package cleanup ran on 2018/11/01...
> 
> 

 

The only difference that I see betweein 20180825 and the latest 20181026 is the addition of firmware-6.bin and accompanying txt file.

the firmware-5.bin and notice_ath10k_firmware-5.txt ones are exactly the same.

If you remove firmware-6.bin and notice_ath10k_firmware-6.txt then it should work ok. 

I tried it on my laptop and removing those files made the latest work for me, I'm on kernel 4.14.62.

----------

## bjdacre

 *Anon-E-moose wrote:*   

> If you remove firmware-6.bin and notice_ath10k_firmware-6.txt then it should work ok. 

 

Voila!  Thank you very much.  I guessed that firmware 6 was loading because of the 'api 6' in one of the syslog messages.  It is now api 5.

```
dmesg | grep -i ath10k

[    8.588396] ath10k_pci 0000:02:00.0: enabling device (0000 -> 0002)

[    8.591315] ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0

[    8.806853] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:02:00.0.bin failed with error -2

[    8.806860] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/cal-pci-0000:02:00.0.bin failed with error -2

[    8.855802] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-6.bin failed with error -2

[    9.273215] ath10k_pci 0000:02:00.0: qca9377 hw1.1 target 0x05020001 chip_id 0x003821ff sub 1028:1810

[    9.273221] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0

[    9.275023] ath10k_pci 0000:02:00.0: firmware ver WLAN.TF.1.0-00002-QCATFSWPZ-5 api 5 features ignore-otp crc32 c3e0d04f

[    9.674730] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A crc32 8aedfa4a

[   10.296094] ath10k_pci 0000:02:00.0: htt-ver 3.44 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1

[   10.298603] ath10k_pci 0000:02:00.0 wlp2s0: renamed from wlan0
```

Interestingly, perhaps the error messages were meaningful and maybe the pre-cal and cal files are meant to be there for firmware 6 to work.

For the record;

```
uname -a

Linux kuhn 4.14.78-gentoo #2 SMP Fri Nov 2 16:29:20 AEDT 2018 x86_64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz GenuineIntel GNU/Linux
```

Once again, thanks.

Brendan

----------

## bjdacre

 *carante wrote:*   

> download this file manjaro.moson.eu/pool/overlay/linux-firmware-20181026.1cb4e51-0.1-any.pkg.tar.xz , unpack it, delete the directory /lib/firmware/ath10k/QCA9377 and replace it with QCA9377 in the file you downloaded

 

carante, thanks for your reply.  Anon-E-moose suggested a slightly less complicated way of achieving the same end.  If you list your files you will almost certainly see the following;

```
ls -al /lib/firmware/ath10k/QCA9377/hw1.0/

total 1.2M

drwxr-xr-x 2 root root 4.0K Nov  3 20:08 .

drwxr-xr-x 3 root root 4.0K Nov  2 13:07 ..

-rw-r--r-- 1 root root 298K Oct 31 01:22 board-2.bin

-rw-r--r-- 1 root root 8.0K Oct 31 01:22 board.bin

-rw-r--r-- 1 root root 765K Oct 31 01:22 firmware-5.bin

-rw-r--r-- 1 root root  46K Oct 31 01:22 notice_ath10k_firmware-5.txt
```

 *carante wrote:*   

> Sorry for my English

 

I perfectly understood your reply and totally appreciated it.  Thanks.    :Smile: 

Brendan

----------

## Anon-E-moose

 *bjdacre wrote:*   

> Interestingly, perhaps the error messages were meaningful and maybe the pre-cal and cal files are meant to be there for firmware 6 to work.

 

Some of the files are for other hardware that the qca9377 chip applies to, like routers, etc, so it looks for them, puts out a message, but doesn't need them.

As for firmware-6, I've seen them slip that into the drivers before and it always has the same effect (no working wifi   :Rolling Eyes:  ), so I think it's an accident that they occasionally let it in. Firmware-5 is version blah, blah, version 1.0, and firmware-6 is blah, blah version 2.1 so it's either some completely different hardware that uses that chip than a wifi set or it may be something being developed. 

Either way, just keep in mind that if wifi doesn't work in the future, look and see what firmware they've put in the directory.

Glad it's working.

----------

