summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/rng.c
diff options
context:
space:
mode:
authorMiaoqing Pan <miaoqing@codeaurora.org>2016-08-09 15:02:26 +0800
committerKalle Valo <kvalo@qca.qualcomm.com>2016-10-13 17:22:44 +0300
commite463139a726276cd2995ed21c809504d6470f061 (patch)
treed623c6e28ab03759181614f8136dcfee98004e5d /drivers/net/wireless/ath/ath9k/rng.c
parentebaa4b1620bf69f2bc43cb45ea85fbafdaec23c3 (diff)
downloadblackbird-op-linux-e463139a726276cd2995ed21c809504d6470f061.tar.gz
blackbird-op-linux-e463139a726276cd2995ed21c809504d6470f061.zip
ath9k: change entropy formula for easier understanding
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/rng.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rng.c b/drivers/net/wireless/ath/ath9k/rng.c
index d38e50f96db7..568b1c6c2b2b 100644
--- a/drivers/net/wireless/ath/ath9k/rng.c
+++ b/drivers/net/wireless/ath/ath9k/rng.c
@@ -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)
{
OpenPOWER on IntegriCloud