[PATCH 1/2] Extended wda set format message to enable QMUX
Aleksander Morgado
aleksander at aleksander.es
Mon Feb 20 19:15:12 UTC 2017
On Thu, Feb 16, 2017 at 7:48 AM, Carlo Lobrano <c.lobrano at gmail.com> wrote:
> + if (g_ascii_strcasecmp (key, "link-layer-protocol") == 0) {
> + if (!qmicli_read_link_layer_protocol_from_string (value, &(props->link_layer_protocol))) {
> + g_set_error (error,
> + QMI_CORE_ERROR,
> + QMI_CORE_ERROR_FAILED,
> + "Unrecognized Link Layer Protocol '%s'",
> + value);
> + return FALSE;
> + }
> + return TRUE;
> + }
> +
> + if (g_ascii_strcasecmp (key, "ul-protocol") == 0) {
> + props->ul_protocol = atoi(value);
> + return TRUE;
> + }
> +
> + if (g_ascii_strcasecmp (key, "dl-protocol") == 0) {
> + props->dl_protocol = atoi(value);
> + return TRUE;
> + }
> +
> + if (g_ascii_strcasecmp (key, "dl-datagram-max-size") == 0) {
> + props->dl_datagram_max_size = atoi(value);
> + return TRUE;
> + }
> +
> + if (g_ascii_strcasecmp (key, "dl-max-datagrams") == 0) {
> + props->dl_max_datagrams = atoi(value);
> + return TRUE;
> + }
> +
> + if (g_ascii_strcasecmp (key, "ep-type") == 0) {
> + props->endpoint_type = atoi(value);
> + return TRUE;
> + }
> +
> + if (g_ascii_strcasecmp (key, "ep-iface-number") == 0) {
> + props->endpoint_iface_number = atoi(value);
> + return TRUE;
> + }
ul-protocol, dl-protocol and ep-type are all enum fields, so we should
allow providing strings in the cli, instead of just numbers (i.e. the
same as we do with the LLP). Could you add helper methods (e.g.
qmicli_read_data_aggregation_protocol_from_string() and
qmicli_read_endpoint_type_from_string()).
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list