umbim: call umbim disconnect in error case
This is needed to properly close the control channel. Otherwise, on the next try the caps call may fail. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This commit is contained in:
parent
2593d510e2
commit
049870a7fe
1 changed files with 13 additions and 1 deletions
|
@ -65,6 +65,8 @@ _proto_mbim_setup() {
|
||||||
echo "mbim[$$]" "Reading capabilities"
|
echo "mbim[$$]" "Reading capabilities"
|
||||||
umbim $DBG -n -d $device caps || {
|
umbim $DBG -n -d $device caps || {
|
||||||
echo "mbim[$$]" "Failed to read modem caps"
|
echo "mbim[$$]" "Failed to read modem caps"
|
||||||
|
tid=$((tid + 1))
|
||||||
|
umbim $DBG -t $tid -d "$device" disconnect
|
||||||
proto_notify_error "$interface" PIN_FAILED
|
proto_notify_error "$interface" PIN_FAILED
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
@ -74,6 +76,8 @@ _proto_mbim_setup() {
|
||||||
echo "mbim[$$]" "Sending pin"
|
echo "mbim[$$]" "Sending pin"
|
||||||
umbim $DBG -n -t $tid -d $device unlock "$pincode" || {
|
umbim $DBG -n -t $tid -d $device unlock "$pincode" || {
|
||||||
echo "mbim[$$]" "Unable to verify PIN"
|
echo "mbim[$$]" "Unable to verify PIN"
|
||||||
|
tid=$((tid + 1))
|
||||||
|
umbim $DBG -t $tid -d "$device" disconnect
|
||||||
proto_notify_error "$interface" PIN_FAILED
|
proto_notify_error "$interface" PIN_FAILED
|
||||||
proto_block_restart "$interface"
|
proto_block_restart "$interface"
|
||||||
return 1
|
return 1
|
||||||
|
@ -84,6 +88,8 @@ _proto_mbim_setup() {
|
||||||
echo "mbim[$$]" "Checking pin"
|
echo "mbim[$$]" "Checking pin"
|
||||||
umbim $DBG -n -t $tid -d $device pinstate || {
|
umbim $DBG -n -t $tid -d $device pinstate || {
|
||||||
echo "mbim[$$]" "PIN required"
|
echo "mbim[$$]" "PIN required"
|
||||||
|
tid=$((tid + 1))
|
||||||
|
umbim $DBG -t $tid -d "$device" disconnect
|
||||||
proto_notify_error "$interface" PIN_FAILED
|
proto_notify_error "$interface" PIN_FAILED
|
||||||
proto_block_restart "$interface"
|
proto_block_restart "$interface"
|
||||||
return 1
|
return 1
|
||||||
|
@ -93,6 +99,8 @@ _proto_mbim_setup() {
|
||||||
echo "mbim[$$]" "Checking subscriber"
|
echo "mbim[$$]" "Checking subscriber"
|
||||||
umbim $DBG -n -t $tid -d $device subscriber || {
|
umbim $DBG -n -t $tid -d $device subscriber || {
|
||||||
echo "mbim[$$]" "Subscriber init failed"
|
echo "mbim[$$]" "Subscriber init failed"
|
||||||
|
tid=$((tid + 1))
|
||||||
|
umbim $DBG -t $tid -d "$device" disconnect
|
||||||
proto_notify_error "$interface" NO_SUBSCRIBER
|
proto_notify_error "$interface" NO_SUBSCRIBER
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
@ -101,6 +109,8 @@ _proto_mbim_setup() {
|
||||||
echo "mbim[$$]" "Register with network"
|
echo "mbim[$$]" "Register with network"
|
||||||
umbim $DBG -n -t $tid -d $device registration || {
|
umbim $DBG -n -t $tid -d $device registration || {
|
||||||
echo "mbim[$$]" "Subscriber registration failed"
|
echo "mbim[$$]" "Subscriber registration failed"
|
||||||
|
tid=$((tid + 1))
|
||||||
|
umbim $DBG -t $tid -d "$device" disconnect
|
||||||
proto_notify_error "$interface" NO_REGISTRATION
|
proto_notify_error "$interface" NO_REGISTRATION
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
@ -109,6 +119,8 @@ _proto_mbim_setup() {
|
||||||
echo "mbim[$$]" "Attach to network"
|
echo "mbim[$$]" "Attach to network"
|
||||||
umbim $DBG -n -t $tid -d $device attach || {
|
umbim $DBG -n -t $tid -d $device attach || {
|
||||||
echo "mbim[$$]" "Failed to attach to network"
|
echo "mbim[$$]" "Failed to attach to network"
|
||||||
|
tid=$((tid + 1))
|
||||||
|
umbim $DBG -t $tid -d "$device" disconnect
|
||||||
proto_notify_error "$interface" ATTACH_FAILED
|
proto_notify_error "$interface" ATTACH_FAILED
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue