aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-port-qmi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c
index 5cccb02a..a7fbee84 100644
--- a/src/mm-port-qmi.c
+++ b/src/mm-port-qmi.c
@@ -31,6 +31,9 @@
#define DEFAULT_LINK_PREALLOCATED_AMOUNT 4
+/* as internally defined in the kernel */
+#define RMNET_MAX_PACKET_SIZE 16384
+
G_DEFINE_TYPE (MMPortQmi, mm_port_qmi, MM_TYPE_PORT)
#if defined WITH_QRTR
@@ -1321,8 +1324,13 @@ setup_master_mtu (GTask *task)
* aggregation size */
if (ctx->kernel_data_modes_requested & (MM_PORT_QMI_KERNEL_DATA_MODE_MUX_RMNET | MM_PORT_QMI_KERNEL_DATA_MODE_MUX_QMIWWAN)) {
/* Load current max datagram size supported */
- if (MM_PORT_QMI_DAP_IS_SUPPORTED_QMAP (ctx->wda_dl_dap_requested))
+ if (MM_PORT_QMI_DAP_IS_SUPPORTED_QMAP (ctx->wda_dl_dap_requested)) {
mtu = ctx->wda_dl_dap_max_size_current;
+ if ((ctx->kernel_data_modes_requested & MM_PORT_QMI_KERNEL_DATA_MODE_MUX_RMNET) && (mtu > RMNET_MAX_PACKET_SIZE)) {
+ mm_obj_dbg (self, "mtu limited to maximum rmnet packet size");
+ mtu = RMNET_MAX_PACKET_SIZE;
+ }
+ }
/* If no max aggregation size was specified by the modem (e.g. if we requested QMAP
* aggregation protocol but the modem doesn't support it), skip */