From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 4/8] wifi: mt76: scan: set vif offchannel link for scanning/roc
Date: Tue, 11 Mar 2025 11:36:41 +0100 [thread overview]
Message-ID: <20250311103646.43346-4-nbd@nbd.name> (raw)
In-Reply-To: <20250311103646.43346-1-nbd@nbd.name>
The driver needs to know what vif link to use
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/mediatek/mt76/channel.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt76.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/channel.c b/drivers/net/wireless/mediatek/mt76/channel.c
index 6a35c6ebd823..e7b839e74290 100644
--- a/drivers/net/wireless/mediatek/mt76/channel.c
+++ b/drivers/net/wireless/mediatek/mt76/channel.c
@@ -293,6 +293,7 @@ struct mt76_vif_link *mt76_get_vif_phy_link(struct mt76_phy *phy,
kfree(mlink);
return ERR_PTR(ret);
}
+ rcu_assign_pointer(mvif->offchannel_link, mlink);
return mlink;
}
@@ -301,10 +302,12 @@ void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif,
struct mt76_vif_link *mlink)
{
struct mt76_dev *dev = phy->dev;
+ struct mt76_vif_data *mvif = mlink->mvif;
if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel)
return;
+ rcu_assign_pointer(mvif->offchannel_link, NULL);
dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink);
kfree(mlink);
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 7596191252dc..c16a6743ad64 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -351,6 +351,7 @@ struct mt76_wcid {
u8 hw_key_idx;
u8 hw_key_idx2;
+ u8 offchannel:1;
u8 sta:1;
u8 sta_disabled:1;
u8 amsdu:1;
@@ -787,6 +788,7 @@ struct mt76_vif_link {
struct mt76_vif_data {
struct mt76_vif_link __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS];
+ struct mt76_vif_link __rcu *offchannel_link;
struct mt76_phy *roc_phy;
u16 valid_links;
--
2.47.1
next prev parent reply other threads:[~2025-03-11 10:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 10:36 [PATCH 1/8] wifi: mt76: mt7996: revise TXS size Felix Fietkau
2025-03-11 10:36 ` [PATCH 2/8] wifi: mt76: mt7996: fix SER reset trigger on WED reset Felix Fietkau
2025-03-11 10:36 ` [PATCH 3/8] wifi: mt76: mt7996: remove unnecessary key->cipher check for BIP frames Felix Fietkau
2025-03-11 10:36 ` Felix Fietkau [this message]
2025-03-11 10:36 ` [PATCH 5/8] wifi: mt76: mt7996: use the correct vif link for scanning/roc Felix Fietkau
2025-03-12 2:08 ` Ping-Ke Shih
2025-03-12 9:06 ` Felix Fietkau
2025-03-11 10:36 ` [PATCH 6/8] mt76: only mark tx-status-failed frames as ACKed on mt76x0/2 Felix Fietkau
2025-03-11 10:47 ` Felix Fietkau
2025-03-11 10:36 ` [PATCH 7/8] wifi: mt76: mt7996: implement driver specific get_txpower function Felix Fietkau
2025-03-11 13:55 ` Lorenzo Bianconi
2025-03-11 14:01 ` Felix Fietkau
2025-03-11 10:36 ` [PATCH 8/8] wifi: mt76: scan: fix setting tx_info fields Felix Fietkau
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=20250311103646.43346-4-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=linux-wireless@vger.kernel.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