aboutsummaryrefslogtreecommitdiff
path: root/src/mm-qmi-port.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-09-05 16:11:51 -0500
committerAleksander Morgado <aleksander@lanedo.com>2012-09-08 10:41:01 +0200
commit8213a09a3412a3eb47666c6ccc6a56a75adbb668 (patch)
treea50153468604d00a435d343ee71b0b5e0cdbb9c8 /src/mm-qmi-port.c
parent5f1a1cf834d06a6ed430f835b8d694c4dd44ac95 (diff)
broadband-modem-qmi: set network port to 802.3/no-QoS mode
The kernel drivers expect this mode, so make sure we set it.
Diffstat (limited to 'src/mm-qmi-port.c')
-rw-r--r--src/mm-qmi-port.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mm-qmi-port.c b/src/mm-qmi-port.c
index 6318724d..519c5561 100644
--- a/src/mm-qmi-port.c
+++ b/src/mm-qmi-port.c
@@ -165,6 +165,7 @@ mm_qmi_port_allocate_client (MMQmiPort *self,
typedef struct {
MMQmiPort *self;
+ gboolean set_data_format;
GSimpleAsyncResult *result;
GCancellable *cancellable;
} PortOpenContext;
@@ -213,6 +214,7 @@ qmi_device_new_ready (GObject *unused,
PortOpenContext *ctx)
{
GError *error = NULL;
+ QmiDeviceOpenFlags flags = QMI_DEVICE_OPEN_FLAGS_VERSION_INFO;
ctx->self->priv->qmi_device = qmi_device_new_finish (res, &error);
if (!ctx->self->priv->qmi_device) {
@@ -221,9 +223,12 @@ qmi_device_new_ready (GObject *unused,
return;
}
+ if (ctx->set_data_format)
+ flags |= (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER);
+
/* Now open the QMI device */
qmi_device_open (ctx->self->priv->qmi_device,
- QMI_DEVICE_OPEN_FLAGS_VERSION_INFO,
+ flags,
10,
ctx->cancellable,
(GAsyncReadyCallback)qmi_device_open_ready,
@@ -232,6 +237,7 @@ qmi_device_new_ready (GObject *unused,
void
mm_qmi_port_open (MMQmiPort *self,
+ gboolean set_data_format,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -244,6 +250,7 @@ mm_qmi_port_open (MMQmiPort *self,
ctx = g_new0 (PortOpenContext, 1);
ctx->self = g_object_ref (self);
+ ctx->set_data_format = set_data_format;
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,