added mr Android.mk and licence file
[wilink8-wlan/wl18xx-target-scripts.git] / mr / ap_remove.sh
1 #!/system/bin/sh
3 INSMOD=/system/bin/insmod
4 RMMOD=/system/bin/rmmod
5 IFCONFIG=/system/bin/ifconfig
6 HOSTAPD_CLI=/system/bin/wpa_cli
7 IW=/system/bin/iw
9 WLAN_IF=wlan1
10 WLAN_IF_MON=mon.$WLAN_IF
12 SERVICE_HOSTAPD=hostapd_bin
14 echo "kill udhcpd"
15 killall udhcpd
17 echo "unload hostapd"
18 setprop ctl.stop $SERVICE_HOSTAPD
19 sleep 1
21 echo "disable interface"
22 $IFCONFIG $WLAN_IF down
23 $IFCONFIG $WLAN_IF_MON down
24 sleep 1
26 echo "Removing interface"
27 $IW $WLAN_IF del
28 sleep 1