[PATCH 1/2] hwrng: iproc-rng200 - Set the quality value

From: Åukasz Stelmach
Date: Thu May 14 2020 - 15:07:48 EST


The value has been estimaded by obtainig 1024 chunks of data 128 bytes
(1024 bits) each from the generator and finding chunk with minimal
entropy using the ent(1) tool. The value was 6.327820 bits of entropy
in each 8 bits of data.

Signed-off-by: Åukasz Stelmach <l.stelmach@xxxxxxxxxxx>
---
drivers/char/hw_random/iproc-rng200.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c
index 32d9fe61a225..7eb02a23f744 100644
--- a/drivers/char/hw_random/iproc-rng200.c
+++ b/drivers/char/hw_random/iproc-rng200.c
@@ -199,6 +199,7 @@ static int iproc_rng200_probe(struct platform_device *pdev)
priv->rng.read = iproc_rng200_read,
priv->rng.init = iproc_rng200_init,
priv->rng.cleanup = iproc_rng200_cleanup,
+ priv->rng.quality = 800,

/* Register driver */
ret = devm_hwrng_register(dev, &priv->rng);
--
2.25.0