aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2018-04-12 13:29:34 +0200
committerJo-Philipp Wich <jo@mein.io>2018-12-18 17:22:06 +0100
commit251f4fd20e7c70565b9753743bd27bf96000061e (patch)
treee6be3bc528f1381520117a5541f5e39105aaddea /package/network
parent860e2dac40db3d14c241302ead9702b0753e7f8a (diff)
downloadupstream-251f4fd20e7c70565b9753743bd27bf96000061e.tar.gz
upstream-251f4fd20e7c70565b9753743bd27bf96000061e.tar.bz2
upstream-251f4fd20e7c70565b9753743bd27bf96000061e.zip
uqmi: add timeout option value
This value will be used for now during following situations: * Ask the sim with the uqmi --get-pin-status command. * Wait for network registration with the uqmi --get-serving-system command. This two commands wait forever in a while loop. Add a timeout to stop waiting and so inform netifd. Signed-off-by: Florian Eckert <fe@dev.tdt.de> (backported from dee93def394c9bf10d2cc3eb64d9e190ca461a67)
Diffstat (limited to 'package/network')
-rwxr-xr-xpackage/network/utils/uqmi/files/lib/netifd/proto/qmi.sh7
1 files changed, 5 insertions, 2 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 b2d7345211..a0dcb17cde 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -22,17 +22,20 @@ proto_qmi_init_config() {
proto_config_add_boolean dhcpv6
proto_config_add_boolean autoconnect
proto_config_add_int plmn
+ proto_config_add_int timeout
proto_config_add_defaults
}
proto_qmi_setup() {
local interface="$1"
local dataformat connstat
- local device apn auth username password pincode delay modes pdptype profile dhcpv6 autoconnect plmn $PROTO_DEFAULT_OPTIONS
+ local device apn auth username password pincode delay modes pdptype profile dhcpv6 autoconnect plmn timeout $PROTO_DEFAULT_OPTIONS
local ip4table ip6table
local cid_4 pdh_4 cid_6 pdh_6
local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6
- json_get_vars device apn auth username password pincode delay modes pdptype profile dhcpv6 autoconnect plmn ip4table ip6table $PROTO_DEFAULT_OPTIONS
+ json_get_vars device apn auth username password pincode delay modes pdptype profile dhcpv6 autoconnect plmn ip4table ip6table timeout $PROTO_DEFAULT_OPTIONS
+
+ [ "$timeout" = "" ] && timeout="10"
[ "$metric" = "" ] && metric="0"