[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB26193E8CC8B770D3569A5DEDE42EA@DM6PR12MB2619.namprd12.prod.outlook.com>
Date: Tue, 4 Jul 2023 03:12:32 +0000
From: "Quan, Evan" <Evan.Quan@....com>
To: Andrew Lunn <andrew@...n.ch>
CC: "rafael@...nel.org" <rafael@...nel.org>,
"lenb@...nel.org" <lenb@...nel.org>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Koenig, Christian" <Christian.Koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
"airlied@...il.com" <airlied@...il.com>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"johannes@...solutions.net" <johannes@...solutions.net>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"Limonciello, Mario" <Mario.Limonciello@....com>,
"mdaenzer@...hat.com" <mdaenzer@...hat.com>,
"maarten.lankhorst@...ux.intel.com"
<maarten.lankhorst@...ux.intel.com>,
"tzimmermann@...e.de" <tzimmermann@...e.de>,
"hdegoede@...hat.com" <hdegoede@...hat.com>,
"jingyuwang_vip@....com" <jingyuwang_vip@....com>,
"Lazar, Lijo" <Lijo.Lazar@....com>,
"jim.cromie@...il.com" <jim.cromie@...il.com>,
"bellosilicio@...il.com" <bellosilicio@...il.com>,
"andrealmeid@...lia.com" <andrealmeid@...lia.com>,
"trix@...hat.com" <trix@...hat.com>,
"jsg@....id.au" <jsg@....id.au>, "arnd@...db.de" <arnd@...db.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH V5 4/9] wifi: mac80211: Add support for ACPI WBRF
[AMD Official Use Only - General]
Hi Andrew,
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Saturday, July 1, 2023 9:02 AM
> To: Quan, Evan <Evan.Quan@....com>
> Cc: rafael@...nel.org; lenb@...nel.org; Deucher, Alexander
> <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; Pan, Xinhui <Xinhui.Pan@....com>;
> airlied@...il.com; daniel@...ll.ch; johannes@...solutions.net;
> davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; Limonciello, Mario <Mario.Limonciello@....com>;
> mdaenzer@...hat.com; maarten.lankhorst@...ux.intel.com;
> tzimmermann@...e.de; hdegoede@...hat.com; jingyuwang_vip@....com;
> Lazar, Lijo <Lijo.Lazar@....com>; jim.cromie@...il.com;
> bellosilicio@...il.com; andrealmeid@...lia.com; trix@...hat.com;
> jsg@....id.au; arnd@...db.de; linux-kernel@...r.kernel.org; linux-
> acpi@...r.kernel.org; amd-gfx@...ts.freedesktop.org; dri-
> devel@...ts.freedesktop.org; linux-wireless@...r.kernel.org;
> netdev@...r.kernel.org
> Subject: Re: [PATCH V5 4/9] wifi: mac80211: Add support for ACPI WBRF
>
> > +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);
> > +
> > + *start = center_freq - bandwidth / 2;
> > + *end = center_freq + bandwidth / 2;
> > +
> > + /* Frequency in HZ is expected */
> > + *start = KHZ_TO_HZ(*start);
> > + *end = KHZ_TO_HZ(*end);
> > +}
>
> This seems pretty generic, so maybe it should be moved into the shared code?
> It can then become a NOP when the functionality if disabled.
The shared code you mean is some place around mac80211?
Actually, there are two similar variants existed already: cfg80211_get_start_freq and cfg80211_get_end_freq.
The outputs of them are really what most mac80211 logics care.
The new API here is unlikely to be shared by other mac80211 part.
So, I suppose placing it here(only in wbrf.c) seems proper.
How do you think?
Evan
>
> Andrew
Powered by blists - more mailing lists