From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH mt76-next 06/20] wifi: mt76: mt7925: send the HE capabilities of each link of a peer
Date: Sun, 29 Nov 2026 20:31:16 +0100 [thread overview]
Message-ID: <20261129193131.3367661-6-nbd@nbd.name> (raw)
In-Reply-To: <20261129193131.3367661-1-nbd@nbd.name>
mt7925_mcu_sta_he_tlv() passes the station to
mt76_connac_mcu_sta_he_tlv_v2(), which reads the HE capabilities and the
bandwidth of sta->deflink, the association link. mac80211 fills the
capabilities of each link of an MLD peer from the elements of that link.
STA_REC_HE_V2 of every other link thus carries the HE capabilities, MCS
maps and bandwidth of the association link. A 5 GHz link of a peer that
associated on 2.4 GHz, for example, gets no 160 MHz map.
Take the HE capabilities and the bandwidth of the link station, like the
other STA_REC TLVs of mt7925. mt7921 has one link per station and passes
its deflink.
Fixes: e2f10f5bdd68 ("wifi: mt76: mt7925: extend mt7925_mcu_sta_he_tlv for per-link STA")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 9 +++++----
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 ++-
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index afb5717a7825..3241e1ce2ef7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -822,9 +822,10 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
}
void
-mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
+mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb,
+ struct ieee80211_link_sta *link_sta)
{
- struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
+ struct ieee80211_sta_he_cap *he_cap = &link_sta->he_cap;
struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem;
struct sta_rec_he_v2 *he;
struct tlv *tlv;
@@ -835,7 +836,7 @@ mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
memcpy(he->he_phy_cap, elem->phy_cap_info, sizeof(he->he_phy_cap));
memcpy(he->he_mac_cap, elem->mac_cap_info, sizeof(he->he_mac_cap));
- switch (sta->deflink.bandwidth) {
+ switch (link_sta->bandwidth) {
case IEEE80211_STA_RX_BW_160:
if (elem->phy_cap_info[0] &
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
@@ -962,7 +963,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
/* starec he */
if (sta->deflink.he_cap.has_he) {
mt76_connac_mcu_sta_he_tlv(skb, sta);
- mt76_connac_mcu_sta_he_tlv_v2(skb, sta);
+ mt76_connac_mcu_sta_he_tlv_v2(skb, &sta->deflink);
if (band == NL80211_BAND_6GHZ &&
sta_state == MT76_STA_INFO_STATE_ASSOC) {
struct sta_rec_he_6g_capa *he_6g_capa;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index 605030f70a02..a4d08b1f4ea3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -2092,7 +2092,8 @@ void mt76_connac_mcu_wtbl_hdr_trans_tlv(struct sk_buff *skb,
int mt76_connac_mcu_sta_update_hdr_trans(struct mt76_dev *dev,
struct ieee80211_vif *vif,
struct mt76_wcid *wcid, int cmd);
-void mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta);
+void mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb,
+ struct ieee80211_link_sta *link_sta);
u8 mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif,
enum nl80211_band band,
struct ieee80211_link_sta *link_sta);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 0afe38348bc9..9a2d428a814a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1926,7 +1926,7 @@ mt7925_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta)
if (!link_sta->he_cap.has_he)
return;
- mt76_connac_mcu_sta_he_tlv_v2(skb, link_sta->sta);
+ mt76_connac_mcu_sta_he_tlv_v2(skb, link_sta);
}
static void
--
2.47.3
next prev parent reply other threads:[~2026-11-29 19:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 19:31 [PATCH mt76-next 01/20] wifi: mt76: mt7996: hold the wiphy lock in the L1 SER reset work Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 02/20] wifi: mt76: mt7996: report the TX statistics of each link of a station Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 03/20] wifi: mt76: mt7996: stop the hardware when the probe fails Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 04/20] wifi: mt76: mt7996: clean up the DMA when the NPU RX queue init fails Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 05/20] wifi: mt76: mt7996: name the link and the error of a failed key install Felix Fietkau
2026-11-29 19:31 ` Felix Fietkau [this message]
2026-11-29 19:31 ` [PATCH mt76-next 07/20] wifi: mt76: connac: mask the LDPC capabilities of an AP peer Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 08/20] wifi: mt76: mt7925: " Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 09/20] wifi: mt76: mt7996: read the EHT capabilities of a station as LE Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 10/20] wifi: mt76: mt7925: " Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 11/20] wifi: mt76: mt7615: drop RX frame with a header gap past its end Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 12/20] wifi: mt76: connac: drop a first fragment without an Ethernet header Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 13/20] wifi: mt76: mt7915: drop RX frame with a header gap past its end Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 14/20] wifi: mt76: mt7921: " Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 15/20] wifi: mt76: mt7996: " Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 16/20] wifi: mt76: mt7925: bound the header gap by the linear data of a frame Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 17/20] wifi: mt76: mt7921: fix out-of-bounds read in mt7921_mac_add_txs Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 18/20] wifi: mt76: mt7925: fix out-of-bounds read in mt7925_mac_add_txs Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 19/20] wifi: mt76: mt7925: apply the dwell time of a scan request Felix Fietkau
2026-11-29 19:31 ` [PATCH mt76-next 20/20] wifi: mt76: connac: apply the dwell time of a scan request on mt7663 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=20261129193131.3367661-6-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