summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mscc/mscc_macsec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/mscc/mscc_macsec.c')
-rw-r--r--drivers/net/phy/mscc/mscc_macsec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/phy/mscc/mscc_macsec.c b/drivers/net/phy/mscc/mscc_macsec.c
index 4f39ba63a9a9..9a38a29cf397 100644
--- a/drivers/net/phy/mscc/mscc_macsec.c
+++ b/drivers/net/phy/mscc/mscc_macsec.c
@@ -504,15 +504,15 @@ static u32 vsc8584_macsec_flow_context_id(struct macsec_flow *flow)
static int vsc8584_macsec_derive_key(const u8 *key, u16 key_len, u8 hkey[16])
{
const u8 input[AES_BLOCK_SIZE] = {0};
- struct crypto_aes_ctx ctx;
+ struct aes_enckey aes;
int ret;
- ret = aes_expandkey(&ctx, key, key_len);
+ ret = aes_prepareenckey(&aes, key, key_len);
if (ret)
return ret;
- aes_encrypt(&ctx, hkey, input);
- memzero_explicit(&ctx, sizeof(ctx));
+ aes_encrypt(&aes, hkey, input);
+ memzero_explicit(&aes, sizeof(aes));
return 0;
}