summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/NetworkManager.ver2
-rw-r--r--src/devices/wifi/nm-device-wifi.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/NetworkManager.ver b/src/NetworkManager.ver
index 9e613d4142..82f193ec34 100644
--- a/src/NetworkManager.ver
+++ b/src/NetworkManager.ver
@@ -25,6 +25,8 @@ global:
nm_active_connection_get_specific_object;
nm_active_connection_get_type;
nm_active_connection_set_specific_object;
+ nm_agent_manager_get;
+ nm_agent_manager_exists_agent_without_capability;
nm_config_data_get_connection_default;
nm_config_data_get_device_config;
nm_config_data_get_device_config_boolean;
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 8381aaccb3..b34d021ead 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -50,6 +50,7 @@
#include "nm-settings.h"
#include "nm-core-internal.h"
#include "nm-config.h"
+#include "nm-agent-manager.h"
#include "nmdbus-device-wifi.h"
@@ -1442,6 +1443,13 @@ request_wireless_scan_periodic (gpointer user_data)
NMDeviceWifi *self = user_data;
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
+ if ( nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_ACTIVATED
+ && !nm_agent_manager_exists_agent_without_capability (nm_agent_manager_get (),
+ NM_SECRET_AGENT_CAPABILITY_WIFI_SCAN)) {
+ /* Don't trigger the scan now, no agents need it. */
+ return G_SOURCE_CONTINUE;
+ }
+
priv->pending_scan_id = 0;
request_wireless_scan (self, NULL);
return G_SOURCE_REMOVE;