diff options
author | David Bauer <mail@david-bauer.net> | 2023-10-09 16:29:59 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2023-10-31 21:12:15 +0100 |
commit | c1fcce111290875ca463d785550d53e2ff6014fd (patch) | |
tree | 57f55ba400eec7d4650dcce2e7710b3b319f23af /package | |
parent | 0bc2b2a7803ad28702ec83cdce13c694ecaaef34 (diff) |
uqmi: set RAT preference before attach
Set the RAT preference before attaching. This handles cases better,
where a network might be available but not with the preferred RAT.
If RAT is changed to a non-available RAT after attach, QMI does not fail
with missing registration but with failing to establish a PDP session.
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 8 |
1 files changed, 7 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 8c335b5775..96555f537c 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -252,6 +252,13 @@ proto_qmi_setup() { uqmi -s -d "$device" --network-register > /dev/null 2>&1 + [ -n "$modes" ] && { + uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1 + sleep 3 + # Scan network to not rely on registration-timeout after RAT change + uqmi -s -d "$device" --network-scan > /dev/null 2>&1 + } + echo "Waiting for network registration" sleep 5 local registration_timeout=0 @@ -281,7 +288,6 @@ proto_qmi_setup() { return 1 done - [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1 echo "Starting network $interface" |