umbim: auto retry when bringup fails
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45555
This commit is contained in:
parent
03dd7b6bdb
commit
acf74d9b6a
1 changed files with 15 additions and 1 deletions
|
@ -19,7 +19,7 @@ proto_mbim_init_config() {
|
||||||
proto_config_add_string password
|
proto_config_add_string password
|
||||||
}
|
}
|
||||||
|
|
||||||
proto_mbim_setup() {
|
_proto_mbim_setup() {
|
||||||
local interface="$1"
|
local interface="$1"
|
||||||
local tid=2
|
local tid=2
|
||||||
local ret
|
local ret
|
||||||
|
@ -140,6 +140,20 @@ proto_mbim_setup() {
|
||||||
ubus call network add_dynamic "$(json_dump)"
|
ubus call network add_dynamic "$(json_dump)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proto_mbim_setup() {
|
||||||
|
local ret
|
||||||
|
|
||||||
|
_proto_mbim_setup $@
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
[ "$ret" = 0 ] || {
|
||||||
|
logger "mbim bringup failed, retry in 15s"
|
||||||
|
sleep 15
|
||||||
|
}
|
||||||
|
|
||||||
|
return $rt
|
||||||
|
}
|
||||||
|
|
||||||
proto_mbim_teardown() {
|
proto_mbim_teardown() {
|
||||||
local interface="$1"
|
local interface="$1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue