Skip to content

Commit

Permalink
crypto: talitos - Avoid unnecessary decrypt check
Browse files Browse the repository at this point in the history
the ICV check bit only gets set in decrypt entry points

Signed-off-by: Kim Phillips <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
kimphill authored and herbertx committed Jun 2, 2009
1 parent 19bbbc6 commit 962a9c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/crypto/talitos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,7 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
} else {
sg_link_tbl_len = cryptlen;

if ((edesc->desc.hdr & DESC_HDR_MODE1_MDEU_CICV) &&
(edesc->desc.hdr & DESC_HDR_MODE0_ENCRYPT) == 0)
if (edesc->desc.hdr & DESC_HDR_MODE1_MDEU_CICV)
sg_link_tbl_len = cryptlen + authsize;

sg_count = sg_to_link_tbl(areq->src, sg_count, sg_link_tbl_len,
Expand Down

0 comments on commit 962a9c9

Please sign in to comment.