Lines Matching full:flags

101 static u32 qce_auth_cfg(unsigned long flags, u32 key_size, u32 auth_size)  in qce_auth_cfg()  argument
105 if (IS_CCM(flags) || IS_CMAC(flags)) in qce_auth_cfg()
110 if (IS_CCM(flags) || IS_CMAC(flags)) { in qce_auth_cfg()
117 if (IS_SHA1(flags) || IS_SHA1_HMAC(flags)) in qce_auth_cfg()
119 else if (IS_SHA256(flags) || IS_SHA256_HMAC(flags)) in qce_auth_cfg()
121 else if (IS_CMAC(flags)) in qce_auth_cfg()
123 else if (IS_CCM(flags)) in qce_auth_cfg()
126 if (IS_SHA1(flags) || IS_SHA256(flags)) in qce_auth_cfg()
128 else if (IS_SHA1_HMAC(flags) || IS_SHA256_HMAC(flags)) in qce_auth_cfg()
130 else if (IS_CCM(flags)) in qce_auth_cfg()
132 else if (IS_CMAC(flags)) in qce_auth_cfg()
135 if (IS_SHA(flags) || IS_SHA_HMAC(flags)) in qce_auth_cfg()
138 if (IS_CCM(flags)) in qce_auth_cfg()
166 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
174 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen, digestsize); in qce_setup_regs_ahash()
177 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
185 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash()
193 iv_words = (IS_SHA1(rctx->flags) || IS_SHA1_HMAC(rctx->flags)) ? 5 : 8; in qce_setup_regs_ahash()
202 auth_cfg = qce_auth_cfg(rctx->flags, 0, digestsize); in qce_setup_regs_ahash()
232 static u32 qce_encr_cfg(unsigned long flags, u32 aes_key_size) in qce_encr_cfg() argument
236 if (IS_AES(flags)) { in qce_encr_cfg()
243 if (IS_AES(flags)) in qce_encr_cfg()
245 else if (IS_DES(flags) || IS_3DES(flags)) in qce_encr_cfg()
248 if (IS_DES(flags)) in qce_encr_cfg()
251 if (IS_3DES(flags)) in qce_encr_cfg()
254 switch (flags & QCE_MODE_MASK) { in qce_encr_cfg()
326 unsigned long flags = rctx->flags; in qce_setup_regs_skcipher() local
330 if (IS_XTS(flags)) in qce_setup_regs_skcipher()
340 encr_cfg = qce_encr_cfg(flags, keylen); in qce_setup_regs_skcipher()
342 if (IS_DES(flags)) { in qce_setup_regs_skcipher()
345 } else if (IS_3DES(flags)) { in qce_setup_regs_skcipher()
348 } else if (IS_AES(flags)) { in qce_setup_regs_skcipher()
349 if (IS_XTS(flags)) in qce_setup_regs_skcipher()
359 if (!IS_ECB(flags)) { in qce_setup_regs_skcipher()
360 if (IS_XTS(flags)) in qce_setup_regs_skcipher()
368 if (IS_ENCRYPT(flags)) in qce_setup_regs_skcipher()
375 if (IS_CTR(flags)) { in qce_setup_regs_skcipher()
437 unsigned long flags = rctx->flags; in qce_setup_regs_aead() local
451 if (IS_CCM(rctx->flags)) { in qce_setup_regs_aead()
473 if (IS_SHA_HMAC(rctx->flags)) { in qce_setup_regs_aead()
475 if (IS_SHA1_HMAC(rctx->flags)) { in qce_setup_regs_aead()
478 } else if (IS_SHA256_HMAC(rctx->flags)) { in qce_setup_regs_aead()
484 } else if (IS_CCM(rctx->flags)) { in qce_setup_regs_aead()
491 encr_cfg = qce_encr_cfg(flags, enc_keylen); in qce_setup_regs_aead()
492 if (IS_ENCRYPT(flags)) in qce_setup_regs_aead()
497 auth_cfg = qce_auth_cfg(rctx->flags, auth_keylen, ctx->authsize); in qce_setup_regs_aead()
500 if (IS_ENCRYPT(flags)) { in qce_setup_regs_aead()
501 if (IS_CCM(rctx->flags)) in qce_setup_regs_aead()
506 if (IS_CCM(rctx->flags)) in qce_setup_regs_aead()
516 if (IS_CCM(rctx->flags) && IS_DECRYPT(rctx->flags)) in qce_setup_regs_aead()
527 if (IS_CCM(rctx->flags) && IS_DECRYPT(rctx->flags)) in qce_setup_regs_aead()
537 qce_crypto_go(qce, !IS_CCM(flags)); in qce_setup_regs_aead()