diff options
author | Arron Wang <arron.wang@intel.com> | 2013-08-29 15:17:48 +0800 |
---|---|---|
committer | Arron Wang <arron.wang@intel.com> | 2013-08-29 15:20:25 +0800 |
commit | a26c493027fb4261b7fea7579b11a20bd4792fd8 (patch) | |
tree | 0d799b38b4e647d0c7ada4583dcb4e600ac6e0a4 | |
parent | d72bc54ea4f3fc8ab3453dfd1a6e2c5a4c0a22f9 (diff) | |
download | system-plugin-ia-generic-a26c493027fb4261b7fea7579b11a20bd4792fd8.tar.gz system-plugin-ia-generic-a26c493027fb4261b7fea7579b11a20bd4792fd8.tar.bz2 system-plugin-ia-generic-a26c493027fb4261b7fea7579b11a20bd4792fd8.zip |
Update wlan.sh for clovertrail
Change-Id: Ib3d6dd261e6740f7b02e9f113b24c579aac9ac1b
-rw-r--r-- | packaging/system-plugin-ia-generic.changes | 3 | ||||
-rwxr-xr-x | usr/bin/wlan.sh | 43 |
2 files changed, 46 insertions, 0 deletions
diff --git a/packaging/system-plugin-ia-generic.changes b/packaging/system-plugin-ia-generic.changes index 06dbc31..eab4ad0 100644 --- a/packaging/system-plugin-ia-generic.changes +++ b/packaging/system-plugin-ia-generic.changes @@ -1,3 +1,6 @@ +* Thu Aug 29 2013 Arron Wang <arron.wang@intel.com> +- Update wlan.sh for clovetrail + * Fri Dec 14 2012 Chengwei Yang <chengwie.yang@intel.com> - Mount /dev/shm diff --git a/usr/bin/wlan.sh b/usr/bin/wlan.sh index 1a24852..37c807f 100755 --- a/usr/bin/wlan.sh +++ b/usr/bin/wlan.sh @@ -1 +1,44 @@ #!/bin/sh + +IFACE_NAME=wlan0 + +start() +{ + if /sbin/ifconfig -a | /bin/grep ${IFACE_NAME} > /dev/null + then + /bin/echo "wlan.sh start exit 1" + exit 1 + fi + + if [ "${MODEL_NAME}" = "Z2580" ] + then + /sbin/modprobe bcmdhd + /bin/usleep 500000 + /sbin/ifconfig ${IFACE_NAME} up + fi +} + +stop() +{ + if [ "${MODEL_NAME}" = "Z2580" ] + then + /bin/sleep 1 + /sbin/rmmod bcmdhd + fi +} + +MODEL_NAME=`grep "model name" /proc/cpuinfo | sort -u |cut -d" " -f6` + + +case $1 in +"start") +start +;; +"stop") +stop +;; +*) +/bin/echo wlan.sh [start] [stop] +exit 1 +;; +esac |