crypto: jitter - Allow configuration of oversampling rate
[linux-2.6-block.git] / crypto / jitterentropy-kcapi.c
index a8e7bbd28c6eb4a1a4a9e0d0704707e58f8f2405..0c6752221451bf41ba1b443eb0c128f1c1ff50d4 100644 (file)
@@ -256,7 +256,9 @@ static int jent_kcapi_init(struct crypto_tfm *tfm)
        crypto_shash_init(sdesc);
        rng->sdesc = sdesc;
 
-       rng->entropy_collector = jent_entropy_collector_alloc(0, 0, sdesc);
+       rng->entropy_collector =
+               jent_entropy_collector_alloc(CONFIG_CRYPTO_JITTERENTROPY_OSR, 0,
+                                            sdesc);
        if (!rng->entropy_collector) {
                ret = -ENOMEM;
                goto err;
@@ -345,7 +347,7 @@ static int __init jent_mod_init(void)
 
        desc->tfm = tfm;
        crypto_shash_init(desc);
-       ret = jent_entropy_init(0, 0, desc);
+       ret = jent_entropy_init(CONFIG_CRYPTO_JITTERENTROPY_OSR, 0, desc);
        shash_desc_zero(desc);
        crypto_free_shash(tfm);
        if (ret) {