"Reload the Driver"
Find the module name
Let's find the name of the kernel module for your wireless connection:
sudo hwinfo --network
(Install package hwinfo
if you don't have it.)
Look for the module name in the "Driver" line.
Reload the module
Now unload then re-load the module.
For example, my module name is iwlwifi
You might get lucky with no error message, in which case you can immediately reload it with
$ sudo modprobe iwlwifi
but most probably you will get this failure message:
$ sudo modprobe -r iwlwifi
modprobe: FATAL: Module iwlwifi is in use.
So we go looking for other modules using iwlwifi
:
$ lsmod |grep iwlwifi
iwlwifi 241664 1 iwldvm
cfg80211 765952 4 iwldvm,iwlwifi,mac80211,rtl8187
On the left is the module name, and on the right are the other modules using it.
So let's try disabling iwldvm
first:
$ sudo modprobe -r iwldvm
If this works, then we can now successfully disable iwlwifi
$ sudo modprobe -r iwlwifi
And now re-enable both modules in the reverse order:
$ sudo modprobe iwlwifi
$ sudo modprobe iwldvm
Done!
This is the only procedure that worked for me in resetting low level settings (frag, rate) that I had set using iwconfig
.
What it does effectively is "reload the driver".