diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-02 12:19:26 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-10-02 12:19:26 +0000 |
commit | 6419c9a961b081ce186d9a65f5a96b79fbd9a123 (patch) | |
tree | ce29de300bf78a9cc07b0a57402896d8e1fde31c /package/network/utils/uqmi/files/lib | |
parent | 03e3d0d0a4d85a0805779b67f9767bf24575de6c (diff) | |
download | master-187ad058-6419c9a961b081ce186d9a65f5a96b79fbd9a123.tar.gz master-187ad058-6419c9a961b081ce186d9a65f5a96b79fbd9a123.tar.bz2 master-187ad058-6419c9a961b081ce186d9a65f5a96b79fbd9a123.zip |
uqmi: do not wait for network connection before starting dhcp
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42723 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/uqmi/files/lib')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 20 |
1 files changed, 9 insertions, 11 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 0e5e2e03f2..deba489897 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -25,6 +25,13 @@ qmi_disconnect() { --autoconnect > /dev/null } +qmi_wds_release() { + [ -n "$cid" ] || return 0 + + uqmi -s -d "$device" --set-client-id wds,"$cid" --release-client-id wds + uci_revert_state network $interface cid +} + proto_qmi_setup() { local interface="$1" @@ -101,13 +108,7 @@ proto_qmi_setup() { ${password:+--password $password} \ --autoconnect > /dev/null - if ! uqmi -s -d "$device" --get-data-status | grep '"connected"' > /dev/null; then - echo "Connection lost" - proto_notify_error "$interface" NOT_CONNECTED - return 1 - fi - - echo "Connected, starting DHCP" + echo "Starting DHCP" proto_init_update "$ifname" 1 proto_send_update "$interface" @@ -135,10 +136,7 @@ proto_qmi_teardown() { echo "Stopping network" qmi_disconnect - [ -n "$cid" ] && { - uqmi -s -d "$device" --set-client-id wds,"$cid" --release-client-id wds - uci_revert_state network $interface cid - } + qmi_wds_release proto_init_update "*" 0 proto_send_update "$interface" |