linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sean.wang@kernel.org
To: nbd@nbd.name, lorenzo.bianconi@redhat.com
Cc: sean.wang@mediatek.com, deren.wu@mediatek.com,
	mingyen.hsieh@mediatek.com, linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: [PATCH v2 09/37] wifi: mt76: mt7925: add link handling in mt7925_mac_sta_add
Date: Sat,  6 Jul 2024 01:27:49 -0700	[thread overview]
Message-ID: <632faefe8c82cd5609c2af00aabee15ccc9616ed.1720248331.git.sean.wang@kernel.org> (raw)
In-Reply-To: <cover.1720248331.git.sean.wang@kernel.org>

From: Sean Wang <sean.wang@mediatek.com>

Added link handling to mt7925_mac_sta_add to support MLD devices.

Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index afb58a9206b0..042c9fe5a2d9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -885,15 +885,25 @@ mt7925_mac_sta_add_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,
 int mt7925_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 		       struct ieee80211_sta *sta)
 {
+	struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
 	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
 	struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
+	int err;
 
 	msta->vif = mvif;
 
 	if (vif->type == NL80211_IFTYPE_STATION)
 		mvif->wep_sta = msta;
 
-	return mt7925_mac_link_sta_add(mdev, vif, &sta->deflink);
+	if (ieee80211_vif_is_mld(vif)) {
+		msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
+
+		err = mt7925_mac_sta_add_links(dev, vif, sta, sta->valid_links);
+	} else {
+		err = mt7925_mac_link_sta_add(mdev, vif, &sta->deflink);
+	}
+
+	return err;
 }
 EXPORT_SYMBOL_GPL(mt7925_mac_sta_add);
 
-- 
2.25.1


  parent reply	other threads:[~2024-07-06  8:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06  8:27 [PATCH v2 00/37] Enabling MT7925 MLO Mode Support sean.wang
2024-07-06  8:27 ` [PATCH v2 01/37] wifi: mt76: mt7925: update mt76_connac_mcu_uni_add_dev for MLO sean.wang
2024-07-06 12:30   ` Felix Fietkau
2024-07-06  8:27 ` [PATCH v2 02/37] wifi: mt76: mt7925: update mt7925_mac_link_sta_[add, assoc, remove] " sean.wang
2024-07-06  8:27 ` [PATCH v2 03/37] wifi: mt76: mt7925: set Tx queue parameters according to link id sean.wang
2024-07-06  8:27 ` [PATCH v2 04/37] wifi: mt76: mt7925: set mt7925_mcu_sta_key_tlv " sean.wang
2024-07-06  8:27 ` [PATCH v2 05/37] wifi: mt76: mt7925: add mt7925_set_link_key sean.wang
2024-07-06  8:27 ` [PATCH v2 06/37] wifi: mt76: mt7925: extend mt7925_mcu_uni_roc_event sean.wang
2024-07-06  8:27 ` [PATCH v2 07/37] wifi: mt76: mt7925: add mt7925_change_vif_links sean.wang
2024-07-06  8:27 ` [PATCH v2 08/37] wifi: mt76: mt7925: add mt7925_change_sta_links sean.wang
2024-07-06  8:27 ` sean.wang [this message]
2024-07-06  8:27 ` [PATCH v2 10/37] wifi: mt76: mt7925: add link handling in mt7925_mac_sta_remove sean.wang
2024-07-06  8:27 ` [PATCH v2 11/37] wifi: mt76: mt7925: add link handling to txwi sean.wang
2024-07-06  8:27 ` [PATCH v2 12/37] wifi: mt76: mt7925: add link handling in mt7925_set_key sean.wang
2024-07-06  8:27 ` [PATCH v2 13/37] wifi: mt76: mt7925: add link handling to mt7925_change_chanctx sean.wang
2024-07-06  8:27 ` [PATCH v2 14/37] wifi: mt76: mt7925: add link handling in the BSS_CHANGED_PS handler sean.wang
2024-07-06  8:27 ` [PATCH v2 15/37] wifi: mt76: mt7925: add link handling in mt7925_mcu_set_beacon_filter sean.wang
2024-07-06  8:27 ` [PATCH v2 16/37] wifi: mt76: mt7925: add link handling in mt7925_txwi_free sean.wang
2024-07-06  8:27 ` [PATCH v2 17/37] wifi: mt76: mt7925: add link handling in mt7925_mac_sta_assoc sean.wang
2024-07-06  8:27 ` [PATCH v2 18/37] wifi: mt76: mt7925: add link handling in mt7925_sta_set_decap_offload sean.wang
2024-07-06  8:27 ` [PATCH v2 19/37] wifi: mt76: mt7925: add link handling in mt7925_vif_connect_iter sean.wang
2024-07-06  8:28 ` [PATCH v2 20/37] wifi: mt76: mt7925: add link handling in the BSS_CHANGED_ARP_FILTER handler sean.wang
2024-07-06  8:28 ` [PATCH v2 21/37] wifi: mt76: mt7925: add link handling in the mt7925_ipv6_addr_change sean.wang
2024-07-06  8:28 ` [PATCH v2 22/37] wifi: mt76: mt7925: update rate index according to link id sean.wang
2024-07-06  8:28 ` [PATCH v2 23/37] wifi: mt76: mt7925: report link information in rx status sean.wang
2024-07-06  8:28 ` [PATCH v2 24/37] wifi: mt76: add def_wcid to struct mt76_wcid sean.wang
2024-07-06  8:28 ` [PATCH v2 25/37] wifi: mt76: mt7925: add mt7925_[assign,unassign]_vif_chanctx sean.wang
2024-07-06  8:28 ` [PATCH v2 26/37] wifi: mt76: mt7925: update mt7925_mcu_sta_mld_tlv for MLO sean.wang
2024-07-06  8:28 ` [PATCH v2 27/37] wifi: mt76: mt7925: update mt7925_mcu_bss_mld_tlv " sean.wang
2024-07-06  8:28 ` [PATCH v2 28/37] wifi: mt76: mt7925: update mt7925_mcu_add_bss_info " sean.wang
2024-07-06  8:28 ` [PATCH v2 29/37] wifi: mt76: mt7925: update mt7925_mcu_sta_update " sean.wang
2024-07-06  8:28 ` [PATCH v2 30/37] wifi: mt76: mt7925: add mt7925_mcu_sta_eht_mld_tlv " sean.wang
2024-07-06  8:28 ` [PATCH v2 31/37] wifi: mt76: mt7925: update mt7925_mcu_sta_rate_ctrl_tlv " sean.wang
2024-07-06  8:28 ` [PATCH v2 32/37] wifi: mt76: mt7925: update mt7925_mcu_sta_phy_tlv " sean.wang
2024-07-06  8:28 ` [PATCH v2 33/37] wifi: mt76: mt7925: update mt7925_mcu_set_timing " sean.wang
2024-07-06  8:28 ` [PATCH v2 34/37] wifi: mt76: mt7925: update mt7925_mcu_bss_basic_tlv " sean.wang
2024-07-06  8:28 ` [PATCH v2 35/37] wifi: mt76: mt7925: update mt7925_mac_link_bss_add " sean.wang
2024-07-06  8:28 ` [PATCH v2 36/37] wifi: mt76: mt7925: remove the unused mt7925_mcu_set_chan_info sean.wang
2024-07-06  8:28 ` [PATCH v2 37/37] wifi: mt76: mt7925: enabling MLO when the firmware supports it sean.wang

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=632faefe8c82cd5609c2af00aabee15ccc9616ed.1720248331.git.sean.wang@kernel.org \
    --to=sean.wang@kernel.org \
    --cc=deren.wu@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=mingyen.hsieh@mediatek.com \
    --cc=nbd@nbd.name \
    --cc=sean.wang@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;
as well as URLs for NNTP newsgroup(s).