提交 e463139a 编写于 作者: M Miaoqing Pan 提交者: Kalle Valo

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: NMiaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 ebaa4b16
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "ar9003_phy.h" #include "ar9003_phy.h"
#define ATH9K_RNG_BUF_SIZE 320 #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) static int ath9k_rng_data_read(struct ath_softc *sc, u32 *buf, u32 buf_size)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册