Merge remote-tracking branch 'cros/upstream' into 'cros/master'
diff --git a/plugins/novatel/mm-plugin-novatel.c b/plugins/novatel/mm-plugin-novatel.c
index 9eaf285..b57c0e8 100644
--- a/plugins/novatel/mm-plugin-novatel.c
+++ b/plugins/novatel/mm-plugin-novatel.c
@@ -42,19 +42,6 @@
 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 }
-};
-
-/*****************************************************************************/
 /* Custom init */
 
 typedef struct {
diff --git a/src/mm-device.c b/src/mm-device.c
index 9c2a6e2..666b6a7 100644
--- a/src/mm-device.c
+++ b/src/mm-device.c
@@ -271,6 +271,7 @@
     if (!driver && strncmp (name, "rfcomm", 6) == 0)
         driver = "bluetooth";
 
+    /* Note: may return NULL! */
     return driver;
 }
 
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 64b4928..d40082d 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -1897,6 +1897,8 @@
 MMBearerIpFamily
 mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type)
 {
+    if (!pdp_type)
+        return MM_BEARER_IP_FAMILY_NONE;
     if (g_str_equal (pdp_type, "IP"))
         return MM_BEARER_IP_FAMILY_IPV4;
     if (g_str_equal (pdp_type, "IPV4"))
diff --git a/src/mm-plugin.c b/src/mm-plugin.c
index 2b4adea..a83baea 100644
--- a/src/mm-plugin.c
+++ b/src/mm-plugin.c
@@ -708,9 +708,9 @@
     } else {
         /* cdc-wdm ports... */
         probe_run_flags = MM_PORT_PROBE_NONE;
-        if (self->priv->qmi && g_str_equal (mm_device_utils_get_port_driver (port), "qmi_wwan"))
+        if (self->priv->qmi && !g_strcmp0 (mm_device_utils_get_port_driver (port), "qmi_wwan"))
             probe_run_flags |= MM_PORT_PROBE_QMI;
-        else if (self->priv->mbim && g_str_equal (mm_device_utils_get_port_driver (port), "cdc_mbim"))
+        else if (self->priv->mbim && !g_strcmp0 (mm_device_utils_get_port_driver (port), "cdc_mbim"))
             probe_run_flags |= MM_PORT_PROBE_MBIM;
         else
             probe_run_flags |= MM_PORT_PROBE_AT;
@@ -880,8 +880,7 @@
             }
 #if !defined WITH_QMI
             else if (mm_port_probe_get_port_type (probe) == MM_PORT_TYPE_NET &&
-                     g_str_equal (mm_device_utils_get_port_driver (mm_port_probe_peek_port (probe)),
-                                  "qmi_wwan")) {
+                     !g_strcmp0 (mm_device_utils_get_port_driver (mm_port_probe_peek_port (probe)), "qmi_wwan")) {
                 /* Try to generically grab the port, but flagged as ignored */
                 grabbed = mm_base_modem_grab_port (modem,
                                                    mm_port_probe_get_port_subsys (probe),
@@ -894,8 +893,7 @@
 #endif
 #if !defined WITH_MBIM
             else if (mm_port_probe_get_port_type (probe) == MM_PORT_TYPE_NET &&
-                     g_str_equal (mm_device_utils_get_port_driver (mm_port_probe_peek_port (probe)),
-                                  "cdc_mbim")) {
+                     !g_strcmp0 (mm_device_utils_get_port_driver (mm_port_probe_peek_port (probe)), "cdc_mbim")) {
                 /* Try to generically grab the port, but flagged as ignored */
                 grabbed = mm_base_modem_grab_port (modem,
                                                    mm_port_probe_get_port_subsys (probe),