added mr Android.mk and licence file
[wilink8-wlan/wl18xx-target-scripts.git] / mr / p2p_remove.sh
1 #!/system/bin/sh
3 INSMOD=/system/bin/insmod
4 RMMOD=/system/bin/rmmod
5 IFCONFIG=/system/bin/ifconfig
6 WPA_CLI=/system/bin/wpa_cli
7 IW=/system/bin/iw
9 WLAN_IF=p2p_wlan0
10 WLAN_IF_MON=mon.$WLAN_IF
11 WLAN_PID=`ps | grep [p2p_]wlan0 | cut -f3 -d' '`
13 SERVICE_SUPPLICANT=wpa_supplicant
15 echo "unload supplicant"
16 kill $WLAN_PID
17 sleep 1
19 echo "disable interface"
20 $IFCONFIG $WLAN_IF down
21 $IFCONFIG $WLAN_IF_MON down
22 sleep 1
24 echo "Removing interface"
25 $IW $WLAN_IF del
26 sleep 1