I found the solution. Basically, it is here https://askubuntu.com/a/1320583. However, I cannot compile the git repo. Instead, I use the intel repo, see below.
First, install some necessary package
sudo apt install flex bison
clone the backport repo, compile and install it:
git clone https://github.com/intel/backport-iwlwifi.git
cd backport-iwlwifi
sudo make defconfig-iwlwifi-public
sudo make
sudo make install
The above probably worked in January 2022, but a year later you can have a problem to compile. So you need a little modification to above instruction. After cd backport-iwlwifi
go back to the older version of the repository and then open the sources:
git checkout 5b3f6ff8
cd iwlwifi-stack-dev
If you still have problems with compilation then apply this patch: https://www.spinics.net/lists/backports/msg05376.html (just edit manually nano backport-include/linux/mod_devicetable.h
and add 4 lines before end):
--- a/backport/backport-include/linux/mod_devicetable.h
+++ b/backport/backport-include/linux/mod_devicetable.h
@@ -29,4 +29,8 @@ struct mhi_device_id {
};
#endif
+#if LINUX_VERSION_IS_LESS(4,17,0)
+#define DMI_OEM_STRING (DMI_STRING_MAX + 1)
+#endif /* < 4.17.0 */
#endif /* __BACKPORT_MOD_DEVICETABLE_H */
Then go back to instruction: configure, compile and install.
Third, download the driver, or you can download your driver from Intel website.
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
cd linux-firmware/
sudo cp iwlwifi-* /lib/firmware/
Reboot the machine and it works for me.