From bfdc00049a13306f6160a81c4171b75a02f5ff11 Mon Sep 17 00:00:00 2001 From: James Christopher Adduono Date: Tue, 18 Jun 2019 17:41:00 -0400 Subject: [PATCH] netifd: mbim.sh: drop deprecated uci_x_state usage Signed-off-by: James Christopher Adduono --- .../utils/umbim/files/lib/netifd/proto/mbim.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh index 50913e7fa0..17b8a2b95b 100755 --- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh +++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh @@ -197,6 +197,9 @@ _proto_mbim_setup() { tid=$((tid + 1)) proto_init_update "$ifname" 1 + proto_add_data + json_add_int tid $tid + proto_close_data proto_send_update "$interface" [ -z "$dhcp" ] && dhcp="auto" @@ -292,8 +295,6 @@ _proto_mbim_setup() { echo Setting MTU of $ifname to $mtu /sbin/ip link set dev $ifname mtu $mtu } - - uci_set_state network $interface tid "$tid" } proto_mbim_setup() { @@ -313,17 +314,13 @@ proto_mbim_setup() { proto_mbim_teardown() { local interface="$1" - local device - json_get_vars device - local tid=$(uci_get_state network $interface tid) + local device tid + json_get_vars device tid [ -n "$ctl_device" ] && device=$ctl_device echo "mbim[$$]" "Stopping network" - [ -n "$tid" ] && { - umbim $DBG -t $tid -d "$device" disconnect - uci_revert_state network $interface tid - } + [ -n "$tid" ] && umbim $DBG -t $tid -d "$device" disconnect proto_init_update "*" 0 proto_send_update "$interface" -- 2.30.2