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).
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 0x00000000ath10k_pci 0000:03:00.0: [04]: 0x00A0F776 0x00060130 0x00000010 0xFFFFE000ath10k_pci 0000:03:00.0: [08]: 0x0042136C 0x00420660 0x00400000 0x00400000ath10k_pci 0000:03:00.0: [12]: 0x00000000 0x00000000 0x00952CD0 0x00952CE6ath10k_pci 0000:03:00.0: [16]: 0x00000002 0x01010101 0x00000003 0x0000000Aath10k_pci 0000:03:00.0: [20]: 0x00000328 0x00429880 0x009A37AC 0x00000032ath10k_pci 0000:03:00.0: [24]: 0x800A0D0A 0x0040EA88 0x00420170 0x004173B0ath10k_pci 0000:03:00.0: [28]: 0x00401F64 0x00401F68 0x00000000 0x00417550ath10k_pci 0000:03:00.0: [32]: 0x00401FC0 0x8167A03C 0x00404940 0x00000003ath10k_pci 0000:03:00.0: [36]: 0x800A0907 0x00000001 0x0000085B 0x339011B2ath10k_pci 0000:03:00.0: [40]: 0x0000FFFE 0x0000000A 0x009BFE28 0x009BE0DCath10k_pci 0000:03:00.0: [44]: 0x800A0D0A 0x0040EA88 0x00420170 0x004173B0ath10k_pci 0000:03:00.0: [48]: 0x00400000 0x00400000 0x00000001 0xFFFFFFFFath10k_pci 0000:03:00.0: [52]: 0x800A0614 0x0040EAA8 0x0041FA10 0x00420170ath10k_pci 0000:03:00.0: [56]: 0x00400000 0x00421370 0x00419980 0x004212E8ath10k_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: -110ath10k_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 startedThis 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/
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).
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 -yAt 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 -yOnce completed, perform a reboot and watch the changes.
$ sudo rebootOnce 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.
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.binboard2.bin replacing local /lib/firmware/ath10k/QCA9377/hw1.0/board2.bin/lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin :CNSS.TF.1.0/firmware-5.bin_CNSS.TF.1.0-00267-QCATFSWPZ-1WLAN.TF.1.0/firmware-5.bin_WLAN.TF.1.0-00002-QCATFSWPZ-5For 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.
If both fails, you need to check the module hardware or the location you copied is correct. Otherwise, you have a few choices:
That's all about fixing the terrible wifi problem on Debian.