Querying WWAN iface name for each /dev/cdc-wdm device
Aleksander Morgado
aleksander at aleksander.es
Wed Jan 28 11:29:11 PST 2015
On Wed, Jan 28, 2015 at 1:56 PM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
> On Wed, Jan 28, 2015 at 1:52 PM, Bjørn Mork <bjorn at mork.no> wrote:
>>
>>
>> On 28 January 2015 13:09:02 CET, Aleksander Morgado <aleksander at aleksander.es> wrote:
>>>On Tue, Jan 27, 2015 at 5:19 PM, Aleksander Morgado
>>><aleksander at aleksander.es> wrote:
>>>> On Tue, Jan 27, 2015 at 4:08 PM, Bjørn Mork <bjorn at mork.no> wrote:
>>>>>> In order to handle the case of the renames, I guess libqmi
>>>shouldn't
>>>>>> cache the net iface name the first time it's read, right? I mean if
>>>>>> someone calls qmi_device_get_wwan_iface() we better get the
>>>filename
>>>>>> directly from sysfs every time?
>>>>>
>>>>> Yup, that's necessary if you care about the name. Note that this is
>>>racy
>>>>> in any case, so you do risk that the name refers to something else
>>>by
>>>>> the time you present it to the user. But I don't know if we should
>>>>> care. I cannot imagine a real rename use case after device
>>>discovery is
>>>>> completed.
>>>>
>>>> Agreed; will go on with those changes then.
>>>>
>>>>
>>>
>>>How about now?
>>>
>>>http://cgit.freedesktop.org/libqmi/commit/?h=aleksander/wwan-iface-2&id=db41fa4d6da83dfe108a72c35120187c7bb516b2
>>>
>>>The logic should first look at "usbmisc", and if not found, fallback
>>>to "usb"; that's correct, right?
>>
>> Yes, the class name was "usb" in older kernels. Don't remember when this was changed, but I guess it doesn't matter. We must handle both forever...
>>
>
> Yeah :)
>
Pushed changes to git master as f962c45 (libqmi) and 9f7cd9f (qmicli).
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list