diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-07-27 09:25:53 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2018-09-12 18:48:41 +0000 |
commit | 6e5ea39cbab5d84dea8fe31d760bc79ac3412052 (patch) | |
tree | 5f44b957c8c5cd99eb3733bf6c1c205e40733996 /plugins/dell/mm-plugin-dell.c | |
parent | 02f9b5b0857af45a6726846d3e74840477be66bb (diff) |
dell: implement Unmanaged GPS support for the DW5821e
The DW5821E module is managed in MBIM mode by default, and exposes a
NMEA capable tty in USB interface #4.
Enabling/disabling the NMEA output via the TTY is done with AT
commands, so this implementation requires also a valid AT port in the
system.
Given that the AT commands used to enable/disable this feature are
based on modifying non-volatile memory through AT^NV, this
implementation is very specific to the DW5821E. If we're able to do
the same on other Dell modules in the future, we'll just rename the
new object to a more generic one.
Diffstat (limited to 'plugins/dell/mm-plugin-dell.c')
-rw-r--r-- | plugins/dell/mm-plugin-dell.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/dell/mm-plugin-dell.c b/plugins/dell/mm-plugin-dell.c index 2a059cf4..a30c2f47 100644 --- a/plugins/dell/mm-plugin-dell.c +++ b/plugins/dell/mm-plugin-dell.c @@ -43,6 +43,7 @@ #if defined WITH_MBIM #include "mm-broadband-modem-mbim.h" +#include "mm-broadband-modem-dell-dw5821e.h" #endif #define MAX_PORT_PROBE_TIMEOUTS 3 @@ -395,6 +396,15 @@ create_modem (MMPlugin *self, #if defined WITH_MBIM if (mm_port_probe_list_has_mbim_port (probes)) { + /* Specific implementation for the DW5821e */ + if (vendor == 0x413c && product == 0x81d7) { + mm_dbg ("MBIM-powered DW5821e modem found..."); + return MM_BASE_MODEM (mm_broadband_modem_dell_dw5821e_new (uid, + drivers, + mm_plugin_get_name (self), + vendor, + product)); + } mm_dbg ("MBIM-powered Dell-branded modem found..."); return MM_BASE_MODEM (mm_broadband_modem_mbim_new (uid, drivers, @@ -442,10 +452,10 @@ create_modem (MMPlugin *self, /*****************************************************************************/ static gboolean -grab_port (MMPlugin *self, - MMBaseModem *modem, - MMPortProbe *probe, - GError **error) +grab_port (MMPlugin *self, + MMBaseModem *modem, + MMPortProbe *probe, + GError **error) { if (MM_IS_BROADBAND_MODEM_SIERRA (modem)) return mm_common_sierra_grab_port (self, modem, probe, error); |