From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 1/6] network: make clearing network blacklist a separate operation
Date: Wed, 28 May 2025 13:10:21 -0700 [thread overview]
Message-ID: <20250528201026.598221-1-prestwoj@gmail.com> (raw)
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
next reply other threads:[~2025-05-28 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 20:10 James Prestwood [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250528201026.598221-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox