mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-01 00:45:28 +00:00
comgt: ncm: try to detect interface for ttyACM ports
Some modems expose ttyACM as their control ports, which have the "device" symlink pointing one level down in sysfs tree. Try to find network interfaces for them as well, this is commonly used for modems exposing ACM + RNDIS or ACM + ECM interface combinations. Co-developed-by: Cezary Jackiewicz <cezary@eko.one.pl> Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl> Signed-off-by: Lech Perczak <lech.perczak@gmail.com> (cherry picked from commit ed7957810c0aee04943559be9b0ed23431ee0654)
This commit is contained in:
parent
839cb17e3a
commit
83003b6c06
@ -57,6 +57,10 @@ proto_ncm_setup() {
|
||||
[ -z "$ifname" ] && {
|
||||
devname="$(basename "$device")"
|
||||
case "$devname" in
|
||||
'ttyACM'*)
|
||||
devpath="$(readlink -f /sys/class/tty/$devname/device)"
|
||||
ifpath="$devpath/../*/net"
|
||||
;;
|
||||
'tty'*)
|
||||
devpath="$(readlink -f /sys/class/tty/$devname/device)"
|
||||
ifpath="$devpath/../../*/net"
|
||||
|
Loading…
x
Reference in New Issue
Block a user