]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make random_add_randomness() debug print less verbose
authorJouni Malinen <j@w1.fi>
Sun, 8 Apr 2012 08:34:54 +0000 (11:34 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 8 Apr 2012 08:34:54 +0000 (11:34 +0300)
Mark the debug print excessive and print it only in case the entropy
collection is used since this function can get called pretty frequently.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/crypto/random.c

index 55e9391307c1672dcdfb35e625cf99b7ec9e3eb9..d85c3e66e6bc271fefcc67fb34fc68f10ab318e5 100644 (file)
@@ -128,8 +128,6 @@ void random_add_randomness(const void *buf, size_t len)
        static unsigned int count = 0;
 
        count++;
-       wpa_printf(MSG_MSGDUMP, "Add randomness: count=%u entropy=%u",
-                  count, entropy);
        if (entropy > MIN_COLLECT_ENTROPY && (count & 0x3ff) != 0) {
                /*
                 * No need to add more entropy at this point, so save CPU and
@@ -137,6 +135,8 @@ void random_add_randomness(const void *buf, size_t len)
                 */
                return;
        }
+       wpa_printf(MSG_EXCESSIVE, "Add randomness: count=%u entropy=%u",
+                  count, entropy);
 
        os_get_time(&t);
        wpa_hexdump_key(MSG_EXCESSIVE, "random pool",