m_vaddr = (uint8_t *)m_vaddr + size;
m_dma += size;
- if (hash_type == GMAC_TYPE)
- encr_data_len = 0;
-
if (unlikely(!(flags & VALID_IV_BUF))) {
iv_len = 0;
iv_offset = ENCR_IV_OFFSET(d_offs);
opcode.s.major = CPT_MAJOR_OP_FC;
opcode.s.minor = 0;
+ if (hash_type == GMAC_TYPE) {
+ encr_offset = 0;
+ encr_data_len = 0;
+ }
+
auth_dlen = auth_offset + auth_data_len;
enc_dlen = encr_data_len + encr_offset;
if (unlikely(encr_data_len & 0xf)) {
enc_dlen = ROUNDUP16(encr_data_len) + encr_offset;
}
- if (unlikely(hash_type == GMAC_TYPE)) {
- encr_offset = auth_dlen;
- enc_dlen = 0;
- }
-
if (unlikely(auth_dlen > enc_dlen)) {
inputlen = auth_dlen;
outputlen = auth_dlen + mac_len;
hash_type = cpt_ctx->hash_type;
mac_len = cpt_ctx->mac_len;
- if (hash_type == GMAC_TYPE)
- encr_data_len = 0;
-
if (unlikely(!(flags & VALID_IV_BUF))) {
iv_len = 0;
iv_offset = ENCR_IV_OFFSET(d_offs);
opcode.s.major = CPT_MAJOR_OP_FC;
opcode.s.minor = 1;
+ if (hash_type == GMAC_TYPE) {
+ encr_offset = 0;
+ encr_data_len = 0;
+ }
+
enc_dlen = encr_offset + encr_data_len;
auth_dlen = auth_offset + auth_data_len;
outputlen = enc_dlen;
}
- if (hash_type == GMAC_TYPE)
- encr_offset = inputlen;
-
vq_cmd_w0.u64 = 0;
vq_cmd_w0.s.param1 = encr_data_len;
vq_cmd_w0.s.param2 = auth_data_len;