Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361893
b: refs/heads/master
c: 246bbed
h: refs/heads/master
i:
  361891: 8901849
v: v3
  • Loading branch information
Horia Geanta authored and Herbert Xu committed Mar 21, 2013
1 parent fb48d30 commit 967059d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 991155bacb91c988c45586525771758ddadd44ce
refs/heads/master: 246bbedb9aaf27e2207501d93a869023a439fce5
27 changes: 2 additions & 25 deletions trunk/drivers/crypto/caam/caamalg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1650,11 +1650,7 @@ struct caam_alg_template {
};

static struct caam_alg_template driver_algs[] = {
/*
* single-pass ipsec_esp descriptor
* authencesn(*,*) is also registered, although not present
* explicitly here.
*/
/* single-pass ipsec_esp descriptor */
{
.name = "authenc(hmac(md5),cbc(aes))",
.driver_name = "authenc-hmac-md5-cbc-aes-caam",
Expand Down Expand Up @@ -2217,9 +2213,7 @@ static int __init caam_algapi_init(void)
for (i = 0; i < ARRAY_SIZE(driver_algs); i++) {
/* TODO: check if h/w supports alg */
struct caam_crypto_alg *t_alg;
bool done = false;

authencesn:
t_alg = caam_alg_alloc(ctrldev, &driver_algs[i]);
if (IS_ERR(t_alg)) {
err = PTR_ERR(t_alg);
Expand All @@ -2233,25 +2227,8 @@ static int __init caam_algapi_init(void)
dev_warn(ctrldev, "%s alg registration failed\n",
t_alg->crypto_alg.cra_driver_name);
kfree(t_alg);
} else {
} else
list_add_tail(&t_alg->entry, &priv->alg_list);
if (driver_algs[i].type == CRYPTO_ALG_TYPE_AEAD &&
!memcmp(driver_algs[i].name, "authenc", 7) &&
!done) {
char *name;

name = driver_algs[i].name;
memmove(name + 10, name + 7, strlen(name) - 7);
memcpy(name + 7, "esn", 3);

name = driver_algs[i].driver_name;
memmove(name + 10, name + 7, strlen(name) - 7);
memcpy(name + 7, "esn", 3);

done = true;
goto authencesn;
}
}
}
if (!list_empty(&priv->alg_list))
dev_info(ctrldev, "%s algorithms registered in /proc/crypto\n",
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/crypto/caam/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/types.h>
#include <linux/debugfs.h>
#include <linux/circ_buf.h>
#include <linux/string.h>
#include <net/xfrm.h>

#include <crypto/algapi.h>
Expand Down

0 comments on commit 967059d

Please sign in to comment.