summaryrefslogtreecommitdiff
path: root/recipes-kernel
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-12-08 17:21:38 -0600
committerJohn Klug <john.klug@multitech.com>2021-12-29 08:35:07 -0600
commit0e25b84a7945cccb001d774a0c95c7a5272bc96e (patch)
treed8aa7188eed7b4ed92c511badad49c08111cb424 /recipes-kernel
parent8007aeb47108a3ccd38e5e607b81056a568f9240 (diff)
downloadmeta-multitech-atmel-0e25b84a7945cccb001d774a0c95c7a5272bc96e.tar.gz
meta-multitech-atmel-0e25b84a7945cccb001d774a0c95c7a5272bc96e.tar.bz2
meta-multitech-atmel-0e25b84a7945cccb001d774a0c95c7a5272bc96e.zip
User /etc/init.d/rs9113 reset in /etc/init.d/rs9113-reset
Diffstat (limited to 'recipes-kernel')
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.init24
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.reset4
2 files changed, 16 insertions, 12 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.init b/recipes-kernel/rs9113/files/rs9113/rs9113.init
index e27a35d..b6c6e37 100755
--- a/recipes-kernel/rs9113/files/rs9113/rs9113.init
+++ b/recipes-kernel/rs9113/files/rs9113/rs9113.init
@@ -21,13 +21,7 @@ RS9113_WKUP=${MTS_IODIR}/wifi-bt-lpwkup
. $CONFIG
-case "$1" in
- start)
- if ((RS9113_LOAD == 0)) ; then
- # We don't want the driver loaded.
- exit 0
- fi
-
+function rs9113_reset {
for i in {1..5} ; do
if [[ -f $RS9113_RESET ]] ; then
break
@@ -58,6 +52,15 @@ case "$1" in
/usr/bin/lsusb | logger -t rs9113 -p error -s
fi
done
+}
+
+case "$1" in
+ start)
+ if ((RS9113_LOAD == 0)) ; then
+ # We don't want the driver loaded.
+ exit 0
+ fi
+ rs9113_reset
/usr/bin/logger -t "rs9113" -p info -s "Loading rs9113 modules with COEX=$COEX_MODE and Country=$SET_COUNTRY_CODE"
/usr/sbin/rs9113_load_modules.sh $CONFIG
RETVAL=$?
@@ -82,7 +85,7 @@ case "$1" in
$0 stop
sleep 1
$0 start
- ;;
+ ;;
status)
for dir in /sys/class/net/rpine[0-9]* ; do
if [[ -d ${dir} ]] ; then
@@ -93,8 +96,11 @@ case "$1" in
echo Driver is not loaded
exit 3
;;
+ reset)
+ rs9113_reset
+ ;;
*)
- "Usage: $0 {start|stop|status|restart}"
+ "Usage: $0 {start|stop|status|restart|reset}"
exit 2
;;
esac
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.reset b/recipes-kernel/rs9113/files/rs9113/rs9113.reset
index b4aca45..7992f7d 100755
--- a/recipes-kernel/rs9113/files/rs9113/rs9113.reset
+++ b/recipes-kernel/rs9113/files/rs9113/rs9113.reset
@@ -6,9 +6,7 @@ function do_reset {
if ! [[ -w /sys/devices/platform/mts-io/wifi-bt-reset ]] ; then
exit 0
fi
- mts-io-sysfs store wifi-bt-reset 0
- usleep 60000
- mts-io-sysfs store wifi-bt-reset 1
+ /etc/init.d/rs9113 reset
}
case $1 in