public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 1/6] network: make clearing network blacklist a separate operation
@ 2025-05-28 20:10 James Prestwood
  2025-05-28 20:10 ` [PATCH v2 2/6] station: fix DBus reply for Connect() with netconfig James Prestwood
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: James Prestwood @ 2025-05-28 20:10 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

This adds a new API network_clear_blacklist() and removes this
functionality from network_connected(). This is done to support BSS
iteration when netconfig is enabled. Since a call to
network_connected() will happen prior to netconfig completing we
cannot clear the blacklist until netconfig has either passed or
failed.
---
 src/network.c | 9 ++++++---
 src/network.h | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/network.c b/src/network.c
index 4602a110..588ea5ae 100644
--- a/src/network.c
+++ b/src/network.c
@@ -168,6 +168,11 @@ static bool network_secret_check_cacheable(void *data, void *user_data)
 	return false;
 }
 
+void network_clear_blacklist(struct network *network)
+{
+	l_queue_clear(network->blacklist, NULL);
+}
+
 void network_connected(struct network *network)
 {
 	enum security security = network_get_security(network);
@@ -198,8 +203,6 @@ void network_connected(struct network *network)
 	l_queue_foreach_remove(network->secrets,
 				network_secret_check_cacheable, network);
 
-	l_queue_clear(network->blacklist, NULL);
-
 	network->provisioning_hidden = false;
 }
 
@@ -207,7 +210,7 @@ void network_disconnected(struct network *network)
 {
 	network_settings_close(network);
 
-	l_queue_clear(network->blacklist, NULL);
+	network_clear_blacklist(network);
 
 	if (network->provisioning_hidden)
 		station_hide_network(network->station, network);
diff --git a/src/network.h b/src/network.h
index 849051dd..061f47ca 100644
--- a/src/network.h
+++ b/src/network.h
@@ -74,6 +74,7 @@ bool network_bss_update(struct network *network, struct scan_bss *bss);
 const char *network_bss_get_path(const struct network *network,
 						const struct scan_bss *bss);
 bool network_bss_list_isempty(struct network *network);
+void network_clear_blacklist(struct network *network);
 
 const char *__network_path_append_bss(const char *network_path,
 					const struct scan_bss *bss);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-06-05 15:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 20:10 [PATCH v2 1/6] network: make clearing network blacklist a separate operation James Prestwood
2025-05-28 20:10 ` [PATCH v2 2/6] station: fix DBus reply for Connect() with netconfig James Prestwood
2025-05-28 20:10 ` [PATCH v2 3/6] station: include netconfig as part of the BSS retry logic James Prestwood
2025-05-28 20:10 ` [PATCH v2 4/6] auto-t: allow configurable DBus timeout/callbacks on connect{_bssid} James Prestwood
2025-05-28 20:10 ` [PATCH v2 5/6] auto-t: update several tests to work with netconfig refactor James Prestwood
2025-05-28 20:10 ` [PATCH v2 6/6] doc: add note about timeouts to Network.Connect() James Prestwood
2025-06-05 15:02 ` [PATCH v2 1/6] network: make clearing network blacklist a separate operation Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox