mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
network: Add network_set_psk
This commit is contained in:
parent
c380940b43
commit
3fd51c2d72
@ -317,6 +317,16 @@ const uint8_t *network_get_psk(const struct network *network)
|
||||
return network->psk;
|
||||
}
|
||||
|
||||
bool network_set_psk(struct network *network, const uint8_t *psk)
|
||||
{
|
||||
if (network->info->type != SECURITY_PSK)
|
||||
return false;
|
||||
|
||||
l_free(network->psk);
|
||||
network->psk = l_memdup(psk, 32);
|
||||
return true;
|
||||
}
|
||||
|
||||
int network_get_signal_strength(const struct network *network)
|
||||
{
|
||||
struct scan_bss *best_bss = l_queue_peek_head(network->bss_list);
|
||||
|
@ -43,6 +43,7 @@ const uint8_t *network_get_psk(const struct network *network);
|
||||
int network_get_signal_strength(const struct network *network);
|
||||
struct l_settings *network_get_settings(const struct network *network);
|
||||
|
||||
bool network_set_psk(struct network *network, const uint8_t *psk);
|
||||
void network_sync_psk(struct network *network);
|
||||
|
||||
int network_autoconnect(struct network *network, struct scan_bss *bss);
|
||||
|
Loading…
Reference in New Issue
Block a user