zte,udev: avoid making the rules tty-only, and simplify single vendor check

The rules were matched only against devices with an exact 'tty' subsystem, and
that means that we were not properly adding additional tags on e.g. wwan or
cdc-wdm devices.
This commit is contained in:
Aleksander Morgado
2016-07-28 00:14:07 +02:00
parent e47e654d33
commit 1ca47e4b52

View File

@@ -1,12 +1,8 @@
# do not edit this file, it will be overwritten on update
ACTION!="add|change|move", GOTO="mm_zte_port_types_end"
SUBSYSTEM!="tty", GOTO="mm_zte_port_types_end"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", GOTO="mm_zte_port_types_vendorcheck"
GOTO="mm_zte_port_types_end"
LABEL="mm_zte_port_types_vendorcheck"
SUBSYSTEMS!="usb", GOTO="mm_zte_port_types_end"
ATTRS{idVendor}!="19d2", GOTO="mm_zte_port_types_end"
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0001", ATTRS{bInterfaceNumber}=="00", ENV{ID_MM_ZTE_PORT_TYPE_MODEM}="1"
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0001", ATTRS{bInterfaceNumber}=="02", ENV{ID_MM_ZTE_PORT_TYPE_AUX}="1"