broadband-modem-mbim: report Unsupported if QMI over MBIM not available

For non-Qualcomm MBIM devices, report a generic "Unsupported" error if
we try to do an operation that would otherwise be only available with
QMI-over-MBIM.
This commit is contained in:
Aleksander Morgado
2018-08-21 13:26:08 +00:00
committed by Dan Williams
parent d3b43bd0a6
commit 666622b4d4
+8
View File
@@ -166,6 +166,14 @@ shared_qmi_peek_client (MMSharedQmi *self,
return NULL;
}
if (!mm_port_mbim_supports_qmi (port)) {
g_set_error (error,
MM_CORE_ERROR,
MM_CORE_ERROR_UNSUPPORTED,
"Unsupported");
return NULL;
}
client = mm_port_mbim_peek_qmi_client (port, service);
if (!client)
g_set_error (error,