uqmi: set IPv6 family explicitly in status check
authorLech Perczak <lech.perczak@gmail.com>
Tue, 15 Mar 2022 18:29:59 +0000 (19:29 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 2 Apr 2023 16:54:39 +0000 (18:54 +0200)
Some modems require CID to be set explicitly during IPv6 connection
status check, others require IPv6 address family to be checked explicitly
after establishing connection, in order to provide correct status.
Set both fields in the request to satisfy them.

Fixes: c8a88118af46 ("uqmi: set CID during 'query-data-status' operation")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh

index c2c5fc1eca0baf714be018f7864e2ab1bdc07403..5045ce04af59de24d42ea6485f804bc40e66038f 100755 (executable)
@@ -326,7 +326,7 @@ proto_qmi_setup() {
                fi
 
                # Check data connection state
-               connstat=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" --get-data-status)
+               connstat=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 --get-data-status)
                [ "$connstat" == '"connected"' ] || {
                        echo "No data link!"
                        uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds > /dev/null 2>&1