summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-04-15 17:12:13 -0500
committerDan Williams <dcbw@redhat.com>2014-05-13 12:38:43 -0500
commit06e3c6d02fe997e715345d3ce6a290be3862346e (patch)
treeb6fcc0e009b6d82ca2fb647fc305129a699e16e2
parentb46b28d18f243f2406ae8f511cdede865cad8428 (diff)
downloadNetworkManager-06e3c6d02fe997e715345d3ce6a290be3862346e.tar.gz
wifi: make Wi-Fi support a plugin
Make Wi-Fi support a plugin using the new device factory interface. Provides a 7% size reduction in the core NM binary. Before After NM: 1154104 1071992 (-7%) Wi-Fi: 0 110464 (all results from stripped files)
-rw-r--r--.gitignore1
-rw-r--r--configure.ac2
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/Makefile.am11
-rw-r--r--src/devices/wifi/Makefile.am78
-rw-r--r--src/devices/wifi/exports.ver7
-rw-r--r--src/devices/wifi/nm-device-olpc-mesh.c (renamed from src/devices/nm-device-olpc-mesh.c)1
-rw-r--r--src/devices/wifi/nm-device-olpc-mesh.h (renamed from src/devices/nm-device-olpc-mesh.h)0
-rw-r--r--src/devices/wifi/nm-device-wifi.c (renamed from src/devices/nm-device-wifi.c)44
-rw-r--r--src/devices/wifi/nm-device-wifi.h (renamed from src/devices/nm-device-wifi.h)1
-rw-r--r--src/devices/wifi/nm-wifi-ap-utils.c (renamed from src/nm-wifi-ap-utils.c)0
-rw-r--r--src/devices/wifi/nm-wifi-ap-utils.h (renamed from src/nm-wifi-ap-utils.h)0
-rw-r--r--src/devices/wifi/nm-wifi-ap.c (renamed from src/nm-wifi-ap.c)0
-rw-r--r--src/devices/wifi/nm-wifi-ap.h (renamed from src/nm-wifi-ap.h)0
-rw-r--r--src/devices/wifi/nm-wifi-factory.c114
-rw-r--r--src/devices/wifi/tests/Makefile.am28
-rw-r--r--src/devices/wifi/tests/test-wifi-ap-utils.c (renamed from src/tests/test-wifi-ap-utils.c)0
-rw-r--r--src/nm-manager.c53
-rw-r--r--src/nm-policy.c1
-rw-r--r--src/tests/Makefile.am11
20 files changed, 266 insertions, 88 deletions
diff --git a/.gitignore b/.gitignore
index 3678dc36e1..b3245af97b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -186,6 +186,7 @@ valgrind-*.log
/src/tests/test-ip6-config
/src/tests/test-wifi-ap-utils
/src/tests/test-resolvconf-capture
+/src/devices/wifi/tests/test-wifi-ap-utils
/src/dnsmasq-manager/tests/test-dnsmasq-utils
/src/dhcp-manager/tests/test-dhcp-dhclient
/src/dhcp-manager/tests/test-dnsmasq-utils
diff --git a/configure.ac b/configure.ac
index 74db8c1129..cfccfc2e00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -800,6 +800,8 @@ src/rdisc/tests/Makefile
src/devices/adsl/Makefile
src/devices/wimax/Makefile
src/devices/bluetooth/Makefile
+src/devices/wifi/Makefile
+src/devices/wifi/tests/Makefile
src/devices/wwan/Makefile
libnm-util/libnm-util.pc
libnm-util/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 36bc69ffa0..6368a9f59f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -53,9 +53,9 @@ src/devices/nm-device-bond.c
src/devices/nm-device-bridge.c
src/devices/nm-device-ethernet.c
src/devices/nm-device-infiniband.c
-src/devices/nm-device-olpc-mesh.c
src/devices/nm-device-team.c
src/devices/nm-device-vlan.c
+src/devices/wifi/nm-device-olpc-mesh.c
src/devices/wwan/nm-modem-broadband.c
src/devices/wwan/nm-modem-old.c
src/nm-manager.c
diff --git a/src/Makefile.am b/src/Makefile.am
index d467e803ca..53fc35c1fb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = \
devices/adsl \
devices/wwan \
devices/bluetooth \
+ devices/wifi \
dhcp-manager \
ppp-manager \
settings/plugins
@@ -78,8 +79,6 @@ nm_sources = \
devices/nm-device-infiniband.h \
devices/nm-device-macvlan.c \
devices/nm-device-macvlan.h \
- devices/nm-device-olpc-mesh.c \
- devices/nm-device-olpc-mesh.h \
devices/nm-device-private.h \
devices/nm-device-team.c \
devices/nm-device-team.h \
@@ -91,8 +90,6 @@ nm_sources = \
devices/nm-device-vlan.h \
devices/nm-device-vxlan.c \
devices/nm-device-vxlan.h \
- devices/nm-device-wifi.c \
- devices/nm-device-wifi.h \
\
dhcp-manager/nm-dhcp-client.c \
dhcp-manager/nm-dhcp-client.h \
@@ -241,10 +238,6 @@ nm_sources = \
nm-session-utils.h \
nm-sleep-monitor.h \
nm-types.h \
- nm-wifi-ap-utils.c \
- nm-wifi-ap-utils.h \
- nm-wifi-ap.c \
- nm-wifi-ap.h \
NetworkManagerUtils.c \
NetworkManagerUtils.h
@@ -297,13 +290,11 @@ glue_sources = \
nm-device-gre-glue.h \
nm-device-infiniband-glue.h \
nm-device-macvlan-glue.h \
- nm-device-olpc-mesh-glue.h \
nm-device-team-glue.h \
nm-device-tun-glue.h \
nm-device-veth-glue.h \
nm-device-vlan-glue.h \
nm-device-vxlan-glue.h \
- nm-device-wifi-glue.h \
nm-dhcp4-config-glue.h \
nm-dhcp6-config-glue.h \
nm-ip4-config-glue.h \
diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am
new file mode 100644
index 0000000000..5f3ce286b7
--- /dev/null
+++ b/src/devices/wifi/Makefile.am
@@ -0,0 +1,78 @@
+include $(GLIB_MAKEFILE)
+
+@GNOME_CODE_COVERAGE_RULES@
+
+SUBDIRS=. tests
+
+AM_CPPFLAGS = \
+ -I${top_srcdir}/src \
+ -I${top_builddir}/src \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/src/devices \
+ -I${top_srcdir}/src/settings \
+ -I${top_srcdir}/src/platform \
+ -I${top_srcdir}/src/supplicant-manager \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/include \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/libnm-util \
+ -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
+ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
+ $(DBUS_CFLAGS) \
+ $(POLKIT_CFLAGS) \
+ $(LIBNL_CFLAGS) \
+ $(GUDEV_CFLAGS)
+
+GLIB_GENERATED = nm-wifi-enum-types.h nm-wifi-enum-types.c
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
+nm_wifi_enum_types_sources = \
+ $(srcdir)/nm-device-wifi.h \
+ $(srcdir)/nm-wifi-ap.h \
+ $(srcdir)/nm-device-olpc-mesh.h
+
+glue_sources = \
+ nm-device-wifi-glue.h \
+ nm-device-olpc-mesh-glue.h
+
+%-glue.h: $(top_srcdir)/introspection/%.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=$(subst -,_,$(subst -glue.h,,$@)) --mode=glib-server --output=$@ $<
+
+BUILT_SOURCES = $(GLIB_GENERATED) $(glue_sources)
+
+pkglib_LTLIBRARIES = libnm-device-plugin-wifi.la
+
+libnm_device_plugin_wifi_la_SOURCES = \
+ nm-wifi-factory.c \
+ nm-device-wifi.c \
+ nm-device-wifi.h \
+ nm-wifi-ap.c \
+ nm-wifi-ap.h \
+ nm-wifi-ap-utils.c \
+ nm-wifi-ap-utils.h \
+ nm-device-olpc-mesh.c \
+ nm-device-olpc-mesh.h \
+ \
+ $(BUILT_SOURCES)
+
+SYMBOL_VIS_FILE=$(srcdir)/exports.ver
+
+libnm_device_plugin_wifi_la_LDFLAGS = \
+ -module -avoid-version \
+ -Wl,--version-script=$(SYMBOL_VIS_FILE)
+
+libnm_device_plugin_wifi_la_LIBADD = \
+ $(DBUS_LIBS) \
+ $(GUDEV_LIBS)
+
+CLEANFILES = $(BUILT_SOURCES)
+
+EXTRA_DIST = $(SYMBOL_VIS_FILE)
+
+if ENABLE_TESTS
+
+check-local:
+ $(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-wifi.so $(SYMBOL_VIS_FILE)
+
+endif
+
diff --git a/src/devices/wifi/exports.ver b/src/devices/wifi/exports.ver
new file mode 100644
index 0000000000..d2c451244b
--- /dev/null
+++ b/src/devices/wifi/exports.ver
@@ -0,0 +1,7 @@
+{
+global:
+ nm_device_factory_create;
+ nm_device_factory_get_device_type;
+local:
+ *;
+};
diff --git a/src/devices/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c
index 19c86975c2..cfb12fc086 100644
--- a/src/devices/nm-device-olpc-mesh.c
+++ b/src/devices/wifi/nm-device-olpc-mesh.c
@@ -53,6 +53,7 @@
#include "nm-manager.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
+#include "nm-wifi-enum-types.h"
/* This is a bug; but we can't really change API now... */
#include "NetworkManagerVPN.h"
diff --git a/src/devices/nm-device-olpc-mesh.h b/src/devices/wifi/nm-device-olpc-mesh.h
index c25dd8e53c..c25dd8e53c 100644
--- a/src/devices/nm-device-olpc-mesh.h
+++ b/src/devices/wifi/nm-device-olpc-mesh.h
diff --git a/src/devices/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 9fa56d44ea..231b2681ca 100644
--- a/src/devices/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -58,6 +58,8 @@
#include "nm-settings-connection.h"
#include "nm-enum-types.h"
#include "nm-dbus-glib-types.h"
+#include "nm-wifi-enum-types.h"
+#include "nm-connection-provider.h"
static gboolean impl_device_get_access_points (NMDeviceWifi *device,
@@ -103,7 +105,6 @@ enum {
enum {
ACCESS_POINT_ADDED,
ACCESS_POINT_REMOVED,
- HIDDEN_AP_FOUND,
SCANNING_ALLOWED,
LAST_SIGNAL
@@ -1748,6 +1749,34 @@ supplicant_iface_scan_done_cb (NMSupplicantInterface *iface,
*
*/
+static void
+try_fill_ssid_for_hidden_ap (NMAccessPoint *ap)
+{
+ const struct ether_addr *bssid;
+ const GSList *connections, *iter;
+
+ g_return_if_fail (nm_ap_get_ssid (ap) == NULL);
+
+ bssid = nm_ap_get_address (ap);
+ g_assert (bssid);
+
+ /* Look for this AP's BSSID in the seen-bssids list of a connection,
+ * and if a match is found, copy over the SSID */
+ connections = nm_connection_provider_get_connections (nm_connection_provider_get ());
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+ NMSettingWireless *s_wifi;
+
+ s_wifi = nm_connection_get_setting_wireless (connection);
+ if (s_wifi) {
+ if (nm_settings_connection_has_seen_bssid (NM_SETTINGS_CONNECTION (connection), bssid)) {
+ nm_ap_set_ssid (ap, nm_setting_wireless_get_ssid (s_wifi));
+ break;
+ }
+ }
+ }
+}
+
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ARG(x) ((guint8*)(x))[0],((guint8*)(x))[1],((guint8*)(x))[2],((guint8*)(x))[3],((guint8*)(x))[4],((guint8*)(x))[5]
@@ -1777,8 +1806,8 @@ merge_scanned_ap (NMDeviceWifi *self,
bssid = nm_ap_get_address (merge_ap);
ssid = nm_ap_get_ssid (merge_ap);
if (!ssid || nm_utils_is_empty_ssid (ssid->data, ssid->len)) {
- /* Let the manager try to fill the AP's SSID from the database */
- g_signal_emit (self, signals[HIDDEN_AP_FOUND], 0, merge_ap);
+ /* Try to fill the SSID from the AP database */
+ try_fill_ssid_for_hidden_ap (merge_ap);
ssid = nm_ap_get_ssid (merge_ap);
if (ssid && (nm_utils_is_empty_ssid (ssid->data, ssid->len) == FALSE)) {
@@ -3621,15 +3650,6 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass)
G_TYPE_NONE, 1,
G_TYPE_OBJECT);
- signals[HIDDEN_AP_FOUND] =
- g_signal_new ("hidden-ap-found",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDeviceWifiClass, hidden_ap_found),
- NULL, NULL, NULL,
- G_TYPE_NONE, 1,
- G_TYPE_OBJECT);
-
signals[SCANNING_ALLOWED] =
g_signal_new ("scanning-allowed",
G_OBJECT_CLASS_TYPE (object_class),
diff --git a/src/devices/nm-device-wifi.h b/src/devices/wifi/nm-device-wifi.h
index 5e4b1a61dd..f0a1beacde 100644
--- a/src/devices/nm-device-wifi.h
+++ b/src/devices/wifi/nm-device-wifi.h
@@ -81,7 +81,6 @@ struct _NMDeviceWifiClass
/* Signals */
void (*access_point_added) (NMDeviceWifi *device, NMAccessPoint *ap);
void (*access_point_removed) (NMDeviceWifi *device, NMAccessPoint *ap);
- void (*hidden_ap_found) (NMDeviceWifi *device, NMAccessPoint *ap);
gboolean (*scanning_allowed) (NMDeviceWifi *device);
};
diff --git a/src/nm-wifi-ap-utils.c b/src/devices/wifi/nm-wifi-ap-utils.c
index 9b03cbd45f..9b03cbd45f 100644
--- a/src/nm-wifi-ap-utils.c
+++ b/src/devices/wifi/nm-wifi-ap-utils.c
diff --git a/src/nm-wifi-ap-utils.h b/src/devices/wifi/nm-wifi-ap-utils.h
index 992b839d52..992b839d52 100644
--- a/src/nm-wifi-ap-utils.h
+++ b/src/devices/wifi/nm-wifi-ap-utils.h
diff --git a/src/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
index 363be2e326..363be2e326 100644
--- a/src/nm-wifi-ap.c
+++ b/src/devices/wifi/nm-wifi-ap.c
diff --git a/src/nm-wifi-ap.h b/src/devices/wifi/nm-wifi-ap.h
index f51fa078ee..f51fa078ee 100644
--- a/src/nm-wifi-ap.h
+++ b/src/devices/wifi/nm-wifi-ap.h
diff --git a/src/devices/wifi/nm-wifi-factory.c b/src/devices/wifi/nm-wifi-factory.c
new file mode 100644
index 0000000000..e4a140a324
--- /dev/null
+++ b/src/devices/wifi/nm-wifi-factory.c
@@ -0,0 +1,114 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 - 2014 Red Hat, Inc.
+ */
+
+#include <gmodule.h>
+
+#include "nm-device-factory.h"
+#include "nm-device-wifi.h"
+#include "nm-device-olpc-mesh.h"
+#include "nm-settings-connection.h"
+
+#define NM_TYPE_WIFI_FACTORY (nm_wifi_factory_get_type ())
+#define NM_WIFI_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIFI_FACTORY, NMWifiFactory))
+
+typedef struct {
+ GObject parent;
+} NMWifiFactory;
+
+typedef struct {
+ GObjectClass parent;
+} NMWifiFactoryClass;
+
+static GType nm_wifi_factory_get_type (void);
+
+static void device_factory_interface_init (NMDeviceFactory *factory_iface);
+
+G_DEFINE_TYPE_EXTENDED (NMWifiFactory, nm_wifi_factory, G_TYPE_OBJECT, 0,
+ G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_FACTORY, device_factory_interface_init))
+
+enum {
+ PROP_0,
+ PROP_DEVICE_TYPE,
+};
+
+/**************************************************************************/
+
+#define PLUGIN_TYPE NM_DEVICE_TYPE_WIFI
+
+G_MODULE_EXPORT NMDeviceFactory *
+nm_device_factory_create (GError **error)
+{
+ return (NMDeviceFactory *) g_object_new (NM_TYPE_WIFI_FACTORY, NULL);
+}
+
+G_MODULE_EXPORT NMDeviceType
+nm_device_factory_get_device_type (void)
+{
+ return PLUGIN_TYPE;
+}
+
+/**************************************************************************/
+
+static NMDevice *
+new_link (NMDeviceFactory *factory, NMPlatformLink *plink, GError **error)
+{
+ if (plink->type == NM_LINK_TYPE_WIFI)
+ return nm_device_wifi_new (plink);
+ else if (plink->type == NM_LINK_TYPE_OLPC_MESH)
+ return nm_device_olpc_mesh_new (plink);
+ return NULL;
+}
+
+static void
+get_property (GObject *object, guint prop, GValue *value, GParamSpec *pspec)
+{
+ switch (prop) {
+ case PROP_DEVICE_TYPE:
+ g_value_set_uint (value, PLUGIN_TYPE);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop, pspec);
+ break;
+ }
+}
+
+static void
+device_factory_interface_init (NMDeviceFactory *factory_iface)
+{
+ factory_iface->new_link = new_link;
+}
+
+static void
+nm_wifi_factory_init (NMWifiFactory *self)
+{
+}
+
+static void
+nm_wifi_factory_class_init (NMWifiFactoryClass *wf_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (wf_class);
+
+ object_class->get_property = get_property;
+
+ g_object_class_override_property (object_class,
+ PROP_DEVICE_TYPE,
+ NM_DEVICE_FACTORY_DEVICE_TYPE);
+}
+
diff --git a/src/devices/wifi/tests/Makefile.am b/src/devices/wifi/tests/Makefile.am
new file mode 100644
index 0000000000..2667c5f12d
--- /dev/null
+++ b/src/devices/wifi/tests/Makefile.am
@@ -0,0 +1,28 @@
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
+ -I$(top_srcdir)/src/platform \
+ -I$(top_srcdir)/src/logging \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/devices/wifi \
+ -I$(top_builddir)/src \
+ -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
+ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
+ $(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS)
+
+noinst_PROGRAMS = test-wifi-ap-utils
+
+test_wifi_ap_utils_SOURCES = \
+ test-wifi-ap-utils.c \
+ $(srcdir)/../nm-wifi-ap.c \
+ $(srcdir)/../nm-wifi-ap.h \
+ $(srcdir)/../nm-wifi-ap-utils.c \
+ $(srcdir)/../nm-wifi-ap-utils.h
+
+test_wifi_ap_utils_LDADD = $(top_builddir)/src/libNetworkManager.la
+
+TESTS = test-wifi-ap-utils
+
diff --git a/src/tests/test-wifi-ap-utils.c b/src/devices/wifi/tests/test-wifi-ap-utils.c
index b828aa5f8f..b828aa5f8f 100644
--- a/src/tests/test-wifi-ap-utils.c
+++ b/src/devices/wifi/tests/test-wifi-ap-utils.c
diff --git a/src/nm-manager.c b/src/nm-manager.c
index f82967094b..dde273923d 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -41,8 +41,6 @@
#include "nm-vpn-manager.h"
#include "nm-device.h"
#include "nm-device-ethernet.h"
-#include "nm-device-wifi.h"
-#include "nm-device-olpc-mesh.h"
#include "nm-device-infiniband.h"
#include "nm-device-bond.h"
#include "nm-device-team.h"
@@ -1310,39 +1308,6 @@ manager_update_radio_enabled (NMManager *self,
}
static void
-manager_hidden_ap_found (NMDevice *device,
- NMAccessPoint *ap,
- gpointer user_data)
-{
- NMManager *manager = NM_MANAGER (user_data);
- NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
- const struct ether_addr *bssid;
- GSList *iter;
- GSList *connections;
- gboolean done = FALSE;
-
- g_return_if_fail (nm_ap_get_ssid (ap) == NULL);
-
- bssid = nm_ap_get_address (ap);
- g_assert (bssid);
-
- /* Look for this AP's BSSID in the seen-bssids list of a connection,
- * and if a match is found, copy over the SSID */
- connections = nm_settings_get_connections (priv->settings);
- for (iter = connections; iter && !done; iter = g_slist_next (iter)) {
- NMConnection *connection = NM_CONNECTION (iter->data);
- NMSettingWireless *s_wifi;
-
- s_wifi = nm_connection_get_setting_wireless (connection);
- if (s_wifi) {
- if (nm_settings_connection_has_seen_bssid (NM_SETTINGS_CONNECTION (connection), bssid))
- nm_ap_set_ssid (ap, nm_setting_wireless_get_ssid (s_wifi));
- }
- }
- g_slist_free (connections);
-}
-
-static void
update_rstate_from_rfkill (NMRfkillManager *rfkill_mgr, RadioState *rstate)
{
switch (nm_rfkill_manager_get_rfkill_state (rfkill_mgr, rstate->rtype)) {
@@ -1644,11 +1609,8 @@ add_device (NMManager *self, NMDevice *device, gboolean generate_con)
NMConnection *connection = NULL;
gboolean enabled = FALSE;
RfKillType rtype;
- NMDeviceType devtype;
GSList *iter, *remove = NULL;
- devtype = nm_device_get_device_type (device);
-
/* No duplicates */
if (nm_manager_get_device_by_udi (self, nm_device_get_udi (device)))
return;
@@ -1689,15 +1651,6 @@ add_device (NMManager *self, NMDevice *device, gboolean generate_con)
self);
}
- if (devtype == NM_DEVICE_TYPE_WIFI) {
- /* Attach to the access-point-added signal so that the manager can fill
- * non-SSID-broadcasting APs with an SSID.
- */
- g_signal_connect (device, "hidden-ap-found",
- G_CALLBACK (manager_hidden_ap_found),
- self);
- }
-
/* Update global rfkill state for this device type with the device's
* rfkill state, and then set this device's rfkill state based on the
* global state.
@@ -2007,12 +1960,6 @@ platform_link_added (NMManager *self,
case NM_LINK_TYPE_INFINIBAND:
device = nm_device_infiniband_new (plink);
break;
- case NM_LINK_TYPE_OLPC_MESH:
- device = nm_device_olpc_mesh_new (plink);
- break;
- case NM_LINK_TYPE_WIFI:
- device = nm_device_wifi_new (plink);
- break;
case NM_LINK_TYPE_BOND:
device = nm_device_bond_new (plink);
break;
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 88bc31a161..d751606ed8 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -29,7 +29,6 @@
#include "nm-policy.h"
#include "NetworkManagerUtils.h"
-#include "nm-wifi-ap.h"
#include "nm-activation-request.h"
#include "nm-logging.h"
#include "nm-device.h"
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index e23ad68761..ee5be17d7b 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -16,7 +16,6 @@ AM_CPPFLAGS = \
noinst_PROGRAMS = \
test-dhcp-options \
test-general \
- test-wifi-ap-utils \
test-ip4-config \
test-ip6-config \
test-dcb \
@@ -35,14 +34,6 @@ test_dhcp_options_CPPFLAGS = \
test_dhcp_options_LDADD = \
$(top_builddir)/src/libNetworkManager.la
-####### wifi ap utils test #######
-
-test_wifi_ap_utils_SOURCES = \
- test-wifi-ap-utils.c
-
-test_wifi_ap_utils_LDADD = \
- $(top_builddir)/src/libNetworkManager.la
-
####### ip4 config test #######
test_ip4_config_SOURCES = \
@@ -89,5 +80,5 @@ EXTRA_DIST = test-secret-agent.py
###########################################
-TESTS = test-dhcp-options test-wifi-ap-utils test-ip4-config test-ip6-config test-dcb test-resolvconf-capture test-general
+TESTS = test-dhcp-options test-ip4-config test-ip6-config test-dcb test-resolvconf-capture test-general