mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
wifi: mt76: mt7925: extend mt7925_mcu_sta_amsdu_tlv for per-link STA
Extend mt7925_mcu_sta_amsdu_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. 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> Link: https://patch.msgid.link/20240613030241.5771-31-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -1467,9 +1467,11 @@ mt7925_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
|
||||
|
||||
static void
|
||||
mt7925_mcu_sta_amsdu_tlv(struct sk_buff *skb,
|
||||
struct ieee80211_vif *vif, struct ieee80211_sta *sta)
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
{
|
||||
struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
|
||||
struct mt792x_sta *msta = (struct mt792x_sta *)link_sta->sta->drv_priv;
|
||||
struct mt792x_link_sta *mlink;
|
||||
struct sta_rec_amsdu *amsdu;
|
||||
struct tlv *tlv;
|
||||
|
||||
@@ -1477,16 +1479,18 @@ mt7925_mcu_sta_amsdu_tlv(struct sk_buff *skb,
|
||||
vif->type != NL80211_IFTYPE_AP)
|
||||
return;
|
||||
|
||||
if (!sta->deflink.agg.max_amsdu_len)
|
||||
if (!link_sta->agg.max_amsdu_len)
|
||||
return;
|
||||
|
||||
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
|
||||
amsdu = (struct sta_rec_amsdu *)tlv;
|
||||
amsdu->max_amsdu_num = 8;
|
||||
amsdu->amsdu_en = true;
|
||||
msta->deflink.wcid.amsdu = true;
|
||||
|
||||
switch (sta->deflink.agg.max_amsdu_len) {
|
||||
mlink = mt792x_sta_to_link(msta, link_sta->link_id);
|
||||
mlink->wcid.amsdu = true;
|
||||
|
||||
switch (link_sta->agg.max_amsdu_len) {
|
||||
case IEEE80211_MAX_MPDU_LEN_VHT_11454:
|
||||
amsdu->max_mpdu_size =
|
||||
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
|
||||
@@ -1639,7 +1643,7 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
|
||||
mt7925_mcu_sta_ht_tlv(skb, info->link_sta->sta);
|
||||
mt7925_mcu_sta_vht_tlv(skb, info->link_sta->sta);
|
||||
mt76_connac_mcu_sta_uapsd(skb, info->vif, info->link_sta->sta);
|
||||
mt7925_mcu_sta_amsdu_tlv(skb, info->vif, info->link_sta->sta);
|
||||
mt7925_mcu_sta_amsdu_tlv(skb, info->vif, info->link_sta);
|
||||
mt7925_mcu_sta_he_tlv(skb, info->link_sta);
|
||||
mt7925_mcu_sta_he_6g_tlv(skb, info->link_sta);
|
||||
mt7925_mcu_sta_eht_tlv(skb, info->link_sta);
|
||||
|
||||
Reference in New Issue
Block a user