mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
uqmi: do not block proto handler if SIM is uninitialized
QMI proto setup-handler will wait forever if SIM does not get initialized. To fix this stop polling pin status and notify netifd. Netifd will generate then a "ifup-failed" ACTION. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
dec1bfa0f4
commit
f171a86d06
@ -70,7 +70,15 @@ proto_qmi_setup() {
|
|||||||
|
|
||||||
while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
|
while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
|
||||||
[ -e "$device" ] || return 1
|
[ -e "$device" ] || return 1
|
||||||
sleep 1;
|
if [ "$uninitialized_timeout" -lt "$timeout" ]; then
|
||||||
|
let uninitialized_timeout++
|
||||||
|
sleep 1;
|
||||||
|
else
|
||||||
|
echo "SIM not initialized"
|
||||||
|
proto_notify_error "$interface" SIM_NOT_INITIALIZED
|
||||||
|
proto_block_restart "$interface"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$pincode" ] && {
|
[ -n "$pincode" ] && {
|
||||||
|
Loading…
Reference in New Issue
Block a user