aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Palmas <dnlplm@gmail.com>2023-07-14 11:21:04 +0200
committerDaniele Palmas <dnlplm@gmail.com>2023-07-17 13:47:19 +0200
commitdf61559511b177bd5cd82ceafca6e3e7eb3708ad (patch)
treef3bbca616a5faaabff73d43ef4178e3736d7bb65
parent3082d5d37b3bd336eb2f3d298916960d7d92605d (diff)
port-qmi: set qmi_wwan requested dl dap max size to 16384 for rmnet
The current requested downlink data aggregation protocol maximum size is set to 32768, but this is not accordingly set as the MTU of the main qmi_wwan interface, that is instead set to RMNET_MAX_PACKET_SIZE that is 16384. So, the modem is able to send QMAP aggregated blocks larger than 16384, but the driver is not able to properly collect them, since the URB size is 16384. It is not simply possible to set qmi_wwan main interface MTU to the returned dl max aggregated size, since when creating the rmnet netdevice the rmnet kernel module automatically set the mtu as the size of the parent netdevice MTU - the qmap header size (4), but this won't work because the rmnet kernel module does not support MTU > 16384. As an immediate fix, set the requested dl dap max size to 16384, while thinking about how to refactor the logic for supporting higher values. qmi_wwan inbox qmap management is not affected by this issue.
-rw-r--r--src/mm-port-qmi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c
index 908bde70..c0cf6092 100644
--- a/src/mm-port-qmi.c
+++ b/src/mm-port-qmi.c
@@ -1194,8 +1194,9 @@ load_supported_kernel_data_modes (MMPortQmi *self,
/*****************************************************************************/
-#define DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_SIZE 32768
-#define DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_DATAGRAMS 32
+#define DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_SIZE 32768
+#define DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_SIZE_QMI_WWAN_RMNET 16384
+#define DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_DATAGRAMS 32
typedef struct {
MMPortQmiKernelDataMode kernel_data_mode;
@@ -1510,7 +1511,11 @@ sync_wda_data_format (GTask *task)
qmi_message_wda_set_data_format_input_set_uplink_data_aggregation_protocol (input, ctx->wda_ul_dap_requested, NULL);
qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_protocol (input, ctx->wda_dl_dap_requested, NULL);
if (ctx->wda_dl_dap_requested != QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED) {
- qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_max_size (input, DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_SIZE, NULL);
+ if ((g_strcmp0 (self->priv->net_driver, "qmi_wwan") == 0) &&
+ (ctx->kernel_data_modes_supported & MM_PORT_QMI_KERNEL_DATA_MODE_MUX_RMNET))
+ qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_max_size (input, DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_SIZE_QMI_WWAN_RMNET, NULL);
+ else
+ qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_max_size (input, DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_SIZE, NULL);
qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_max_datagrams (input, DEFAULT_DOWNLINK_DATA_AGGREGATION_MAX_DATAGRAMS, NULL);
}
if (ctx->use_endpoint)