[RFC] new 'AUTO' open flag to automatically select QMI or QMI-over-MBIM

Aleksander Morgado aleksander at aleksander.es
Sun Jan 29 12:44:03 UTC 2017


Hey everyone,

I've pushed a new aleksander/check-driver branch to upstream git,
which includes a new QMI_DEVICE_OPEN_FLAGS_AUTO flag for QmiDevice. If
this flag is given, the QmiDevice will check which kernel driver is
managing the cdc-wdm port, and then select whether QMI-over-MBIM
should be enabled or just use plain QMI.

qmicli (and therefore qmi-network) and qmi-firmware-update will *by
default* use this new flag, so that you can run the commands without
requiring to know in advance which driver is managing the device. Both
programs also include a new --device-open-auto option, which is anyway
the default.

If you still want to force QMI over MBIM, the
QMI_DEVICE_OPEN_FLAGS_MBIM in QmiDevice may be used (or
--device-open-mbim in qmicli and qmi-firmware-update).

If you now want to force QMI and avoid the auto checking, just pass
neither QMI_DEVICE_OPEN_FLAGS_AUTO nor QMI_DEVICE_OPEN_FLAGS_MBIM in
QmiDevice (or the new --device-open-qmi in qmicli and
qmi-firmware-update).

I wanted to leave the possibility of forcing QMI or QMI-over-MBIM in
case someone finds the new auto flag as problematic for some reason.
We may want to deprecate+remove the non-auto options in the future,
though.

Comments? Branch reviews also welcome :)

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list