3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-06-07 22:07:23 +02:00

network: make clearing network blacklist a separate operation

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.
This commit is contained in:
James Prestwood 2025-05-28 13:10:21 -07:00 committed by Denis Kenzior
parent ea9ff2dcaf
commit 5287809043
2 changed files with 7 additions and 3 deletions

View File

@ -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);

View File

@ -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);