[PATCH] Ignore wifi p2p devices



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

diff --git a/src/devices/wifi/nm-wifi-factory.c b/src/devices/wifi/nm-wifi-factory.c
index 2d5f8fa..7b1312d 100644
--- a/src/devices/wifi/nm-wifi-factory.c
+++ b/src/devices/wifi/nm-wifi-factory.c
@@ -73,6 +73,15 @@ create_device (NMDeviceFactory *factory,
        g_return_val_if_fail (g_strcmp0 (iface, plink->name) == 0, NULL);
        g_return_val_if_fail (NM_IN_SET (plink->type, NM_LINK_TYPE_WIFI, NM_LINK_TYPE_OLPC_MESH), NULL);
 
+       /* Explicitly ignore p2p Wi-Fi devices exposed by Android
+        * drivers, and managed externally in the case of Wi-Fi Direct.
+        */
+       if (g_str_has_prefix (plink->name, "p2p")) {
+               nm_log_info (LOGD_HW, "(%s): ignoring P2P Wi-Fi interface", plink->name);
+               *out_ignore = TRUE;
+               return NULL;
+       }
+
        if (!nm_platform_wifi_get_capabilities (NM_PLATFORM_GET,
                                                plink->ifindex,
                                                &capabilities)) {
-- 
2.7.4



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