[PATCH 2/9] Ignore p2p wifi devices from android



This patch causes NMManager to ignore any p2p WiFi
devices exposed by Android WiFi drivers.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1099983

Gbp-Pq: Name Ignore-p2p-wifi-devices-from-android.patch
---
 src/nm-manager.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/nm-manager.c b/src/nm-manager.c
index c2ed1da..8cf70c7 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2097,6 +2097,17 @@ platform_link_added (NMManager *self,
                        return;
                }
 
+               /*
+                * Ubuntu: Explicitly unmanage all p2p Wi-Fi devices which are
+                * managed externally in the case of Wi-Fi Direct.
+                */
+               NMDeviceType devtype = nm_device_get_device_type (device);
+               if ((plink->type == NM_LINK_TYPE_WIFI)
+                       && g_strstr_len (plink->name, NM_STRLEN ("p2p"), "p2p")) {
+                       nm_log_info (LOGD_HW, "(%s): ignoring P2P wireless iface", 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]