uqmi: add timeout option value
[openwrt/staging/lynxis.git] / package / network / utils / uqmi / files / lib / netifd / proto / qmi.sh
index b2d7345211734af4e674d65aef51c5af09346911..a0dcb17cde0ab4a9123bb9aa440cd13ab411348b 100755 (executable)
@@ -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"