aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hw_random.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hw_random.h')
-rw-r--r--include/linux/hw_random.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index b4b0eef5fddf..914bb08cd738 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -29,6 +29,8 @@
29 * @read: New API. drivers can fill up to max bytes of data 29 * @read: New API. drivers can fill up to max bytes of data
30 * into the buffer. The buffer is aligned for any type. 30 * into the buffer. The buffer is aligned for any type.
31 * @priv: Private data, for use by the RNG driver. 31 * @priv: Private data, for use by the RNG driver.
32 * @quality: Estimation of true entropy in RNG's bitstream
33 * (per mill).
32 */ 34 */
33struct hwrng { 35struct hwrng {
34 const char *name; 36 const char *name;
@@ -38,6 +40,7 @@ struct hwrng {
38 int (*data_read)(struct hwrng *rng, u32 *data); 40 int (*data_read)(struct hwrng *rng, u32 *data);
39 int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); 41 int (*read)(struct hwrng *rng, void *data, size_t max, bool wait);
40 unsigned long priv; 42 unsigned long priv;
43 unsigned short quality;
41 44
42 /* internal. */ 45 /* internal. */
43 struct list_head list; 46 struct list_head list;
@@ -47,5 +50,7 @@ struct hwrng {
47extern int hwrng_register(struct hwrng *rng); 50extern int hwrng_register(struct hwrng *rng);
48/** Unregister a Hardware Random Number Generator driver. */ 51/** Unregister a Hardware Random Number Generator driver. */
49extern void hwrng_unregister(struct hwrng *rng); 52extern void hwrng_unregister(struct hwrng *rng);
53/** Feed random bits into the pool. */
54extern void add_hwgenerator_randomness(const char *buffer, size_t count, size_t entropy);
50 55
51#endif /* LINUX_HWRANDOM_H_ */ 56#endif /* LINUX_HWRANDOM_H_ */