Reloading WiFi driver
On my laptop the iwlwifi driver sadly sometimes crashes... so how do I reload it without rebooting?
With a wifireset script:
#!/usr/bin/env bash # Stop iwd and disconnect Wi-Fi sudo systemctl stop iwd # Unload the Intel Wi-Fi driver sudo modprobe -r iwlmvm iwlwifi # Reload the driver sudo modprobe iwlwifi # Restart iwd sudo systemctl start iwd
By default, the WiFi device then enumerates as wlan<n+1>.
To stop that from happening, create a /etc/systemd/network/10-wlan0.link:
[Match]
MACAddress=aa:bb:cc:dd:ee:ff
[Link]
Name=wlan0