Lines Matching full:flags

102 static u32 qce_auth_cfg(unsigned long flags, u32 key_size, u32 auth_size)  in qce_auth_cfg()  argument
106 if (IS_CCM(flags) || IS_CMAC(flags)) in qce_auth_cfg()
111 if (IS_CCM(flags) || IS_CMAC(flags)) { in qce_auth_cfg()
118 if (IS_SHA1(flags) || IS_SHA1_HMAC(flags)) in qce_auth_cfg()
120 else if (IS_SHA256(flags) || IS_SHA256_HMAC(flags)) in qce_auth_cfg()
122 else if (IS_CMAC(flags)) in qce_auth_cfg()
124 else if (IS_CCM(flags)) in qce_auth_cfg()
127 if (IS_SHA1(flags) || IS_SHA256(flags)) in qce_auth_cfg()
129 else if (IS_SHA1_HMAC(flags) || IS_SHA256_HMAC(flags)) in qce_auth_cfg()
131 else if (IS_CCM(flags)) in qce_auth_cfg()
133 else if (IS_CMAC(flags)) in qce_auth_cfg()
136 if (IS_SHA(flags) || IS_SHA_HMAC(flags)) in qce_auth_cfg()
139 if (IS_CCM(flags)) in qce_auth_cfg()
167 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
175 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen, digestsize); in qce_setup_regs_ahash()
178 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
186 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash()
194 iv_words = (IS_SHA1(rctx->flags) || IS_SHA1_HMAC(rctx->flags)) ? 5 : 8; in qce_setup_regs_ahash()
203 auth_cfg = qce_auth_cfg(rctx->flags, 0, digestsize); in qce_setup_regs_ahash()
233 static u32 qce_encr_cfg(unsigned long flags, u32 aes_key_size) in qce_encr_cfg() argument
237 if (IS_AES(flags)) { in qce_encr_cfg()
244 if (IS_AES(flags)) in qce_encr_cfg()
246 else if (IS_DES(flags) || IS_3DES(flags)) in qce_encr_cfg()
249 if (IS_DES(flags)) in qce_encr_cfg()
252 if (IS_3DES(flags)) in qce_encr_cfg()
255 switch (flags & QCE_MODE_MASK) { in qce_encr_cfg()
327 unsigned long flags = rctx->flags; in qce_setup_regs_skcipher() local
331 if (IS_XTS(flags)) in qce_setup_regs_skcipher()
341 encr_cfg = qce_encr_cfg(flags, keylen); in qce_setup_regs_skcipher()
343 if (IS_DES(flags)) { in qce_setup_regs_skcipher()
346 } else if (IS_3DES(flags)) { in qce_setup_regs_skcipher()
349 } else if (IS_AES(flags)) { in qce_setup_regs_skcipher()
350 if (IS_XTS(flags)) in qce_setup_regs_skcipher()
360 if (!IS_ECB(flags)) { in qce_setup_regs_skcipher()
361 if (IS_XTS(flags)) in qce_setup_regs_skcipher()
369 if (IS_ENCRYPT(flags)) in qce_setup_regs_skcipher()
376 if (IS_CTR(flags)) { in qce_setup_regs_skcipher()
438 unsigned long flags = rctx->flags; in qce_setup_regs_aead() local
452 if (IS_CCM(rctx->flags)) { in qce_setup_regs_aead()
474 if (IS_SHA_HMAC(rctx->flags)) { in qce_setup_regs_aead()
476 if (IS_SHA1_HMAC(rctx->flags)) { in qce_setup_regs_aead()
479 } else if (IS_SHA256_HMAC(rctx->flags)) { in qce_setup_regs_aead()
485 } else if (IS_CCM(rctx->flags)) { in qce_setup_regs_aead()
492 encr_cfg = qce_encr_cfg(flags, enc_keylen); in qce_setup_regs_aead()
493 if (IS_ENCRYPT(flags)) in qce_setup_regs_aead()
498 auth_cfg = qce_auth_cfg(rctx->flags, auth_keylen, ctx->authsize); in qce_setup_regs_aead()
501 if (IS_ENCRYPT(flags)) { in qce_setup_regs_aead()
502 if (IS_CCM(rctx->flags)) in qce_setup_regs_aead()
507 if (IS_CCM(rctx->flags)) in qce_setup_regs_aead()
517 if (IS_CCM(rctx->flags) && IS_DECRYPT(rctx->flags)) in qce_setup_regs_aead()
528 if (IS_CCM(rctx->flags) && IS_DECRYPT(rctx->flags)) in qce_setup_regs_aead()
538 qce_crypto_go(qce, !IS_CCM(flags)); in qce_setup_regs_aead()