public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: Felix Fietkau <nbd@nbd.name>,  <linux-wireless@vger.kernel.org>,
	Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	 Shayne Chen <shayne.chen@mediatek.com>,
	 Evelyn Tsai <evelyn.tsai@mediatek.com>,
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH] wifi: mt76: mt7915: enable BSS_CHANGED_MU_GROUPS support
Date: Thu, 03 Aug 2023 07:58:07 +0300	[thread overview]
Message-ID: <87bkfozpr4.fsf@kernel.org> (raw)
In-Reply-To: <ff63866d7d62d088edd4a9f7587320f8f59a361f.1690999957.git.ryder.lee@mediatek.com> (Ryder Lee's message of "Thu, 3 Aug 2023 02:49:44 +0800")

Ryder Lee <ryder.lee@mediatek.com> writes:

> The Group ID Management frame is an Action frame of category VHT.
> It is transmitted by the AP to assign or change the user position
> of a STA for one or more group IDs.
>
> Also, sniffer can use a given group id to monitor STA that belongs
> to that group.
>
> Notify underlying driver of changes via BSS_CHANGED_MU_GROUPS.
>
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> Change-Id: I3d2f5508a2b6eb7c929c3997c31a9285713c8bea

No Change-Id, please.

> --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> @@ -593,6 +593,34 @@ mt7915_update_bss_color(struct ieee80211_hw *hw,
>  	}
>  }
>  
> +static void
> +mt7915_update_mu_group(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> +		       struct ieee80211_bss_conf *info)
> +{
> +	struct mt7915_phy *phy = mt7915_hw_phy(hw);
> +	struct mt7915_dev *dev = mt7915_hw_dev(hw);
> +	u8 i, band = phy->mt76->band_idx;
> +	u32 *mu;
> +
> +	mu = (u32 *)info->mu_group.membership;

Is this safe on big endian?

> +	for (i = 0; i < WLAN_MEMBERSHIP_LEN / sizeof(*mu); i++) {
> +		if (is_mt7916(&dev->mt76))
> +			mt76_wr(dev, MT_WF_PHY_RX_GID_TAB_VLD_MT7916(band, i),
> +				mu[i]);
> +		else
> +			mt76_wr(dev, MT_WF_PHY_RX_GID_TAB_VLD(band, i), mu[i]);
> +	}
> +
> +	mu = (u32 *)info->mu_group.position;

And this?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


  reply	other threads:[~2023-08-03  4:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 18:49 [PATCH] wifi: mt76: mt7915: enable BSS_CHANGED_MU_GROUPS support Ryder Lee
2023-08-03  4:58 ` Kalle Valo [this message]
2023-08-03  6:58   ` Ryder Lee

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=87bkfozpr4.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=evelyn.tsai@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox