- g_strlcpy(profile_info->ProfileInfo.Wlan.security_info.authentication.psk.pskKey,
- passphrase, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
+ if (profile_info->profile_type == NET_DEVICE_WIFI)
+ g_strlcpy(profile_info->ProfileInfo.Wlan.security_info.authentication.psk.pskKey,
+ passphrase, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
+ else
+ g_strlcpy(profile_info->ProfileInfo.Mesh.security_info.authentication.sae.saeKey,
+ passphrase, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);