diff options
author | Loic Poulain <loic.poulain@linaro.org> | 2020-11-27 10:22:57 +0100 |
---|---|---|
committer | Loic Poulain <loic.poulain@linaro.org> | 2020-11-27 10:22:57 +0100 |
commit | 8b893d0d6b3cd6c133de54758b88ad874771bc9d (patch) | |
tree | 204977d61bbfbddaee4cfbf307763c22d7cbf646 | |
parent | 44fe0316cf6861b03147080145c87e557971dd2b (diff) |
Do not add endpoint info when using QMI_UCI
This info are only requested for contextless QRTR access.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
-rwxr-xr-x | mhi-qmi-connect | bin | 100296 -> 100352 bytes | |||
-rw-r--r-- | mhi-qmi-connect.c | 20 |
2 files changed, 15 insertions, 5 deletions
diff --git a/mhi-qmi-connect b/mhi-qmi-connect Binary files differindex fe5acfc..ade77db 100755 --- a/mhi-qmi-connect +++ b/mhi-qmi-connect diff --git a/mhi-qmi-connect.c b/mhi-qmi-connect.c index 51fa8e2..9cbddb2 100644 --- a/mhi-qmi-connect.c +++ b/mhi-qmi-connect.c @@ -12,6 +12,10 @@ #define MAX_QMAP_DATAGRAM_SIZE 16384 #define MAX_QMAP_AGGREGATED_DATAGRAM 16 +// IFACE_ID/ENDPOINT_TYPE allows to select the type of endpoint/bus +// to use (pcie, embedded, usb) by the modem, and IFACE_ID selects +// the modem side interface ID to route data to/from. This information +// is only requested when using QRTR. #define DATA_ENDPOINT_TYPE QMI_DATA_ENDPOINT_TYPE_PCIE #define IFACE_ID 4 @@ -569,9 +573,12 @@ static void allocate_wds_client_ready(QmiDevice *dev, GAsyncResult *res) } input = qmi_message_wds_bind_mux_data_port_input_new(); - - qmi_message_wds_bind_mux_data_port_input_set_endpoint_info( - input, DATA_ENDPOINT_TYPE, IFACE_ID, &error); + + if (!qmi_dev) { /* for QRTR only */ + qmi_message_wds_bind_mux_data_port_input_set_endpoint_info( + input, DATA_ENDPOINT_TYPE, IFACE_ID, &error); + } + qmi_message_wds_bind_mux_data_port_input_set_mux_id( input, config.mux_id, &error); @@ -637,8 +644,11 @@ static void allocate_wda_client_ready(QmiDevice *dev, GAsyncResult *res) input, MAX_QMAP_AGGREGATED_DATAGRAM, &error); qmi_message_wda_set_data_format_input_set_link_layer_protocol( input, QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP, &error); - qmi_message_wda_set_data_format_input_set_endpoint_info( - input, DATA_ENDPOINT_TYPE, IFACE_ID, &error); + + if (!qmi_dev) { /* For QRTR only */ + qmi_message_wda_set_data_format_input_set_endpoint_info( + input, DATA_ENDPOINT_TYPE, IFACE_ID, &error); + } qmi_client_wda_set_data_format(client_wda, input, 10, cancellable, (GAsyncReadyCallback)set_data_format_ready, NULL); |