aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-06-27 14:42:48 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:23:09 +0200
commitbd8e0746c8435fa267ab819deb737b02ce3cf2fb (patch)
tree7eb8854c1229f9aa491ec33ce5bdfba1acef6b1c /package
parentffdf98b2047c35c65dc7c7902b8ad8664f89c840 (diff)
downloadupstream-bd8e0746c8435fa267ab819deb737b02ce3cf2fb.tar.gz
upstream-bd8e0746c8435fa267ab819deb737b02ce3cf2fb.tar.bz2
upstream-bd8e0746c8435fa267ab819deb737b02ce3cf2fb.zip
uqmi: add mtu config option possibility
There are mobile carrier who have different MTU size in their network. With this change it is now possible to configure this with the qmi proto handler. Signed-off-by: Florian Eckert <fe@dev.tdt.de> (cherry picked from commit 8eb63cb7df4db3c92a9a010accc9b8444d06d4a2)
Diffstat (limited to 'package')
-rwxr-xr-xpackage/network/utils/uqmi/files/lib/netifd/proto/qmi.sh10
1 files changed, 8 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 f4b30b87eb..81daddd0cc 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -23,17 +23,18 @@ proto_qmi_init_config() {
proto_config_add_boolean autoconnect
proto_config_add_int plmn
proto_config_add_int timeout
+ proto_config_add_int mtu
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 timeout $PROTO_DEFAULT_OPTIONS
+ local device apn auth username password pincode delay modes pdptype profile dhcpv6 autoconnect plmn timeout mtu $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 timeout $PROTO_DEFAULT_OPTIONS
+ json_get_vars device apn auth username password pincode delay modes pdptype profile dhcpv6 autoconnect plmn ip4table ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
[ "$timeout" = "" ] && timeout="10"
@@ -68,6 +69,11 @@ proto_qmi_setup() {
return 1
}
+ [ -n "$mtu" ] && {
+ echo "Setting MTU to $mtu"
+ /sbin/ip link set dev $ifname mtu $mtu
+ }
+
echo "Waiting for SIM initialization"
local uninitialized_timeout=0
while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do