diff options
author | John Klug <john.klug@multitech.com> | 2021-12-08 17:21:38 -0600 |
---|---|---|
committer | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2022-01-11 16:54:39 +0200 |
commit | db0fa2189c47518bc6fdb82f84109705bb7cb53a (patch) | |
tree | 9a7cbc2dbdb7bb992935571cddf67f3ff894e0ad /recipes-kernel | |
parent | 0e2ddfb80af9165ed63b3fb420876bf6f1056698 (diff) | |
download | meta-multitech-atmel-db0fa2189c47518bc6fdb82f84109705bb7cb53a.tar.gz meta-multitech-atmel-db0fa2189c47518bc6fdb82f84109705bb7cb53a.tar.bz2 meta-multitech-atmel-db0fa2189c47518bc6fdb82f84109705bb7cb53a.zip |
User /etc/init.d/rs9113 reset in /etc/init.d/rs9113-reset
Diffstat (limited to 'recipes-kernel')
-rwxr-xr-x | recipes-kernel/rs9113/files/rs9113/rs9113.init | 24 | ||||
-rwxr-xr-x | recipes-kernel/rs9113/files/rs9113/rs9113.reset | 4 |
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 |