aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/uqmi
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-04-21 13:18:46 +0000
committerJohn Crispin <blogic@openwrt.org>2015-04-21 13:18:46 +0000
commit86a65a43fec43d45dcb6087cdaf1627ff931af44 (patch)
treed2409b9d4d4caff14c9639878dd660ba6bd94f17 /package/network/utils/uqmi
parent2549c08bb2ba5091889e5f352c67f75bff76f09e (diff)
downloadmaster-187ad058-86a65a43fec43d45dcb6087cdaf1627ff931af44.tar.gz
master-187ad058-86a65a43fec43d45dcb6087cdaf1627ff931af44.tar.bz2
master-187ad058-86a65a43fec43d45dcb6087cdaf1627ff931af44.zip
uqmi: auto retry when bringup fails
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45556 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/uqmi')
-rwxr-xr-xpackage/network/utils/uqmi/files/lib/netifd/proto/qmi.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index 9ae60169ea..25e5d1f521 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -34,7 +34,7 @@ qmi_wds_release() {
uci_revert_state network $interface cid
}
-proto_qmi_setup() {
+_proto_qmi_setup() {
local interface="$1"
local device apn auth username password pincode delay modes cid pdh
@@ -132,6 +132,20 @@ proto_qmi_setup() {
ubus call network add_dynamic "$(json_dump)"
}
+proto_qmi_setup() {
+ local ret
+
+ _proto_qmi_setup $@
+ ret=$?
+
+ [ "$ret" = 0 ] || {
+ logger "qmi bringup failed, retry in 15s"
+ sleep 15
+ }
+
+ return $rt
+}
+
proto_qmi_teardown() {
local interface="$1"