Setting up ath10k

This post is meant as a simple reminder of how to get WIFI working in the event that I have to reinstall Debian on my Lenovo Flex 5, which appears to be a newer firmware.

First, run mkdir -p /lib/firmware/ath10k to create the subdirectory ath10k if it doesn't already exist. Now copy the QCA6174 directory from this GitHub repo there and rename the files QCA6174/hw*/firmware-5.bin* to just firmware*.bin.

Now reboot, and whoala! WIFI works.

Unfortunately, there still appears to be a few fails while loading the firmware, which I'll have to look into at some point. But for now, this is a quick fix to get things moving.
$ sudo dmesg | grep ath10k
[    2.186725] ath10k_pci 0000:03:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[    2.463755] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/pre-cal-pci-0000:03:00.0.bin (-2)
[    2.463756] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:03:00.0.bin failed with error -2
[    2.463765] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/cal-pci-0000:03:00.0.bin (-2)
[    2.463765] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2
[    2.463926] ath10k_pci 0000:03:00.0: firmware: failed to load ath10k/QCA6174/hw3.0/firmware-5.bin (-2)
[    2.463927] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA6174/hw3.0/firmware-5.bin failed with error -2
[    2.463928] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA6174/hw3.0/firmware-5.bin': -2
[    2.465495] ath10k_pci 0000:03:00.0: firmware: direct-loading firmware ath10k/QCA6174/hw3.0/firmware-4.bin
[    2.465499] ath10k_pci 0000:03:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 17aa:0827
[    2.465500] ath10k_pci 0000:03:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
[    2.465920] ath10k_pci 0000:03:00.0: firmware ver WLAN.RM.2.0-00180-QCARMSWPZ-1 api 4 features wowlan,ignore-otp,no-4addr-pad crc32 75dee6c5
[    2.529062] ath10k_pci 0000:03:00.0: firmware: direct-loading firmware ath10k/QCA6174/hw3.0/board-2.bin
[    2.529311] ath10k_pci 0000:03:00.0: board_file api 2 bmi_id N/A crc32 07ee144e
[    4.660655] ath10k_pci 0000:03:00.0: htt-ver 3.26 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[    4.745475] ath10k_pci 0000:03:00.0 wlp3s0: renamed from wlan0