aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmhi-qmi-connectbin108912 -> 109472 bytes
-rw-r--r--mhi-qmi-connect.c17
2 files changed, 14 insertions, 3 deletions
diff --git a/mhi-qmi-connect b/mhi-qmi-connect
index 35cb6c9..05079c0 100755
--- a/mhi-qmi-connect
+++ b/mhi-qmi-connect
Binary files differ
diff --git a/mhi-qmi-connect.c b/mhi-qmi-connect.c
index 40ba1fb..3e56dba 100644
--- a/mhi-qmi-connect.c
+++ b/mhi-qmi-connect.c
@@ -9,7 +9,7 @@
#include <glib-unix.h>
#include <gio/gio.h>
-#define MAX_QMAP_DATAGRAM_SIZE 16384
+#define MAX_QMAP_DATAGRAM_SIZE 32768
#define MAX_QMAP_AGGREGATED_DATAGRAM 32
#define QMAP_HEADER_SIZE 16
@@ -69,6 +69,7 @@ static gchar *config_path;
static gchar ip4_addr[INET_ADDRSTRLEN];
static gchar ip4_dns[INET_ADDRSTRLEN];
+static guint32 radio_mtu = MAX_QMAP_DATAGRAM_SIZE - QMAP_HEADER_SIZE;
static gboolean rmnet_setup_done;
static gchar *ip_route_dump;
static gboolean wda_allocated = FALSE;
@@ -356,9 +357,8 @@ static void setup_rmnet(void)
qmi_device_get_path_display(device), config.mux_id, ip4_addr);
}
- /* Set RMNET MTU */
g_snprintf(cmdline, sizeof(cmdline), "%s link set rmnet_data%u mtu %u",
- iptool, config.mux_id, MAX_QMAP_DATAGRAM_SIZE - QMAP_HEADER_SIZE);
+ iptool, config.mux_id, radio_mtu);
if (!g_spawn_command_line_sync(cmdline, NULL, NULL, NULL, &error)) {
g_printerr("%s: %s\n", cmdline, error->message);
g_error_free(error);
@@ -526,6 +526,17 @@ static void get_current_settings_ready(QmiClientWds *client, GAsyncResult *res)
g_print("[%s] [WDS] IPv4 primary DNS: %s\n", qmi_device_get_path_display(device), ip4_dns);
}
+ if (qmi_message_wds_get_current_settings_output_get_primary_ipv4_dns_address(output, &addr, NULL)) {
+ in_addr_val.s_addr = GUINT32_TO_BE(addr);
+ memset(ip4_dns, 0, sizeof(ip4_dns));
+ inet_ntop(AF_INET, &in_addr_val, ip4_dns, sizeof(ip4_dns));
+ g_print("[%s] [WDS] IPv4 primary DNS: %s\n", qmi_device_get_path_display(device), ip4_dns);
+ }
+
+ if (qmi_message_wds_get_current_settings_output_get_mtu(output, &radio_mtu, NULL)) {
+ g_print("[%s] [WDS] radio MTU: %d\n", qmi_device_get_path_display(device), radio_mtu);
+ }
+
qmi_message_wds_get_current_settings_output_unref(output);
if (config.noqmap)