Lines Matching refs:creds
1310 static int __stored_creds_to_params(struct wifi_credentials_personal *creds, in __stored_creds_to_params() argument
1318 ssid = (char *)k_malloc(creds->header.ssid_len + 1); in __stored_creds_to_params()
1325 memset(ssid, 0, creds->header.ssid_len + 1); in __stored_creds_to_params()
1326 ret = snprintf(ssid, creds->header.ssid_len + 1, "%s", creds->header.ssid); in __stored_creds_to_params()
1327 if (ret > creds->header.ssid_len) { in __stored_creds_to_params()
1334 params->ssid_length = creds->header.ssid_len; in __stored_creds_to_params()
1337 if (creds->password_len > 0) { in __stored_creds_to_params()
1338 psk = (char *)k_malloc(creds->password_len + 1); in __stored_creds_to_params()
1345 memset(psk, 0, creds->password_len + 1); in __stored_creds_to_params()
1346 ret = snprintf(psk, creds->password_len + 1, "%s", creds->password); in __stored_creds_to_params()
1347 if (ret > creds->password_len) { in __stored_creds_to_params()
1354 params->psk_length = creds->password_len; in __stored_creds_to_params()
1358 params->security = creds->header.type; in __stored_creds_to_params()
1361 params->channel = (creds->header.channel != 0) ? creds->header.channel : WIFI_CHANNEL_ANY; in __stored_creds_to_params()
1362 params->timeout = (creds->header.timeout != 0) in __stored_creds_to_params()
1363 ? creds->header.timeout in __stored_creds_to_params()
1367 if (creds->header.type > WIFI_SECURITY_TYPE_MAX) { in __stored_creds_to_params()
1371 if (creds->header.flags & WIFI_CREDENTIALS_FLAG_2_4GHz) { in __stored_creds_to_params()
1373 } else if (creds->header.flags & WIFI_CREDENTIALS_FLAG_5GHz) { in __stored_creds_to_params()
1380 if (creds->header.flags & WIFI_CREDENTIALS_FLAG_MFP_DISABLED) { in __stored_creds_to_params()
1382 } else if (creds->header.flags & WIFI_CREDENTIALS_FLAG_MFP_REQUIRED) { in __stored_creds_to_params()
1420 static int add_network_from_credentials_struct_personal(struct wifi_credentials_personal *creds, in add_network_from_credentials_struct_personal() argument
1426 if (__stored_creds_to_params(creds, &cnx_params)) { in add_network_from_credentials_struct_personal()
1455 struct wifi_credentials_personal creds; in add_stored_network() local
1458 ret = wifi_credentials_get_by_ssid_personal_struct(ssid, ssid_len, &creds); in add_stored_network()
1466 add_network_from_credentials_struct_personal(&creds, (struct net_if *)cb_arg); in add_stored_network()
1473 struct wifi_credentials_personal creds = { in add_static_network_config() local
1482 &creds); in add_static_network_config()
1490 creds.header.type = WIFI_SECURITY_TYPE_NONE; in add_static_network_config()
1492 creds.header.type = WIFI_SECURITY_TYPE_PSK; in add_static_network_config()
1494 creds.header.type = WIFI_SECURITY_TYPE_PSK_SHA256; in add_static_network_config()
1496 creds.header.type = WIFI_SECURITY_TYPE_SAE; in add_static_network_config()
1498 creds.header.type = WIFI_SECURITY_TYPE_WPA_PSK; in add_static_network_config()
1503 memcpy(creds.header.ssid, CONFIG_WIFI_CREDENTIALS_STATIC_SSID, in add_static_network_config()
1505 memcpy(creds.password, CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD, in add_static_network_config()
1509 creds.header.ssid); in add_static_network_config()
1511 return add_network_from_credentials_struct_personal(&creds, iface); in add_static_network_config()