Lenovo (especially Thinkpad) laptops that have the QCA9377 WiFi PCI-Express chip has frequent disconnects and/or very low throughput intermittently. The only way to fix this issue is here:
First of all, backup the firmware files we are about to replace:
$ sudo mv /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin.bak
$ sudo mv /lib/firmware/ath10k/QCA9377/hw1.0/firmware-6.bin /lib/firmware/ath10k/QCA9377/hw1.0/firmware-6.bin.bak
Now, get the best firmware available for this chip at the time of this writing (13 January 2022) and put it in the right place:
$ git clone https://github.com/kvalo/ath10k-firmware.git
$ sudo cp -r ath10k-firmware/QCA9377 /lib/firmware/ath10k/$
$ sudo mv /lib/firmware/ath10k/QCA9377/hw1.0/CNSS.TF.1.0/firmware-5.bin_CNSS.TF.1.0-00267-QCATFSWPZ-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin
If this does not fully solve the issue, try changing the kernel command line in /etc/default/grub as follows:
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=off ipv6.disable=1"
GRUB_CMDLINE_LINUX="pcie_aspm=off ipv6.disable=1"
This is assuming that your configuration has WiFi chip on PCI-Express interface. Otherwise, only try the option to disable IPv6.