[PATCH v2 2/9] Ignore rild modem devices.



From: Mathieu Trudel-Lapierre <mathieu trudel-lapierre canonical com>

Gbp-Pq: Name Ignore-rild-modem-devices.patch
---
 src/nm-manager.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/nm-manager.c b/src/nm-manager.c
index e64c68a..be21baa 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2057,6 +2057,14 @@ platform_link_added (NMManager *self,
                gboolean ignore = FALSE;
                gs_free_error GError *error = NULL;
 
+               /* Ignore rild modem devices, which will be handled by their modem parent */
+               if (g_str_has_prefix (plink->name, "rmnet") ||
+                       g_str_has_prefix (plink->name, "rev_rmnet") ||
+                       g_str_has_prefix (plink->name, "ccmni")) {
+                       _LOGW (LOGD_HW, "Ignoring rild modem device: %s", plink->name);
+                       return;
+               }
+
                device = nm_device_factory_create_device (factory, plink->name, plink, NULL, &ignore, &error);
                if (!device) {
                        if (!ignore) {
-- 
2.7.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]