mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Evan Quan <evan.quan@amd.com>,
	gregkh@linuxfoundation.org, rafael@kernel.org, lenb@kernel.org,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, alexander.deucher@amd.com, andrew@lunn.ch,
	rdunlap@infradead.org, quic_jjohnson@quicinc.com,
	horms@kernel.org
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [V9 4/9] wifi: mac80211: Add support for WBRF features
Date: Mon, 21 Aug 2023 11:44:29 +0200	[thread overview]
Message-ID: <e167e97797a90d3d6ea09840ac909325537d6034.camel@sipsolutions.net> (raw)
In-Reply-To: <20230818032619.3341234-5-evan.quan@amd.com>

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@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> Co-developed-by: Evan Quan <evan.quan@amd.com>
> Signed-off-by: Evan Quan <evan.quan@amd.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?
(Also no real good reason for num_of_ranges to be a u64, btw, since it
can only go up to 11)

With that fixed, you can add

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

johannes


  reply	other threads:[~2023-08-21  9:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  3:26 [V9 0/9] Enable Wifi RFI interference mitigation feature support Evan Quan
2023-08-18  3:26 ` [V9 1/9] drivers core: Add support for Wifi band RF mitigations Evan Quan
2023-08-18 16:41   ` Rafael J. Wysocki
2023-08-18 21:24   ` Greg KH
2023-08-18 22:49     ` Limonciello, Mario
2023-08-19 10:50       ` Greg KH
2023-08-22  3:13         ` Limonciello, Mario
2023-08-22  6:39           ` Greg KH
2023-08-23  7:53             ` Kalle Valo
2023-08-23  8:15               ` Greg KH
2023-08-18  3:26 ` [V9 2/9] drivers core: add ACPI based WBRF mechanism introduced by AMD Evan Quan
2023-08-18 17:41   ` Rafael J. Wysocki
2023-08-18  3:26 ` [V9 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing Evan Quan
2023-08-18  3:26 ` [V9 4/9] wifi: mac80211: Add support for WBRF features Evan Quan
2023-08-21  9:44   ` Johannes Berg [this message]
2023-08-25  8:47     ` Quan, Evan
2023-08-18  3:26 ` [V9 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature Evan Quan
2023-08-18  3:26 ` [V9 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature Evan Quan
2023-08-18  9:12   ` Lazar, Lijo
2023-08-25  8:48     ` Quan, Evan
2023-08-18  3:26 ` [V9 7/9] drm/amd/pm: add flood detection for wbrf events Evan Quan
2023-08-18  9:49   ` Lazar, Lijo
2023-08-18  3:26 ` [V9 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Evan Quan
2023-08-18  9:54   ` Lazar, Lijo
2023-08-18  3:26 ` [V9 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7 Evan Quan

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=e167e97797a90d3d6ea09840ac909325537d6034.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=evan.quan@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_jjohnson@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    /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®