Atheros QCA9377 Network Controller

If you're using Lenovo Ideapad 330 with Debian Stretch, you're going to bump into wireless Atheros QCA9377 firmware issue (crashing firmware dated 1/8/2019). This is the guide on how to fix it (and subsequently break the Debian stable branch rules without a choice).


Current Problem

Existing firmware 5 is badly broken and crashed on Lenovo Ideapad 330 model. On boot, the ath10k_pci will report the firmware has crashed:

ath10k_pci 0000:03:00.0: firmware crashed! (uuid 761def23-1d0f-4661-8751-35a0c8cf7610)
ath10k_pci 0000:03:00.0: firmware register dump:
ath10k_pci 0000:03:00.0: [00]: 0x05020001 0x00000000 0x00A0F776 0x00000000
ath10k_pci 0000:03:00.0: [04]: 0x00A0F776 0x00060130 0x00000010 0xFFFFE000
ath10k_pci 0000:03:00.0: [08]: 0x0042136C 0x00420660 0x00400000 0x00400000
ath10k_pci 0000:03:00.0: [12]: 0x00000000 0x00000000 0x00952CD0 0x00952CE6
ath10k_pci 0000:03:00.0: [16]: 0x00000002 0x01010101 0x00000003 0x0000000A
ath10k_pci 0000:03:00.0: [20]: 0x00000328 0x00429880 0x009A37AC 0x00000032
ath10k_pci 0000:03:00.0: [24]: 0x800A0D0A 0x0040EA88 0x00420170 0x004173B0
ath10k_pci 0000:03:00.0: [28]: 0x00401F64 0x00401F68 0x00000000 0x00417550
ath10k_pci 0000:03:00.0: [32]: 0x00401FC0 0x8167A03C 0x00404940 0x00000003
ath10k_pci 0000:03:00.0: [36]: 0x800A0907 0x00000001 0x0000085B 0x339011B2
ath10k_pci 0000:03:00.0: [40]: 0x0000FFFE 0x0000000A 0x009BFE28 0x009BE0DC
ath10k_pci 0000:03:00.0: [44]: 0x800A0D0A 0x0040EA88 0x00420170 0x004173B0
ath10k_pci 0000:03:00.0: [48]: 0x00400000 0x00400000 0x00000001 0xFFFFFFFF
ath10k_pci 0000:03:00.0: [52]: 0x800A0614 0x0040EAA8 0x0041FA10 0x00420170
ath10k_pci 0000:03:00.0: [56]: 0x00400000 0x00421370 0x00419980 0x004212E8
ath10k_pci 0000:03:00.0: failed to receive control response completion, polling..
ath10k_pci 0000:03:00.0: ctl_resp never came in (-110)
ath10k_pci 0000:03:00.0: failed to connect to HTC: -110
ath10k_pci 0000:03:00.0: could not init core (-110)
ath10k_pci 0000:03:00.0: could not probe fw (-110)
ath10k_pci 0000:03:00.0: cannot restart a device that hasn't been started

This shares the same issue reported on Slackware forum: https://www.linuxquestions.org/questions/slackware-14/%5Bslackware64-14-2%5D-loading-error-of-ath10k-firmware-with-latest-kernel-firmware-and-latest-kernel-huge-4175631957/


Recommended Proposals

  • Apply the amendment guided here
  • Wait for Debian 10 - Buster
  • Change the Network Card to something else

Enable Backport

We need the latest kernel and firmware to make it working. You should enable backport, and nonfree by minimum (refer Contrib, Non-Free, and Backport Sources).

Install Firmwares from Backports

After getting your source list updated, it's time to install the firmwares. Keep in mind that the default backport firmware-5 has various versions. On Lenovo Ideapad 330, the default version is broken. However, we need to package to be there so we will install them. The command is as follow:

$ sudo apt -t stretch-backports install firmware-atheros -y

At the same time, if Debian compliant that you need to install other firmwares, you can perform them as well. Example, Realtek,

$ sudo apt -t stretch-backports install firmware-realtek -y

Once completed, perform a reboot and watch the changes.

$ sudo reboot

Check Wifi Availability

Once returned, login and check your wifi availability (or watch the loading dmesg log for firmware failures). If they still persist, you then proceed to next step.

Otherwise, you're done.

Visit Atheros Firmware Repository

There is an Atheros firmware repository made available for you to download. You need an ethernet connection or otherwise, use another system to do offline transfers. There are 3 files in this directory: https://github.com/kvalo/ath10k-firmware/tree/master/QCA9377/hw1.0

  • board.bin replacing local /lib/firmware/ath10k/QCA9377/hw1.0/board.bin
  • board2.bin replacing local /lib/firmware/ath10k/QCA9377/hw1.0/board2.bin
  • Either the following for replacing local /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin :
    • CNSS.TF.1.0/firmware-5.bin_CNSS.TF.1.0-00267-QCATFSWPZ-1
    • WLAN.TF.1.0/firmware-5.bin_WLAN.TF.1.0-00002-QCATFSWPZ-5

For the last one (firmware-5.bin), you need to test each of them one by one by rebooting. Either one of them should work. For Lenovo Ideapad 330, it was found that CNSS.TF.1.0 is the one that is working fine.

Still Fails?

If both fails, you need to check the module hardware or the location you copied is correct. Otherwise, you have a few choices:

  • Replace the wifi module with other common one like Intel network card.
  • Raise a bug report to Debian team related to this matter.
  • Wait for Debian 10 Buster release
  • Use an external wifi adapter.

That's all about fixing the terrible wifi problem on Debian.