From: Johannes Berg <johannes@sipsolutions.net>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Ma Jun <Jun.Ma2@amd.com>,
amd-gfx@lists.freedesktop.org, lenb@kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, alexander.deucher@amd.com, Lijo.Lazar@amd.com,
mario.limonciello@amd.com, Netdev <netdev@vger.kernel.org>,
linux-wireless@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org, platform-driver-x86@vger.kernel.org,
majun@amd.com, Evan Quan <quanliangl@hotmail.com>
Subject: Re: [Patch v13 4/9] wifi: mac80211: Add support for WBRF features
Date: Thu, 02 Nov 2023 14:04:42 +0100 [thread overview]
Message-ID: <d0d35561b80b873d9f78c9ca4ad304b6e0f16cb2.camel@sipsolutions.net> (raw)
In-Reply-To: <e42c5484-d66-e41a-8b2e-a1fa4495ce2@linux.intel.com>
On Thu, 2023-11-02 at 14:24 +0200, Ilpo Järvinen wrote:
> On Thu, 2 Nov 2023, Johannes Berg wrote:
> > On Thu, 2023-11-02 at 13:55 +0200, Ilpo Järvinen wrote:
> >
> > > > +static void get_chan_freq_boundary(u32 center_freq, u32 bandwidth, u64 *start, u64 *end)
> > > > +{
> > > > + bandwidth = MHZ_TO_KHZ(bandwidth);
> > > > + center_freq = MHZ_TO_KHZ(center_freq);
> > >
> > > Please use include/linux/units.h ones for these too.
> >
> > Now we're feature creeping though - this has existed for *years* in the
> > wireless stack with many instances? We can convert them over, I guess,
> > but not sure that makes much sense here - we'd want to add such macros
> > to units.h, but ... moving them can be independent of this patch?
>
> What new macros you're talking about?
Sorry, I got confused - for some reason I was pretty sure something here
was already being added to units.h in this patchset.
> Nothing new needs to be added
> as there's already KHZ_PER_MHZ so these would just be:
>
> bandwidth *= KHZ_PER_MHZ;
> center_freq *= KHZ_PER_MHZ;
Sure, and in this case that's probably pretty much equivalent. But
having a MHZ_TO_KHZ() macro isn't inherently *bad*, and I'm not sure
you're objection to it on anything other than "it's not defined in
units.h".
> Everything can of course be postponed by the argument that some
> subsystem specific mechanism has been there before the generic one
> but the end of that road won't be pretty... What I was trying to do
> here was to point out the new stuff introduced by this series into the
> direction of the generic thing.
I just think that the better course of action would be to eventually
move MHZ_TO_KHZ() to units.h ...
johannes
next prev parent reply other threads:[~2023-11-02 13:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 7:18 [Patch v13 0/9] Enable Wifi RFI interference mitigation feature support Ma Jun
2023-10-30 7:18 ` [Patch v13 1/9] Documentation/driver-api: Add document about WBRF mechanism Ma Jun
2023-11-20 11:59 ` Ilpo Järvinen
2023-11-22 8:36 ` Ma, Jun
2023-10-30 7:18 ` [Patch v13 2/9] platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature Ma Jun
2023-10-30 7:18 ` [Patch v13 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing Ma Jun
2023-10-30 7:18 ` [Patch v13 4/9] wifi: mac80211: Add support for WBRF features Ma Jun
2023-11-02 11:55 ` Ilpo Järvinen
2023-11-02 12:04 ` Johannes Berg
2023-11-02 12:24 ` Ilpo Järvinen
2023-11-02 13:04 ` Johannes Berg [this message]
2023-10-30 7:18 ` [Patch v13 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature Ma Jun
2023-10-30 7:18 ` [Patch v13 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature Ma Jun
2023-10-30 7:18 ` [Patch v13 7/9] drm/amd/pm: add flood detection for wbrf events Ma Jun
2023-10-30 7:18 ` [Patch v13 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Ma Jun
2023-10-30 7:18 ` [Patch v13 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7 Ma Jun
2023-11-10 5:31 ` [Patch v13 0/9] Enable Wifi RFI interference mitigation feature support Ma, Jun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0d35561b80b873d9f78c9ca4ad304b6e0f16cb2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Jun.Ma2@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kuba@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=majun@amd.com \
--cc=mario.limonciello@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=quanliangl@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®