summaryrefslogtreecommitdiffstats
path: root/reset-module.sh
blob: 8f114be3721ee664129355b05c0450bd151df846 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if [[ $UID != 0 ]]; then
	echo "You must be root."
	exit -1
fi

ifconfig wlan0 down

/etc/init.d/dhcpcd stop
/etc/init.d/wpa_supplicant stop

rmmod iwldvm
rmmod iwlwifi
modprobe iwlwifi

iwconfig wlan0 power on
ifconfig wlan0 up

/etc/init.d/wpa_supplicant start
/etc/init.d/dhcpcd start