linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: Andrew Lunn <andrew@lunn.ch>, Evan Quan <evan.quan@amd.com>
Cc: rafael@kernel.org, lenb@kernel.org, Alexander.Deucher@amd.com,
	Christian.Koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
	daniel@ffwll.ch, johannes@sipsolutions.net, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	mdaenzer@redhat.com, maarten.lankhorst@linux.intel.com,
	tzimmermann@suse.de, hdegoede@redhat.com, jingyuwang_vip@163.com,
	Lijo.Lazar@amd.com, jim.cromie@gmail.com, bellosilicio@gmail.com,
	andrealmeid@igalia.com, trix@redhat.com, jsg@jsg.id.au,
	arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH V7 4/9] wifi: mac80211: Add support for ACPI WBRF
Date: Mon, 24 Jul 2023 08:40:33 -0500	[thread overview]
Message-ID: <7d059aed-fac0-cdcd-63d5-58185bb345db@amd.com> (raw)
In-Reply-To: <9b1f45f9-02a3-4c03-b9d5-cc3b9ab3a058@lunn.ch>

On 7/24/2023 04:22, Andrew Lunn wrote:
>> @@ -1395,6 +1395,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
>>   	debugfs_hw_add(local);
>>   	rate_control_add_debugfs(local);
>>   
>> +	ieee80211_check_wbrf_support(local);
>> +
>>   	rtnl_lock();
>>   	wiphy_lock(hw->wiphy);
>>   
> 
>> +void ieee80211_check_wbrf_support(struct ieee80211_local *local)
>> +{
>> +	struct wiphy *wiphy = local->hw.wiphy;
>> +	struct device *dev;
>> +
>> +	if (!wiphy)
>> +		return;
>> +
>> +	dev = wiphy->dev.parent;
>> +	if (!dev)
>> +		return;
>> +
>> +	local->wbrf_supported = wbrf_supported_producer(dev);
>> +	dev_dbg(dev, "WBRF is %s supported\n",
>> +		local->wbrf_supported ? "" : "not");
>> +}
> 
> This seems wrong. wbrf_supported_producer() is about "Should this
> device report the frequencies it is using?" The answer to that depends
> on a combination of: Are there consumers registered with the core, and
> is the policy set so WBRF should take actions. >
> The problem here is, you have no idea of the probe order. It could be
> this device probes before others, so wbrf_supported_producer() reports
> false, but a few second later would report true, once other devices
> have probed.
> 
> It should be an inexpensive call into the core, so can be made every
> time the channel changes. All the core needs to do is check if the
> list of consumers is empty, and if not, check a Boolean policy value.
> 
>       Andrew

No, it's not a combination of whether consumers are registered with the 
core.  If a consumer probes later it needs to know the current in use 
frequencies too.

The reason is because of this sequence of events:
1) Producer probes.
2) Producer selects a frequency.
3) Consumer probes.
4) Producer stays at same frequency.

If the producer doesn't notify the frequency because a consumer isn't 
yet loaded then the consumer won't be able to get the current frequency.

  reply	other threads:[~2023-07-24 13:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19  9:00 [PATCH V7 0/9] Enable Wifi RFI interference mitigation feature support Evan Quan
2023-07-19  9:00 ` [PATCH V7 1/9] drivers core: Add support for Wifi band RF mitigations Evan Quan
2023-07-19  9:00 ` [PATCH V7 2/9] driver core: add ACPI based WBRF mechanism introduced by AMD Evan Quan
2023-07-19  9:00 ` [PATCH V7 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing Evan Quan
2023-07-19  9:00 ` [PATCH V7 4/9] wifi: mac80211: Add support for ACPI WBRF Evan Quan
2023-07-24  9:22   ` Andrew Lunn
2023-07-24 13:40     ` Limonciello, Mario [this message]
2023-07-25 10:38       ` Quan, Evan
2023-07-25 18:57         ` Andrew Lunn
2023-07-25 19:15           ` Mario Limonciello
2023-07-25 20:09             ` Andrew Lunn
2023-07-25 20:44               ` Mario Limonciello
2023-08-14  9:50               ` Quan, Evan
2023-08-14 14:31                 ` Andrew Lunn
2023-08-14 10:02               ` Johannes Berg
2023-07-19  9:00 ` [PATCH V7 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature Evan Quan
2023-07-19  9:00 ` [PATCH V7 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature Evan Quan
2023-07-19  9:00 ` [PATCH V7 7/9] drm/amd/pm: add flood detection for wbrf events Evan Quan
2023-07-19  9:00 ` [PATCH V7 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Evan Quan
2023-07-19  9:00 ` [PATCH V7 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7 Evan Quan
2023-07-24  2:50 ` [PATCH V7 0/9] Enable Wifi RFI interference mitigation feature support Quan, Evan

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=7d059aed-fac0-cdcd-63d5-58185bb345db@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Lijo.Lazar@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@igalia.com \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=bellosilicio@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edumazet@google.com \
    --cc=evan.quan@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=jim.cromie@gmail.com \
    --cc=jingyuwang_vip@163.com \
    --cc=johannes@sipsolutions.net \
    --cc=jsg@jsg.id.au \
    --cc=kuba@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mdaenzer@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafael@kernel.org \
    --cc=trix@redhat.com \
    --cc=tzimmermann@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).