diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-09-30 15:11:36 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-10-06 13:42:58 +0200 |
commit | 7b6b2491cce42a06c776260ae22f4788b49b306e (patch) | |
tree | e98a94116ab263d94fc3264cebf9a48ba57c26bd | |
parent | c9572ba318784dd24cd84486e4c1fc21690f9926 (diff) |
mbimcli: allow requesting MBIMEx v3.0
-rw-r--r-- | src/mbimcli/mbimcli.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mbimcli/mbimcli.c b/src/mbimcli/mbimcli.c index 88e7153..d68142d 100644 --- a/src/mbimcli/mbimcli.c +++ b/src/mbimcli/mbimcli.c @@ -38,6 +38,7 @@ static gboolean operation_status; static gchar *device_str; static gboolean device_open_proxy_flag; static gboolean device_open_ms_mbimex_v2_flag; +static gboolean device_open_ms_mbimex_v3_flag; static gchar *no_open_str; static gboolean no_close_flag; static gboolean noop_flag; @@ -58,6 +59,10 @@ static GOptionEntry main_entries[] = { "Request to enable Microsoft MBIMEx v2.0 support", NULL }, + { "device-open-ms-mbimex-v3", 0, 0, G_OPTION_ARG_NONE, &device_open_ms_mbimex_v3_flag, + "Request to enable Microsoft MBIMEx v3.0 support", + NULL + }, { "no-open", 0, 0, G_OPTION_ARG_STRING, &no_open_str, "Do not explicitly open the MBIM device before running the command", "[Transaction ID]" @@ -339,6 +344,8 @@ device_new_ready (GObject *unused, open_flags |= MBIM_DEVICE_OPEN_FLAGS_PROXY; if (device_open_ms_mbimex_v2_flag) open_flags |= MBIM_DEVICE_OPEN_FLAGS_MS_MBIMEX_V2; + if (device_open_ms_mbimex_v3_flag) + open_flags |= MBIM_DEVICE_OPEN_FLAGS_MS_MBIMEX_V3; /* Open the device */ mbim_device_open_full (device, @@ -420,6 +427,11 @@ parse_actions (void) exit (EXIT_FAILURE); } + if (device_open_ms_mbimex_v2_flag && device_open_ms_mbimex_v3_flag) { + g_printerr ("error: cannot request both MBIMEx v2.0 and 3.0 at the same time\n"); + exit (EXIT_FAILURE); + } + /* Go on! */ } |