diff options
Diffstat (limited to 'src/libwpactrl/wpactrl_associate.c')
-rw-r--r-- | src/libwpactrl/wpactrl_associate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libwpactrl/wpactrl_associate.c b/src/libwpactrl/wpactrl_associate.c index 59900d6..0f1bd2e 100644 --- a/src/libwpactrl/wpactrl_associate.c +++ b/src/libwpactrl/wpactrl_associate.c @@ -14,9 +14,10 @@ int wpactrl_associate (wpactrl_t *a, char const *ssid, char const *psk, tain_t * if (!wpactrl_addnetwork(a, &id, stamp)) goto err ; } + if (wpactrl_setnetworkoption(a, id, "ssid", ssid, stamp) != WPA_OK) goto err ; if (psk) { - if (wpactrl_setnetworkoption(a, id, "key_mgmt", "WPA-PSK WPA-PSK-SHA256", stamp) != WPA_OK + if (wpactrl_setnetworkoption(a, id, "key_mgmt", "WPA-PSK", stamp) != WPA_OK || wpactrl_setnetworkoption(a, id, "mem_only_psk", "1", stamp) != WPA_OK || wpactrl_setnetworkoption(a, id, "psk", psk, stamp) != WPA_OK) goto err ; } |