From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B66FC4332F for ; Wed, 16 Feb 2022 07:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbiBPHcg (ORCPT ); Wed, 16 Feb 2022 02:32:36 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:52306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbiBPHce (ORCPT ); Wed, 16 Feb 2022 02:32:34 -0500 X-Greylist: delayed 596 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 15 Feb 2022 23:32:21 PST Received: from isilmar-4.linta.de (isilmar-4.linta.de [136.243.71.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9B1012D907; Tue, 15 Feb 2022 23:32:20 -0800 (PST) X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES Received: from owl.dominikbrodowski.net (owl.brodo.linta [10.2.0.111]) by isilmar-4.linta.de (Postfix) with ESMTPSA id E0BC5201402; Wed, 16 Feb 2022 07:15:43 +0000 (UTC) Received: by owl.dominikbrodowski.net (Postfix, from userid 1000) id 6786F806D0; Wed, 16 Feb 2022 08:11:05 +0100 (CET) Date: Wed, 16 Feb 2022 08:11:05 +0100 From: Dominik Brodowski To: "Jason A. Donenfeld" Cc: Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , miaoqing@codeaurora.org, rsalvaterra@gmail.com, Jason Cooper , "Sepehrdad, Pouyan" , ath9k-devel , "linux-wireless@vger.kernel.org" , Kalle Valo , Linux Crypto Mailing List , Herbert Xu , LKML , Netdev Subject: Re: [PATCH] ath9k: use hw_random API instead of directly dumping into random.c Message-ID: References: <20220215162812.195716-1-Jason@zx2c4.com> <87o8374sx3.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Wed, Feb 16, 2022 at 12:52:15AM +0100 schrieb Jason A. Donenfeld: > On 2/16/22, Toke Høiland-Jørgensen wrote: > >> @@ -22,9 +22,6 @@ > >> #include "hw.h" > >> #include "ar9003_phy.h" > >> > >> -#define ATH9K_RNG_BUF_SIZE 320 > >> -#define ATH9K_RNG_ENTROPY(x) (((x) * 8 * 10) >> 5) /* quality: 10/32 */ > > > > So this comment says "quality: 10/32" but below you're setting "quality" > > as 320. No idea what the units are supposed to be, but is this right? > > I think the unit is supposed to be how many entropic bits there are > out of 1024 bits? These types of estimates are always BS, so keeping > it on the lower end as before seemed right. Herbert can jump in here > if he has a better idea; that's his jig. 10/32 = 320/1024, so that change is correct. Dominik