mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
network: introduce the concept of hidden networks
This commit is contained in:
parent
1ffc99c343
commit
5ded4890a6
@ -1177,6 +1177,8 @@ void network_rank_update(struct network *network)
|
|||||||
bool network_info_add_known(const char *ssid, enum security security)
|
bool network_info_add_known(const char *ssid, enum security security)
|
||||||
{
|
{
|
||||||
struct network_info *network;
|
struct network_info *network;
|
||||||
|
struct l_settings *settings;
|
||||||
|
bool is_hidden;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
network = l_new(struct network_info, 1);
|
network = l_new(struct network_info, 1);
|
||||||
@ -1192,6 +1194,13 @@ bool network_info_add_known(const char *ssid, enum security security)
|
|||||||
|
|
||||||
network->is_known = true;
|
network->is_known = true;
|
||||||
|
|
||||||
|
settings = storage_network_open(security_to_str(security), ssid);
|
||||||
|
|
||||||
|
if (l_settings_get_bool(settings, "Settings", "Hidden", &is_hidden))
|
||||||
|
network->is_hidden = is_hidden;
|
||||||
|
|
||||||
|
l_settings_free(settings);
|
||||||
|
|
||||||
l_queue_insert(networks, network, timespec_compare, NULL);
|
l_queue_insert(networks, network, timespec_compare, NULL);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -70,6 +70,7 @@ struct network_info {
|
|||||||
struct timespec seen_time; /* Time last seen */
|
struct timespec seen_time; /* Time last seen */
|
||||||
int seen_count; /* Ref count for network.info */
|
int seen_count; /* Ref count for network.info */
|
||||||
bool is_known:1;
|
bool is_known:1;
|
||||||
|
bool is_hidden:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*network_info_foreach_func_t)(const struct network_info *info,
|
typedef void (*network_info_foreach_func_t)(const struct network_info *info,
|
||||||
|
Loading…
Reference in New Issue
Block a user