Querying WWAN iface name for each /dev/cdc-wdm device
Bjørn Mork
bjorn at mork.no
Tue Jan 27 03:36:01 PST 2015
Marius Kotsbak <marius at kotsbak.com> writes:
> 2015-01-27 9:34 GMT+01:00 Bjørn Mork <bjorn at mork.no>:
>
>> Aleksander Morgado <aleksander at aleksander.es> writes:
>> > On Mon, Jan 26, 2015 at 10:04 PM, Bjørn Mork <bjorn at mork.no> wrote:
>>
>> bjorn at nemi:~$ ls -l /sys/class/net/bar/device/usbmisc
>> total 0
>> drwxr-xr-x 3 root root 0 Jan 27 09:20 cdc-wdm0
>>
>> The only undetected renaming issue I can think of is if someone renames
>> the file in /dev so it doesn't match the kernel device name. I don't
>> think that is very likely though, and IMHO it should not be supported.
>> You can do it, but then you're on your own...
>>
>
> What if someone is following this example:
>
> KERNEL=="eth*", ATTR{address}=="00:52:8b:d5:04:48", NAME="lan"
>
> It is then probably better to use the SYMLINK option in that case though.
I believe that will make udev rename the device via netlink, just like
'ip link set eth0 name lan' will do. Isn't that correct?
If so, then it should work fine. The kernel device name changes and
sysfs will use the new name.
Note that the 'bar' in my example above wasn't a fake.
Bjørn
More information about the libqmi-devel
mailing list