--- a/src/crypto/random.c
+++ b/src/crypto/random.c
-@@ -32,6 +32,8 @@
+@@ -33,6 +33,8 @@
#include "sha1.h"
#include "random.h"
#define POOL_WORDS 32
#define POOL_WORDS_MASK (POOL_WORDS - 1)
#define POOL_TAP1 26
-@@ -42,6 +44,8 @@
+@@ -43,6 +45,8 @@
#define EXTRACT_LEN 16
#define MIN_READY_MARK 2
static u32 pool[POOL_WORDS];
static unsigned int input_rotate = 0;
static unsigned int pool_pos = 0;
-@@ -122,7 +126,7 @@ static void random_extract(u8 *out)
+@@ -123,7 +127,7 @@ static void random_extract(u8 *out)
}
{
struct os_time t;
static unsigned int count = 0;
-@@ -191,16 +195,22 @@ int random_get_bytes(void *buf, size_t l
+@@ -213,16 +217,22 @@ int random_get_bytes(void *buf, size_t l
int random_pool_ready(void)
{
#ifdef __linux__
/*
* Try to fetch some more data from the kernel high quality
-@@ -235,6 +245,7 @@ int random_pool_ready(void)
+@@ -257,6 +267,7 @@ int random_pool_ready(void)
if (dummy_key_avail == sizeof(dummy_key)) {
if (own_pool_ready < MIN_READY_MARK)
own_pool_ready = MIN_READY_MARK;
random_write_entropy();
return 1;
}
-@@ -247,6 +258,7 @@ int random_pool_ready(void)
+@@ -269,6 +280,7 @@ int random_pool_ready(void)
total_collected + 10 * own_pool_ready > MIN_COLLECT_ENTROPY) {
wpa_printf(MSG_INFO, "random: Allow operation to proceed "
"based on internal entropy");
return 1;
}
-@@ -262,10 +274,16 @@ int random_pool_ready(void)
+@@ -284,10 +296,16 @@ int random_pool_ready(void)
void random_mark_pool_ready(void)
{
}
-@@ -422,3 +440,22 @@ void random_deinit(void)
+@@ -444,3 +462,22 @@ void random_deinit(void)
os_free(random_entropy_file);
random_entropy_file = NULL;
}
+}
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
-@@ -1161,9 +1161,8 @@ endif
+@@ -1217,9 +1217,8 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
CFLAGS += -DCONFIG_NO_RANDOM_POOL
ifeq ($(CONFIG_CTRL_IFACE), y)
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
-@@ -1139,9 +1139,8 @@ endif
+@@ -1161,9 +1161,8 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
ifeq ($(CONFIG_CTRL_IFACE), y)
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
-@@ -724,11 +724,11 @@ endif
+@@ -748,11 +748,11 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
else
L_CFLAGS += -DRADIUS_SERVER
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
-@@ -719,12 +719,12 @@ endif
+@@ -755,12 +755,12 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
CFLAGS += -DCONFIG_NO_RANDOM_POOL
else