]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ath9k: change entropy formula for easier understanding
authorMiaoqing Pan <miaoqing@codeaurora.org>
Tue, 9 Aug 2016 07:02:26 +0000 (15:02 +0800)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 13 Oct 2016 14:22:44 +0000 (17:22 +0300)
The quality of ADC entropy is 10 bits of min-entropy for
a 32-bit value, change '(((x) * 8 * 320) >> 10)' to
'(((x) * 8 * 10) >> 5)' for easier understanding.

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/rng.c

index d38e50f96db77b52eeab1238093bffea45ec6b5e..568b1c6c2b2b9fafcd4ee4521856285b1665b868 100644 (file)
@@ -22,7 +22,7 @@
 #include "ar9003_phy.h"
 
 #define ATH9K_RNG_BUF_SIZE     320
-#define ATH9K_RNG_ENTROPY(x)   (((x) * 8 * 320) >> 10) /* quality: 320/1024 */
+#define ATH9K_RNG_ENTROPY(x)   (((x) * 8 * 10) >> 5) /* quality: 10/32 */
 
 static int ath9k_rng_data_read(struct ath_softc *sc, u32 *buf, u32 buf_size)
 {