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 30C23C433FE for ; Tue, 15 Feb 2022 22:55:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244656AbiBOWzm (ORCPT ); Tue, 15 Feb 2022 17:55:42 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235253AbiBOWzk (ORCPT ); Tue, 15 Feb 2022 17:55:40 -0500 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 010B890FCD; Tue, 15 Feb 2022 14:55:29 -0800 (PST) Received: by mail-vs1-xe31.google.com with SMTP id g21so495235vsp.6; Tue, 15 Feb 2022 14:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=KljjfGaV0qNt4Ev1SWfuB6ILy2vnkwj3ke0c4tgXkDM=; b=mbMo0Q4i+HlaNWhZT8LNGMSW0FdRYfBAJLjE0PFzMRGRJMdjKbxitQn7gU/vWHJ/q6 HvfVRRq974rn1gScL5uXeVg/cZA9VLS+gVSXcEH0MufIw0Edw6MfBbmocdtGf2FvyPle N/6zSvrIUlLSlwNS7sU88ZX/JG4K5rprCbAiRuPxIc2qihmi0LQa747PkghiL+Eb1NG/ SP4m16K9wANZQuk62vp0PkOGuM1K6tR4vMO91QNWtyKgZwU/muop4jzJdRV+MWFEoOMk ZPWSwpqYhPQeJNb7zIdWdQkZ17dnVC6cCBQI8AT0qOznenonzJgv90icdxeFDlwA4+Ip FkeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=KljjfGaV0qNt4Ev1SWfuB6ILy2vnkwj3ke0c4tgXkDM=; b=4jKXNTQX2/WEIKj8PYo6CPY9lxpHwqWenuN3XdNnyOoC8ptSMuKMv21q72AmfYpUC0 6IeXP+ynmP5dmQ3JxI2CS0vndMLjJXK92on3jjk9p0QzumkmhZsI3l5Psn2VDxuqPrK3 8OhSj7jJW4mzsk5Gmgt/nVVlwQSxiv7NxkBIS7G05Cm1bm+6mMpxyJjtPMe0wPyUswma bQbSbEwbZ9c10Oul6e0hBupnp0JI7vbwhBjqMAyaT14zMEQWqG7z4qgbYFvsZRhpIGJn OxQ4wgO/D2v/wOceBqrbcxVfv43D6aFKOUfW7ad1wZbTn+Mk1bidLaQ8RK9YCT6NKTto ellg== X-Gm-Message-State: AOAM532CRUcS6xuPB3I3AM1K5IYy8B5ryD/Hd/ior/wWjBdeagFVlu5b s2sIF49PU9h+Nf5cMOxwYQFyZxHIqod1LQYNOUIIbvCMiJFV X-Google-Smtp-Source: ABdhPJybrisSKT22sdMBiVzA1X9BxupYuQBcoJrjdciqXqEyZPvh8/tXEC6HfbTugPH1cYBwKz7hnpp4xQ4CAhBglSY= X-Received: by 2002:a05:6102:c11:: with SMTP id x17mr452025vss.4.1644965729117; Tue, 15 Feb 2022 14:55:29 -0800 (PST) MIME-Version: 1.0 References: <20220215162812.195716-1-Jason@zx2c4.com> In-Reply-To: <20220215162812.195716-1-Jason@zx2c4.com> From: Rui Salvaterra Date: Tue, 15 Feb 2022 22:55:18 +0000 Message-ID: Subject: Re: [PATCH] ath9k: use hw_random API instead of directly dumping into random.c To: "Jason A. Donenfeld" Cc: miaoqing@codeaurora.org, Jason Cooper , "Sepehrdad, Pouyan" , ath9k-devel , "linux-wireless@vger.kernel.org" , Kalle Valo , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Dominik Brodowski , Linux Crypto Mailing List , Herbert Xu , LKML , Netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, Jason, On Tue, 15 Feb 2022 at 22:44, Jason A. Donenfeld wrote: > > Hardware random number generators are supposed to use the hw_random > framework. This commit turns ath9k's kthread-based design into a proper > hw_random driver. > > This compiles, but I have no hardware or other ability to determine > whether it works. I'll leave further development up to the ath9k > and hw_random maintainers. > > Cc: Toke H=C3=B8iland-J=C3=B8rgensen > Cc: Kalle Valo > Cc: Dominik Brodowski > Cc: Herbert Xu > Signed-off-by: Jason A. Donenfeld [patch snipped] On my laptop, with a=E2=80=A6 02:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01) =E2=80=A6 I have the following=E2=80=A6 rui@arrandale:~$ cat /sys/devices/virtual/misc/hw_random/rng_available ath9k rui@arrandale:~$ cat /sys/devices/virtual/misc/hw_random/rng_current ath9k rui@arrandale:~$ =E2=80=A6 and sure enough, /dev/hwrng is created and outputs a stream of random data, as expected. I haven't done any serious randomness quality testing, but it should be the same as the one produced by the original code. I consider this patch thus Tested-by: Rui Salvaterra Thanks, Rui