@@ -713,7 +713,7 @@ static int do_ccm_encrypt_mac(struct cipher_ctx *ctx,
713713
714714 if (aead_op -> ad != NULL || aead_op -> ad_len != 0U ) {
715715 LOG_ERR ("Associated data is not supported." );
716- return - EINVAL ;
716+ return - ENOTSUP ;
717717 }
718718
719719 ataes132a_aes_ccm_encrypt (dev , key_id , & mac_mode ,
@@ -758,7 +758,7 @@ static int do_ccm_decrypt_auth(struct cipher_ctx *ctx,
758758
759759 if (aead_op -> ad != NULL || aead_op -> ad_len != 0U ) {
760760 LOG_ERR ("Associated data is not supported." );
761- return - EINVAL ;
761+ return - ENOTSUP ;
762762 }
763763
764764 /* Normal Decryption Mode will only decrypt host generated packets */
@@ -835,18 +835,18 @@ static int ataes132a_session_setup(const struct device *dev,
835835
836836 if (algo != CRYPTO_CIPHER_ALGO_AES ) {
837837 LOG_ERR ("ATAES132A unsupported algorithm" );
838- return - EINVAL ;
838+ return - ENOTSUP ;
839839 }
840840
841841 /*ATAES132A support I2C polling only*/
842842 if (!(ctx -> flags & CAP_SYNC_OPS )) {
843843 LOG_ERR ("Async not supported by this driver" );
844- return - EINVAL ;
844+ return - ENOTSUP ;
845845 }
846846
847847 if (ctx -> keylen != ATAES132A_AES_KEY_SIZE ) {
848848 LOG_ERR ("ATAES132A unsupported key size" );
849- return - EINVAL ;
849+ return - ENOTSUP ;
850850 }
851851
852852 if (op_type == CRYPTO_CIPHER_OP_ENCRYPT ) {
@@ -859,7 +859,7 @@ static int ataes132a_session_setup(const struct device *dev,
859859 break ;
860860 default :
861861 LOG_ERR ("ATAES132A unsupported mode" );
862- return - EINVAL ;
862+ return - ENOTSUP ;
863863 }
864864 } else {
865865 switch (mode ) {
@@ -871,7 +871,7 @@ static int ataes132a_session_setup(const struct device *dev,
871871 break ;
872872 default :
873873 LOG_ERR ("ATAES132A unsupported mode" );
874- return - EINVAL ;
874+ return - ENOTSUP ;
875875 }
876876 }
877877
0 commit comments