mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-20 11:40:40 +01:00
network: Add network_settings_load and _close
This commit is contained in:
parent
900a10d3c7
commit
2e46201a1e
@ -210,6 +210,35 @@ enum security network_get_security(struct network *network)
|
|||||||
return network->security;
|
return network->security;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool network_settings_load(struct network *network)
|
||||||
|
{
|
||||||
|
if (network->settings)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
switch (network->security) {
|
||||||
|
case SECURITY_8021X:
|
||||||
|
network->settings = storage_network_open("8021x",
|
||||||
|
network->ssid);
|
||||||
|
break;
|
||||||
|
case SECURITY_PSK:
|
||||||
|
network->settings = storage_network_open("psk", network->ssid);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void network_settings_close(struct network *network)
|
||||||
|
{
|
||||||
|
if (!network->settings)
|
||||||
|
return;
|
||||||
|
|
||||||
|
l_settings_free(network->settings);
|
||||||
|
network->settings = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool __iwd_network_append_properties(const struct network *network,
|
bool __iwd_network_append_properties(const struct network *network,
|
||||||
struct l_dbus_message_builder *builder)
|
struct l_dbus_message_builder *builder)
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,9 @@ struct netdev *network_get_netdev(struct network *network);
|
|||||||
const char *network_get_path(struct network *network);
|
const char *network_get_path(struct network *network);
|
||||||
enum security network_get_security(struct network *network);
|
enum security network_get_security(struct network *network);
|
||||||
|
|
||||||
|
bool network_settings_load(struct network *network);
|
||||||
|
void network_settings_close(struct network *network);
|
||||||
|
|
||||||
void network_emit_added(struct network *network);
|
void network_emit_added(struct network *network);
|
||||||
void network_emit_removed(struct network *network);
|
void network_emit_removed(struct network *network);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user