#!/bin/sh
killall -9 zte_topsw_lan
killall wpa_supplicant
killall hostapd

if [ "$1" = "start_ftm" ]; then

	rmmod dhd
	echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
	sleep 1
	echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/bind
	sleep 1
	bcmdl -n /etc/bcm43241/nvram_hsic.txt /etc/bcm43241/rf_hsic_fw.bin.trx
	insmod /etc/bcm43241/dhd.ko
elif [ "$1" = "stop" ]; then

	rmmod dhd
	echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
	exit 0
else
	echo "wrong parameter $1"
	exit 0
fi
ifconfig eth0 up