summaryrefslogtreecommitdiffstats
path: root/reset-module.sh
blob: a9e022094e1ab948a72c6020c412ccb297b6421f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
sleep 1

iwconfig wlan0 power on
ifconfig wlan0 up

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