diff options
-rw-r--r-- | plugins/novatel/mm-broadband-modem-novatel.c | 23 | ||||
-rw-r--r-- | plugins/novatel/mm-plugin-novatel.c | 16 |
2 files changed, 16 insertions, 23 deletions
diff --git a/plugins/novatel/mm-broadband-modem-novatel.c b/plugins/novatel/mm-broadband-modem-novatel.c index c5ccf09a..63c28104 100644 --- a/plugins/novatel/mm-broadband-modem-novatel.c +++ b/plugins/novatel/mm-broadband-modem-novatel.c @@ -963,26 +963,6 @@ modem_cdma_get_detailed_registration_state (MMIfaceModemCdma *self, } /*****************************************************************************/ -/* Setup ports (Broadband modem class) */ - -static const MMBaseModemAtCommand nwdmat_sequence[] = { - { "$NWDMAT=1", 3, FALSE, mm_base_modem_response_processor_continue_on_error }, - { "$NWDMAT=1", 3, FALSE, mm_base_modem_response_processor_continue_on_error }, - { "$NWDMAT=1", 3, FALSE, NULL }, - { NULL } -}; - -static void -setup_ports (MMBroadbandModem *self) -{ - /* Call parent's setup ports first always */ - MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_novatel_parent_class)->setup_ports (self); - - /* Flip secondary ports to AT mode */ - mm_base_modem_at_sequence (MM_BASE_MODEM (self), nwdmat_sequence, NULL, NULL, NULL, NULL); -} - -/*****************************************************************************/ MMBroadbandModemNovatel * mm_broadband_modem_novatel_new (const gchar *device, @@ -1037,7 +1017,4 @@ iface_modem_cdma_init (MMIfaceModemCdma *iface) static void mm_broadband_modem_novatel_class_init (MMBroadbandModemNovatelClass *klass) { - MMBroadbandModemClass *broadband_modem_class = MM_BROADBAND_MODEM_CLASS (klass); - - broadband_modem_class->setup_ports = setup_ports; } diff --git a/plugins/novatel/mm-plugin-novatel.c b/plugins/novatel/mm-plugin-novatel.c index a1ee0819..6f798585 100644 --- a/plugins/novatel/mm-plugin-novatel.c +++ b/plugins/novatel/mm-plugin-novatel.c @@ -34,6 +34,21 @@ G_DEFINE_TYPE (MMPluginNovatel, mm_plugin_novatel, MM_TYPE_PLUGIN) int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; +/*****************************************************************************/ +/* Custom commands for AT probing */ + +/* We need to explicitly flip secondary ports to AT mode. + * We also use this command also for checking AT support in the current port. + */ +static const MMPortProbeAtCommand custom_at_probe[] = { + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, + { NULL } +}; + +/*****************************************************************************/ + static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, @@ -71,6 +86,7 @@ mm_plugin_create (void) MM_PLUGIN_ALLOWED_VENDOR_IDS, vendors, MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, forbidden_products, MM_PLUGIN_ALLOWED_AT, TRUE, + MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe, MM_PLUGIN_ALLOWED_QCDM, TRUE, NULL)); } |