uqmi: wait for the control device too
The control device /dev/cdc-wdm0 is not available immediately on the D-Link DWR-921 Rev.C3, therefore the wwan interface fails to start at boot with a "The specified control device does not exist" error. This patch alters /lib/netifd/proto/qmi.sh to wait for network.wwan.delay earlier, before checking for the control device, instead of just before interacting with the modem. One still has to use network.wwan.proto='qmi', as the "wwan" proto performs that sort of check before any delay is possible, failing with a "No valid device was found" error. Signed-off-by: Thomas Equeter <tequeter@users.noreply.github.com>
This commit is contained in:
		 Thomas Equeter
					Thomas Equeter
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							7aa5dc46ee
						
					
				
				
					commit
					acedce1d79
				
			| @@ -44,6 +44,8 @@ proto_qmi_setup() { | |||||||
| 		return 1 | 		return 1 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	[ -n "$delay" ] && sleep "$delay" | ||||||
|  |  | ||||||
| 	device="$(readlink -f $device)" | 	device="$(readlink -f $device)" | ||||||
| 	[ -c "$device" ] || { | 	[ -c "$device" ] || { | ||||||
| 		echo "The specified control device does not exist" | 		echo "The specified control device does not exist" | ||||||
| @@ -62,8 +64,6 @@ proto_qmi_setup() { | |||||||
| 		return 1 | 		return 1 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	[ -n "$delay" ] && sleep "$delay" |  | ||||||
|  |  | ||||||
| 	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; | 		sleep 1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user