lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DM6PR12MB2619D03B8199D5943B724DB6E4E3A@DM6PR12MB2619.namprd12.prod.outlook.com>
Date: Fri, 25 Aug 2023 08:47:31 +0000
From: "Quan, Evan" <Evan.Quan@....com>
To: Johannes Berg <johannes@...solutions.net>, "gregkh@...uxfoundation.org"
	<gregkh@...uxfoundation.org>, "rafael@...nel.org" <rafael@...nel.org>,
	"lenb@...nel.org" <lenb@...nel.org>, "davem@...emloft.net"
	<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"Deucher, Alexander" <Alexander.Deucher@....com>, "andrew@...n.ch"
	<andrew@...n.ch>, "rdunlap@...radead.org" <rdunlap@...radead.org>,
	"quic_jjohnson@...cinc.com" <quic_jjohnson@...cinc.com>, "horms@...nel.org"
	<horms@...nel.org>
CC: "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"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>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Limonciello, Mario"
	<Mario.Limonciello@....com>
Subject: RE: [V9 4/9] wifi: mac80211: Add support for WBRF features

[AMD Official Use Only - General]

> -----Original Message-----
> From: Johannes Berg <johannes@...solutions.net>
> Sent: Monday, August 21, 2023 5:44 PM
> To: Quan, Evan <Evan.Quan@....com>; gregkh@...uxfoundation.org;
> rafael@...nel.org; lenb@...nel.org; davem@...emloft.net;
> edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com; Deucher,
> Alexander <Alexander.Deucher@....com>; andrew@...n.ch;
> rdunlap@...radead.org; quic_jjohnson@...cinc.com; horms@...nel.org
> Cc: linux-doc@...r.kernel.org; linux-kernel@...r.kernel.org; linux-
> acpi@...r.kernel.org; amd-gfx@...ts.freedesktop.org; linux-
> wireless@...r.kernel.org; netdev@...r.kernel.org; Limonciello, Mario
> <Mario.Limonciello@....com>
> Subject: Re: [V9 4/9] wifi: mac80211: Add support for WBRF features
>
> On Fri, 2023-08-18 at 11:26 +0800, Evan Quan wrote:
> > To support the WBRF mechanism, Wifi adapters utilized in the system
> > must register the frequencies in use(or unregister those frequencies
> > no longer
> > used) via the dedicated calls. So that, other drivers responding to
> > the frequencies can take proper actions to mitigate possible interference.
> >
> > Co-developed-by: Mario Limonciello <mario.limonciello@....com>
> > Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> > Co-developed-by: Evan Quan <evan.quan@....com>
> > Signed-off-by: Evan Quan <evan.quan@....com>
>
> From WiFi POV, this looks _almost_ fine to me.
>
> > +static void wbrf_get_ranges_from_chandef(struct cfg80211_chan_def
> *chandef,
> > +                                    struct wbrf_ranges_in *ranges_in) {
> > +   u64 start_freq1, end_freq1;
> > +   u64 start_freq2, end_freq2;
> > +   int bandwidth;
> > +
> > +   bandwidth = nl80211_chan_width_to_mhz(chandef->width);
> > +
> > +   get_chan_freq_boundary(chandef->center_freq1,
> > +                          bandwidth,
> > +                          &start_freq1,
> > +                          &end_freq1);
> > +
> > +   ranges_in->band_list[0].start = start_freq1;
> > +   ranges_in->band_list[0].end = end_freq1;
> > +
> > +   if (chandef->width == NL80211_CHAN_WIDTH_80P80) {
> > +           get_chan_freq_boundary(chandef->center_freq2,
> > +                                  bandwidth,
> > +                                  &start_freq2,
> > +                                  &end_freq2);
> > +
> > +           ranges_in->band_list[1].start = start_freq2;
> > +           ranges_in->band_list[1].end = end_freq2;
> > +   }
> > +}
>
> This has to setup ranges_in->num_of_ranges, no?
Yes, better to have that. I add this in V10.
> (Also no real good reason for num_of_ranges to be a u64, btw, since it can
> only go up to 11)
Mainly for data structure alignment. Since other members come with u64.
So, to make the data structure naturally aligned, 'num_of_ranges' also comes with u64.

Evan
>
> With that fixed, you can add
>
> Reviewed-by: Johannes Berg <johannes@...solutions.net>
>
> johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ