Author: blogic
Date: 2015-04-21 15:18:40 +0200 (Tue, 21 Apr 2015)
New Revision: 45555

Modified:
   trunk/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
Log:
umbim: auto retry when bringup fails

Signed-off-by: John Crispin <[email protected]>

Modified: trunk/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
===================================================================
--- trunk/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh    
2015-04-21 12:42:42 UTC (rev 45554)
+++ trunk/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh    
2015-04-21 13:18:40 UTC (rev 45555)
@@ -19,7 +19,7 @@
        proto_config_add_string password
 }
 
-proto_mbim_setup() {
+_proto_mbim_setup() {
        local interface="$1"
        local tid=2
        local ret
@@ -140,6 +140,20 @@
        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() {
        local interface="$1"
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to