hostapd: update to 2012-09-10
[openwrt/svn-archive/archive.git] / package / hostapd / patches / 500-random_pool_add_kernel.patch
index 5ef8f47ad12573785c9c487c6a021a527848874a..e54e881d8e73a4ee6c38272c41aad511f5df2f15 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/crypto/random.c
 +++ b/src/crypto/random.c
 --- a/src/crypto/random.c
 +++ b/src/crypto/random.c
-@@ -32,6 +32,8 @@
+@@ -33,6 +33,8 @@
  #include "sha1.h"
  #include "random.h"
  
  #include "sha1.h"
  #include "random.h"
  
@@ -9,7 +9,7 @@
  #define POOL_WORDS 32
  #define POOL_WORDS_MASK (POOL_WORDS - 1)
  #define POOL_TAP1 26
  #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
  
  #define EXTRACT_LEN 16
  #define MIN_READY_MARK 2
  
@@ -18,7 +18,7 @@
  static u32 pool[POOL_WORDS];
  static unsigned int input_rotate = 0;
  static unsigned int pool_pos = 0;
  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)
  }
  
  
  }
  
  
@@ -27,7 +27,7 @@
  {
        struct os_time t;
        static unsigned int count = 0;
  {
        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__
  int random_pool_ready(void)
  {
  #ifdef __linux__
@@ -51,7 +51,7 @@
  
        /*
         * Try to fetch some more data from the kernel high quality
  
        /*
         * 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;
        if (dummy_key_avail == sizeof(dummy_key)) {
                if (own_pool_ready < MIN_READY_MARK)
                        own_pool_ready = MIN_READY_MARK;
@@ -59,7 +59,7 @@
                random_write_entropy();
                return 1;
        }
                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");
            total_collected + 10 * own_pool_ready > MIN_COLLECT_ENTROPY) {
                wpa_printf(MSG_INFO, "random: Allow operation to proceed "
                           "based on internal entropy");
@@ -67,7 +67,7 @@
                return 1;
        }
  
                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)
  {
  
  void random_mark_pool_ready(void)
  {
@@ -84,7 +84,7 @@
  }
  
  
  }
  
  
-@@ -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;
  }
        os_free(random_entropy_file);
        random_entropy_file = NULL;
  }
 +}
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
 +}
 --- 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
  
  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
  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
  
  ifdef CONFIG_NO_RANDOM_POOL
  L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
  ifeq ($(CONFIG_CTRL_IFACE), y)
 --- a/hostapd/Android.mk
 +++ b/hostapd/Android.mk
  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
  ifdef CONFIG_NO_RANDOM_POOL
  L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
  else
  L_CFLAGS += -DRADIUS_SERVER
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
  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
  ifdef CONFIG_NO_RANDOM_POOL
  CFLAGS += -DCONFIG_NO_RANDOM_POOL
  else