* [PATCH] wifi: ath9k: do not submit zero bytes to the entropy pool
@ 2025-01-23 14:10 Dmitry Antipov
2025-01-27 13:21 ` Toke Høiland-Jørgensen
2025-01-29 17:03 ` Jeff Johnson
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Antipov @ 2025-01-23 14:10 UTC (permalink / raw)
To: Toke Høiland-Jørgensen
Cc: Kalle Valo, linux-wireless, Dmitry Antipov
In 'ath_cmn_process_fft()', it doesn't make too much sense to
add zero bytes in attempt to improve randomness. So swap calls
to 'memset()' and 'add_device_randomness()' to feed the pool
with actual FFT results rather than zeroes. Compile tested only.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
drivers/net/wireless/ath/ath9k/common-spectral.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index 628eeec4b82f..300d178830ad 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -628,12 +628,12 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
else
RX_STAT_INC(sc, rx_spectral_sample_err);
- memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN);
-
/* Mix the received bins to the /dev/random
* pool
*/
add_device_randomness(sample_buf, num_bins);
+
+ memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN);
}
/* Process a normal frame */
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ath9k: do not submit zero bytes to the entropy pool
2025-01-23 14:10 [PATCH] wifi: ath9k: do not submit zero bytes to the entropy pool Dmitry Antipov
@ 2025-01-27 13:21 ` Toke Høiland-Jørgensen
2025-01-29 17:03 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2025-01-27 13:21 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Kalle Valo, linux-wireless, Dmitry Antipov
Dmitry Antipov <dmantipov@yandex.ru> writes:
> In 'ath_cmn_process_fft()', it doesn't make too much sense to
> add zero bytes in attempt to improve randomness. So swap calls
> to 'memset()' and 'add_device_randomness()' to feed the pool
> with actual FFT results rather than zeroes. Compile tested only.
>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
This should probably have a Fixes tag:
Fixes: 2aa56cca3571 ("ath9k: Mix the received FFT bins to the random pool")
With that:
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ath9k: do not submit zero bytes to the entropy pool
2025-01-23 14:10 [PATCH] wifi: ath9k: do not submit zero bytes to the entropy pool Dmitry Antipov
2025-01-27 13:21 ` Toke Høiland-Jørgensen
@ 2025-01-29 17:03 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2025-01-29 17:03 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, Dmitry Antipov
Cc: Kalle Valo, linux-wireless
On Thu, 23 Jan 2025 17:10:58 +0300, Dmitry Antipov wrote:
> In 'ath_cmn_process_fft()', it doesn't make too much sense to
> add zero bytes in attempt to improve randomness. So swap calls
> to 'memset()' and 'add_device_randomness()' to feed the pool
> with actual FFT results rather than zeroes. Compile tested only.
>
>
Applied, thanks!
[1/1] wifi: ath9k: do not submit zero bytes to the entropy pool
commit: 0f2b59a98027a781eee1cbd48c7c8fdf87cb73f6
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-29 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 14:10 [PATCH] wifi: ath9k: do not submit zero bytes to the entropy pool Dmitry Antipov
2025-01-27 13:21 ` Toke Høiland-Jørgensen
2025-01-29 17:03 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).