Skip to content

udev: Match WWAN "type" attribute instead of device name

Stephan Gerhold requested to merge (removed):wwan-sysfs-type into master

Recent changes in the WWAN framework in the kernel changed the WWAN port names from e.g. "wwan0p1AT" and "wwan0p2QMI" to "wwan0at0" and "wwan0qmi0" [1, 2]. This means that the udev rules no longer match since AT/QMI are now lower-case and no longer at the end of the name.

However, recently additionally a "type" sysfs attribute was added for all WWAN ports [3], which makes it much more reliable to match the WWAN port names without relying on their exact device name.

Add some additional udev rules to apply the port hints based on the "type" sysfs attributes. This fixes the port enumeration on newer Linux kernels that include the aforementioned commits.

Note that we still need to keep the old udev rules for now since Linux 5.13 does not have the "type" attribute yet.

Also note that libqmi/qmicli needs a similar fix in qmi_helpers_get_transport_type for the QMI/MBIM auto-detection to work. I'm hoping someone else can do that since I always get glib code wrong for some reason. :)

Merge request reports