mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
network: Move network_info_match to knownnetworks.c
This commit is contained in:
parent
0d7f591d4f
commit
67eeb0386d
@ -214,6 +214,20 @@ bool known_networks_has_hidden(void)
|
||||
return num_known_hidden_networks ? true : false;
|
||||
}
|
||||
|
||||
static bool network_info_match(const void *a, const void *b)
|
||||
{
|
||||
const struct network_info *ni_a = a;
|
||||
const struct network_info *ni_b = b;
|
||||
|
||||
if (ni_a->type != ni_b->type)
|
||||
return false;
|
||||
|
||||
if (strcmp(ni_a->ssid, ni_b->ssid))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct network_info *known_networks_find(const char *ssid,
|
||||
enum security security)
|
||||
{
|
||||
|
@ -131,20 +131,6 @@ static void network_settings_close(struct network *network)
|
||||
network->settings = NULL;
|
||||
}
|
||||
|
||||
bool network_info_match(const void *a, const void *b)
|
||||
{
|
||||
const struct network_info *ni_a = a;
|
||||
const struct network_info *ni_b = b;
|
||||
|
||||
if (ni_a->type != ni_b->type)
|
||||
return false;
|
||||
|
||||
if (strcmp(ni_a->ssid, ni_b->ssid))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool network_secret_check_cacheable(void *data, void *user_data)
|
||||
{
|
||||
struct eap_secret_info *secret = data;
|
||||
|
@ -89,4 +89,3 @@ struct network_info {
|
||||
struct network_info *network_info_add_known(const char *ssid,
|
||||
enum security security);
|
||||
void network_info_forget_known(struct network_info *network);
|
||||
bool network_info_match(const void *a, const void *b);
|
||||
|
Loading…
Reference in New Issue
Block a user