[Linux] Lenovo Thinkpad T500 WiFi issue

As they say, I'm just going to leave this here, for those desperates landing at this page when googling, who have a hard time fixing this error (bug?) in WiFi Linux drivers.

Ubuntu 19/20 Linux (kernel 5.3.0 in my case) have unstable drivers for both Intel Corporation PRO/Wireless 5100 AGN and Intel Corporation Ultimate N WiFi Link 5300, the ones can be found in Thinkpad T500.

Connection is unstable, with errors in dmesg like:

kernel: iwlwifi 0000:02:00.0: Microcode SW error detected.  Restarting 0x2000000.
kernel: iwlwifi 0000:02:00.0: CSR values:
kernel: iwlwifi 0000:02:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG)
kernel: iwlwifi 0000:02:00.0:        CSR_HW_IF_CONFIG_REG: 0X40489204
In my case, the following option in the /etc/modprobe.d/iwlwifi.conf file has helped:
# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211

options iwlwifi led_mode=1 swcrypto=1 # add this

(led_mode=1 will also disable irritating blinking WiFi led.)

I've found this solution here. HTH. YMMV.

Please drop me email about bug(s) and/or suggestion(s): blog@yurichev.com. List of other blog posts. BTW, I'm teaching. Follow me in social networks: Twitter, Telegram, GitHub, Discord, Facebook.