Skip to content

Commit

Permalink
uqmi: use general method for state cleaning
Browse files Browse the repository at this point in the history
Debugging shows that using the general method properly cleans on each
run, while the method specifying the client-ID shows "No effect"
even while in connected state.

Fixes several connectivity issues seen on specific modems.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
  • Loading branch information
Koen Vandeputte authored and blogic committed Feb 18, 2018
1 parent 7c259fb commit 5661ac1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
Expand Up @@ -97,6 +97,10 @@ proto_qmi_setup() {
}
}

# Cleanup current state if any
uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect

# Set IP format
uqmi -s -d "$device" --set-data-format 802.3
uqmi -s -d "$device" --wda-set-data-format 802.3
dataformat="$(uqmi -s -d "$device" --wda-get-data-format)"
Expand Down Expand Up @@ -144,11 +148,6 @@ proto_qmi_setup() {

uqmi -s -d "$device" --set-client-id wds,"$cid_4" --set-ip-family ipv4 > /dev/null

# try to clear previous autoconnect state
uqmi -s -d "$device" --set-client-id wds,"$cid_4" \
--stop-network 0xffffffff \
--autoconnect > /dev/null

pdh_4=$(uqmi -s -d "$device" --set-client-id wds,"$cid_4" \
--start-network \
${apn:+--apn $apn} \
Expand All @@ -175,11 +174,6 @@ proto_qmi_setup() {

uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 > /dev/null

# try to clear previous autoconnect state
uqmi -s -d "$device" --set-client-id wds,"$cid_6" \
--stop-network 0xffffffff \
--autoconnect > /dev/null

pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \
--start-network \
${apn:+--apn $apn} \
Expand Down

0 comments on commit 5661ac1

Please sign in to comment.