diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-04-23 22:11:42 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-04-23 22:29:40 +0200 |
commit | e7c1eb8287b724cca1663d58e45ca985cc1dfa15 (patch) | |
tree | a38de9eba0d5a6fe5a77a7fe9d78d478e009f892 /src/mm-port-qmi.h | |
parent | 1c6258056eb6933c0f6ba8c064d83e72011e508f (diff) |
port-qmi: WDS clients also mux-id specific
In addition to differentiating between IPv4 and IPv6 clients, we also
need to explicitly allocate different clients in different bearer
objects when in multiplexing.
Diffstat (limited to 'src/mm-port-qmi.h')
-rw-r--r-- | src/mm-port-qmi.h | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/mm-port-qmi.h b/src/mm-port-qmi.h index 793e3b1a..dbeff1bd 100644 --- a/src/mm-port-qmi.h +++ b/src/mm-port-qmi.h @@ -91,30 +91,35 @@ void mm_port_qmi_set_net_driver (MMPortQmi *self, typedef enum { MM_PORT_QMI_FLAG_DEFAULT = 0, - MM_PORT_QMI_FLAG_WDS_IPV4 = 100, - MM_PORT_QMI_FLAG_WDS_IPV6 = 101 + MM_PORT_QMI_FLAG_WDS_IPV4 = 1, + MM_PORT_QMI_FLAG_WDS_IPV6 = 2, } MMPortQmiFlag; -void mm_port_qmi_allocate_client (MMPortQmi *self, - QmiService service, - MMPortQmiFlag flag, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -gboolean mm_port_qmi_allocate_client_finish (MMPortQmi *self, - GAsyncResult *res, - GError **error); - -void mm_port_qmi_release_client (MMPortQmi *self, - QmiService service, - MMPortQmiFlag flag); - -QmiClient *mm_port_qmi_peek_client (MMPortQmi *self, - QmiService service, - MMPortQmiFlag flag); -QmiClient *mm_port_qmi_get_client (MMPortQmi *self, - QmiService service, - MMPortQmiFlag flag); +/* When using the WDS service, we may not only want to have explicit different + * clients for IPv4 or IPv6, but also for different mux ids as well, so that + * different bearer objects never attempt to use the same WDS clients. */ +#define MM_PORT_QMI_FLAG_WITH_MUX_ID(flag, mux_id) ((mux_id << 8) | (flag & 0xFF)) + +void mm_port_qmi_allocate_client (MMPortQmi *self, + QmiService service, + guint flag, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_port_qmi_allocate_client_finish (MMPortQmi *self, + GAsyncResult *res, + GError **error); + +void mm_port_qmi_release_client (MMPortQmi *self, + QmiService service, + guint flag); + +QmiClient *mm_port_qmi_peek_client (MMPortQmi *self, + QmiService service, + guint flag); +QmiClient *mm_port_qmi_get_client (MMPortQmi *self, + QmiService service, + guint flag); QmiDevice *mm_port_qmi_peek_device (MMPortQmi *self); |