From 9f76070e2de5c28830ede70c31fb81278f1c7183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= Date: Tue, 27 May 2025 11:20:09 +0300 Subject: [PATCH] umbim: add support for wwan device class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some MBIM devices can exist on an MHI bus (over PCIe) instead of being presented as USB devices. In such cases the interface name lookup needs to be done from /sys/class/wwan/ instead of /sys/class/usbmisc/ Add another readlink call in case the first lookup fails. This allows the MBIM protocol to find the interface name and then work with both type of devices provided that /etc/config/network has the right device for MBIM interface (such as /dev/wwan0mbim0 in case of MHI) Signed-off-by: Antti Seppälä --- package/network/utils/umbim/files/lib/netifd/proto/mbim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 01e8628d746..dc3a7155229 100755 --- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh +++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh @@ -73,7 +73,7 @@ _proto_mbim_setup() { } devname="$(basename "$device")" - devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)" + devpath="$(readlink -f /sys/class/usbmisc/$devname/device/ || readlink -f /sys/class/wwan/$devname/device/)" ifname="$( ls "$devpath"/net )" [ -n "$ifname" ] || {