summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-08-30 09:58:01 +0200
committerThomas Haller <thaller@redhat.com>2022-08-30 09:58:03 +0200
commitade9e1766433d444e52c59611672670eb7144711 (patch)
treef93d9917f356efb2b8bc1fd98a0cf00ee4dd588f
parent55767cf5c5624a71449f36b7b860b40902419b1a (diff)
downloadNetworkManager-ade9e1766433d444e52c59611672670eb7144711.tar.gz
wifi: allow explicit scans during AP/ADHOC modes
The user might still want to see the scan list, to decide whether to stop the hotspot/ADHOC connection and connect to something else. Allow explicit scans.
-rw-r--r--src/core/devices/wifi/nm-device-wifi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/devices/wifi/nm-device-wifi.c b/src/core/devices/wifi/nm-device-wifi.c
index 43798b85ad..eed4f630ee 100644
--- a/src/core/devices/wifi/nm-device-wifi.c
+++ b/src/core/devices/wifi/nm-device-wifi.c
@@ -508,7 +508,10 @@ _scan_notify_allowed(NMDeviceWifi *self, NMTernary do_kickoff)
/* something prohibits scanning. */
} else if (NM_IN_SET(priv->mode, _NM_802_11_MODE_ADHOC, _NM_802_11_MODE_AP)) {
/* Don't scan when a an AP or Ad-Hoc connection is active as it will
- * disrupt connected clients or peers. */
+ * disrupt connected clients or peers.
+ *
+ * Explicit scans are allowed however. */
+ explicit_allowed = TRUE;
} else if (NM_IN_SET(state, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_FAILED)) {
/* Can always scan when disconnected */
explicit_allowed = TRUE;