2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
4 PROGRAM="@SBIN_DIR@/wpa_supplicant"
8 HARDWARE_MODEL=`@BIN_DIR@/grep Hardware /proc/cpuinfo | @BIN_DIR@/awk "{print \\$3}"`
9 @BIN_DIR@/echo "Hardware Model=${HARDWARE_MODEL}"
11 if [ -e @TZ_SYS_ETC@/p2p_supp.conf ]; then
12 echo "File exist: @TZ_SYS_ETC@/p2p_supp.conf"
14 echo "File not exist. Reinstall: @TZ_SYS_ETC@/p2p_supp.conf"
15 @BIN_DIR@/cp @TZ_SYS_RO_ETC@/wifi-direct/p2p_supp.conf @TZ_SYS_ETC@/
17 ## For Hawk-P Platform, Hardware model is Samsung
18 if [ $HARDWARE_MODEL = "Samsung" ];then
19 @SBIN_DIR@/wpa_supplicant -t -B -ddd -Dnl80211 -ip2p0 -c@TZ_SYS_ETC@/p2p_supp.conf -g@TZ_SYS_RUN@/wpa_global -f/opt/usr/data/network/wpa_supplicant.log
21 @BIN_DIR@/wpa_supplicant -t -B -ddd -O @TZ_SYS_RUN@/wpa_supplicant-Dnl80211 -iwlan0 -c@TZ_SYS_ETC@/p2p_supp.conf -f/opt/usr/data/network/wpa_supplicant.log
27 if [ -e @TZ_SYS_ETC@/p2p_supp.conf ]; then
28 echo "File exist: @TZ_SYS_ETC@/p2p_supp.conf"
30 echo "File not exist. Reinstall: @TZ_SYS_ETC@/p2p_supp.conf"
31 @BIN_DIR@/cp @TZ_SYS_RO_ETC@/wifi-direct/p2p_supp.conf @TZ_SYS_ETC@/
33 @BIN_DIR@/wpa_supplicant -t -B -ddd -Dnl80211 -ip2p0 -c@TZ_SYS_ETC@/p2p_supp.conf -f/opt/usr/data/network/wpa_supplicant.log
39 run=`@BIN_DIR@/ps -eo comm| @BIN_DIR@/grep ${program}`
40 if [ "X${run}" == "X" ]; then
41 echo "${program} is not running"
42 if [ -e @TZ_SYS_ETC@/p2p_supp.conf ]; then
43 echo "File exist: @TZ_SYS_ETC@/p2p_supp.conf"
45 echo "File not exist. Reinstall: @TZ_SYS_ETC@/p2p_supp.conf"
46 @BIN_DIR@/cp @TZ_SYS_RO_ETC@/wifi-direct/p2p_supp.conf @TZ_SYS_ETC@/
48 @BIN_DIR@/wpa_supplicant -t -B -u -ddd -O @TZ_SYS_RUN@/wpa_supplicant -g/var/run/wpa_global -K -f/opt/usr/data/network/wpa_supplicant.log
50 echo "${program} is already running"
56 @BIN_DIR@/pkill -x wpa_supplicant
73 /bin/echo p2p_supp.sh [start] [start_p2p0] [start_dbus] [stop]