All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: dylan.eskew@candelatech.com
Cc: nbd@nbd.name, ryder.lee@mediatek.com,
	linux-wireless@vger.kernel.org, shayne.chen@mediatek.com,
	sean.wang@mediatek.com
Subject: Re: [PATCH mt76 v2] wifi: mt76: mt7996: limit work in set_bitrate_mask
Date: Thu, 9 Apr 2026 12:48:13 +0200	[thread overview]
Message-ID: <adeD7c1aEXbeANmk@lore-desk> (raw)
In-Reply-To: <20260408145057.2356878-2-dylan.eskew@candelatech.com>

[-- Attachment #1: Type: text/plain, Size: 2203 bytes --]

> From: Dylan Eskew <dylan.eskew@candelatech.com>
> 
> Calls to mt7996_set_bitrate_mask() would propagate work for all stations
> on the ieee80211_hw regardless of the vif specified in the call. To
> prevent unnecessary work in FW, limit setting the sta_rate to only the
> specified vif in mt7996_sta_rate_ctrl_update().
> 
> Fixes: afff4325548f0 ("wifi: mt76: mt7996: Use proper link_id in link_sta_rc_update callback")
> Signed-off-by: Dylan Eskew <dylan.eskew@candelatech.com>

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> ---
> v2:
>   - Assign to correct tree
>   - Fix spelling error in commit message
> ---
>  drivers/net/wireless/mediatek/mt76/mt7996/main.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
> index a8a6552d49f6..26b8c91db0a8 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
> @@ -1959,7 +1959,11 @@ static void mt7996_sta_rate_ctrl_update(void *data, struct ieee80211_sta *sta)
>  {
>  	struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
>  	struct mt7996_sta_link *msta_link;
> -	u32 *changed = data;
> +	struct mt7996_vif *mvif = data;
> +	u32 changed = IEEE80211_RC_SUPP_RATES_CHANGED;
> +
> +	if (msta->vif != mvif)
> +		return;
>  
>  	msta_link = rcu_dereference(msta->link[msta->deflink_id]);
>  	if (msta_link)
> @@ -1972,7 +1976,6 @@ mt7996_set_bitrate_mask(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>  {
>  	struct mt7996_dev *dev = mt7996_hw_dev(hw);
>  	struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
> -	u32 changed = IEEE80211_RC_SUPP_RATES_CHANGED;
>  
>  	mvif->deflink.bitrate_mask = *mask;
>  
> @@ -1985,7 +1988,7 @@ mt7996_set_bitrate_mask(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>  	 * then multiple MCS setting (MCS 4,5,6) is not supported.
>  	 */
>  	ieee80211_iterate_stations_atomic(hw, mt7996_sta_rate_ctrl_update,
> -					  &changed);
> +					  mvif);
>  	ieee80211_queue_work(hw, &dev->rc_work);
>  
>  	return 0;
> -- 
> 2.52.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-04-09 10:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 14:50 [PATCH mt76 v2] wifi: mt76: mt7996: limit work in set_bitrate_mask dylan.eskew
2026-04-09 10:48 ` Lorenzo Bianconi [this message]

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=adeD7c1aEXbeANmk@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=dylan.eskew@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.