[RFC] Remove version checks for all QMI methods?
Aleksander Morgado
aleksander at aleksander.es
Sun Jul 8 12:49:04 UTC 2018
Hey,
I'd like to suggest removing part of the logic behind
QMI_DEVICE_OPEN_FLAGS_VERSION_INFO.
This flag given to qmi_device_open() will do 2 things:
* Load QMI service version info of the module during the open operation.
* Validate each executed method against the version configured in the
database, and if the version in the database is newer, fail the method
with an error.
Now, the second part of the logic is only meaningful if we have a
correct list of when each QMI method was introduced in the QMI service
versions, and that info is mostly broken.
E.g. I can try to run --dms-restore-factory-defaults (supposedly only
available since DMS 1.6) in a module that reports DMS 1.1, and that
will fail if I'm using the QMI_DEVICE_OPEN_FLAGS_VERSION_INFO flag:
$ sudo qmicli -p -d /dev/cdc-wdm0
--dms-restore-factory-defaults=123456 --device-open-version-info
error: operation failed: Cannot send message: QMI service 'dms'
version '1.6' required, got version '1.0'
$ sudo qmicli -p -d /dev/cdc-wdm0 --dms-restore-factory-defaults=123456
error: couldn't restores factory defaults: QMI protocol error (34):
'AuthenticationFailed'
How about we make QMI_DEVICE_OPEN_FLAGS_VERSION_INFO not do any
explicit check against any version, and if the method isn't supported,
well, the module will report an error itself, we don't need any
additional logic on top.
And while doing that, I'd like to remove all "version" tags from the
QMI database we have, as those wouldn't be needed any more.
What do you all think?
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list