mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
network: Add network_new
This commit is contained in:
parent
54e7cced8e
commit
d1948c0233
@ -190,6 +190,22 @@ double network_rankmod(uint32_t type, const char *ssid)
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
struct network *network_create(struct netdev *device,
|
||||
uint8_t *ssid, uint8_t ssid_len,
|
||||
enum security security)
|
||||
{
|
||||
struct network *network;
|
||||
|
||||
network = l_new(struct network, 1);
|
||||
network->netdev = device;
|
||||
memcpy(network->ssid, ssid, ssid_len);
|
||||
network->security = security;
|
||||
|
||||
network->bss_list = l_queue_new();
|
||||
|
||||
return network;
|
||||
}
|
||||
|
||||
const char *network_get_ssid(struct network *network)
|
||||
{
|
||||
return network->ssid;
|
||||
|
@ -41,6 +41,10 @@ bool network_seen(uint32_t type, const char *ssid);
|
||||
bool network_connected(uint32_t type, const char *ssid);
|
||||
double network_rankmod(uint32_t type, const char *ssid);
|
||||
|
||||
struct network *network_create(struct netdev *device,
|
||||
uint8_t *ssid, uint8_t ssid_len,
|
||||
enum security security);
|
||||
|
||||
bool __iwd_network_append_properties(const struct network *network,
|
||||
struct l_dbus_message_builder *builder);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user