2022-02-16 04:52:18

by Rui Salvaterra

[permalink] [raw]
Subject: Re: [PATCH] ath9k: use hw_random API instead of directly dumping into random.c

Hi, Jason,

On Tue, 15 Feb 2022 at 22:44, Jason A. Donenfeld <[email protected]> wrote:
>
> Hardware random number generators are supposed to use the hw_random
> framework. This commit turns ath9k's kthread-based design into a proper
> hw_random driver.
>
> This compiles, but I have no hardware or other ability to determine
> whether it works. I'll leave further development up to the ath9k
> and hw_random maintainers.
>
> Cc: Toke Høiland-Jørgensen <[email protected]>
> Cc: Kalle Valo <[email protected]>
> Cc: Dominik Brodowski <[email protected]>
> Cc: Herbert Xu <[email protected]>
> Signed-off-by: Jason A. Donenfeld <[email protected]>

[patch snipped]

On my laptop, with a…

02:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network
Adapter (rev 01)

… I have the following…

rui@arrandale:~$ cat /sys/devices/virtual/misc/hw_random/rng_available
ath9k
rui@arrandale:~$ cat /sys/devices/virtual/misc/hw_random/rng_current
ath9k
rui@arrandale:~$

… and sure enough, /dev/hwrng is created and outputs a stream of
random data, as expected. I haven't done any serious randomness
quality testing, but it should be the same as the one produced by the
original code. I consider this patch thus

Tested-by: Rui Salvaterra <[email protected]>

Thanks,
Rui