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: <3868dbae-79e5-470d-a144-0884659206d9@lunn.ch>
Date: Sat, 1 Jul 2023 03:02:16 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Evan Quan <evan.quan@....com>
Cc: rafael@...nel.org, lenb@...nel.org, Alexander.Deucher@....com,
	Christian.Koenig@....com, Xinhui.Pan@....com, airlied@...il.com,
	daniel@...ll.ch, johannes@...solutions.net, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	Mario.Limonciello@....com, mdaenzer@...hat.com,
	maarten.lankhorst@...ux.intel.com, tzimmermann@...e.de,
	hdegoede@...hat.com, jingyuwang_vip@....com, 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.

      Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ