Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp129822lqq; Wed, 12 Jun 2024 20:04:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGRdh6+yehIbVK6FJgboiuGq3uTP8icIVFmaDkDGv5x3ljUONI5VAB66FFAyqSgXh4Zo0DX0c69g0GjhJVX8ssuv7hYSAIzVvxo5cLug== X-Google-Smtp-Source: AGHT+IGLnBxjHSHXqwVtq8AEKC4Cx/5uCGhJ0ZvNPszXWo3VpyWWfzARiU1QfquW4/vZnVd8aaq+ X-Received: by 2002:a50:f68b:0:b0:57c:a7dc:b0e4 with SMTP id 4fb4d7f45d1cf-57ca975695dmr2814248a12.3.1718247896901; Wed, 12 Jun 2024 20:04:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718247896; cv=pass; d=google.com; s=arc-20160816; b=LV+PM2GS24z1OpoiiEOZognVccdb3BtpExyhg/BM+Tyctw4RqcaSycvwdcOQ7gPrRQ ex4SFpMe+Ho5SY74JXA/w8y+9jJPiwHkBCcY/1OnCkhJK2KvxbpbAO71tSDcvv80nYET 9GALwwyV5hqFezcQElJ5y2O4JFYudvKL3kZihN5NQCyEOHJRowzFBbtnvX2Zc+Ved9lt j0LpeAzGnvspzjHBhsxT61YRwAlfRbVrT6HYq0pj1gUgNUbBcjgbK15digr3geff8bLH 7EBzo4PSReFT2GRDUYtzej7I6/d6GRNUfzc7vRnuqYi723DpC1gP16nVzP1pTSaNZkYP QucA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=nOSh1Koddm2iaRVlRwReJq6F4ShEOJmpd3jAFp1dhAY=; fh=9ViT0+tEi31hYQAR/jo11r0gayb2bnj7y9nRHHq+mdc=; b=HFUJ+/n2pwtmmQ7ePABqtm/PSj8ufDi68PofGm0m1KOxIAk61Fon4XIbodVxWv6UhG PHWLt2W71U+wtn1ENsyg4OtPOYRJIXHjoXVp19qZHV4Ccpdr0E8lFETEqrBwAWMixkbf ndZzflYz894USO4z6KA6NglLiXff/SL/Xr9FZC3YUmRYi/0aX4P97RvMojSGRIkPnpbE FgRHRw6lljdEKuUagwWlHWywLvEqTYjgBrjmzLRiNf6feXq9Iaf//+SrSAu3My9LqkLf K36cadrPXSI3jgOH4HicZ7jvieMrXC6dWDAOi3d1U2uFztVyonaGyOev+r+gqJENrSM/ jIpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb7479265si237961a12.672.2024.06.12.20.04.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:04:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9C5D71F226FB for ; Thu, 13 Jun 2024 03:04:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FE3F12CDAF; Thu, 13 Jun 2024 03:03:54 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7316130A68 for ; Thu, 13 Jun 2024 03:03:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247834; cv=none; b=lTyjaomu26ejNQjw9C6Kgtz2IQ5W0jfWbAciP9kdKPyexmlO9Pank/+iTyVQC8nzP6TePiBXqti8CbjUUFVoBxX19CSIRanlTIPCAXR5tG5bbybLjzTzuK3N5yE7dVWyyhvj89SqmveqvKfBuZhvmBa0Go/uc1hw6cqBzqidJ/w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247834; c=relaxed/simple; bh=rQmCIZTad6QRoIVkvKJCT6svW2UL6gdTyDb+Z+Ohies=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UTDy2WP/iDELiYwCgnMZy6qOdDECW0CWsQmGu75hpe0pmuZrbfC/qIElfVVgKnpj58ku3R+RH2XOnrUSVLFTHZ6cp63c9Docwjb+NxoaXm8HmawX+CUyVtm3Kpes5eanvwWMmdAeV457Q1V8U7SH+NPvwsDu+7z5ckGID+2yb14= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-25075f3f472so76663fac.2 for ; Wed, 12 Jun 2024 20:03:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718247832; x=1718852632; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nOSh1Koddm2iaRVlRwReJq6F4ShEOJmpd3jAFp1dhAY=; b=se/nlIjfuoEmKp7XOZtvUIuzSZJ7vYGqPcWbcDH+yVxtzrrx4Pl5m4Rdlr/wyhVlNQ POV2H46xlu/FWM8s7cofPcKKIJD0kk1x+GO93jvr5VhsXkV/n4mI3bjwD86u5PoToYOL GWtI3CarN9CQzU8FONUaQXeJd/PVfwh6PRu71CiUxoQmZ3y+T0hVQszIV/FQgw8cvJ8e nEXan4Z42xXzIjxEa7GV66WcSQqvUS3PC8yXAUucxjMsvG2L+t1qZ1Lu6OIohxegu2gW WIeFR6unE4tpQ8JfV/2/hkf0Hq75bsff55xmPjatbohyRR3UDPZGf9B22d4+IJ0ucx6Q AE2w== X-Forwarded-Encrypted: i=1; AJvYcCWB7WZsfs0ds0dLc5LJmsn+xU/2cZMmFNJ8+CASrjvLlX6jMYYrJLTLCy/VKwb6npMHDvjLm7erPe4q64OmlA==@vger.kernel.org X-Gm-Message-State: AOJu0YyShnH68kxi+eF+FCR8ORT0RdZKki4J0AtX59e3TalbGJRZ8232 Oca95fXOKlOdB/MemBJmkJRuIcEJ2Ty1bMi5g5zFdp7hUHyuSSko X-Received: by 2002:a05:6820:b0b:b0:5ba:c4ed:ee98 with SMTP id 006d021491bc7-5bb3b7a4c51mr3590579eaf.0.1718247831716; Wed, 12 Jun 2024 20:03:51 -0700 (PDT) Received: from sean-ThinkPad-T450s.lan ([207.191.35.252]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5bd629263c5sm67685eaf.46.2024.06.12.20.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:49 -0700 (PDT) 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 31/47] wifi: mt76: mt7925: extend mt7925_mcu_sta_vht_tlv for per-link STA Date: Wed, 12 Jun 2024 20:02:25 -0700 Message-Id: <20240613030241.5771-32-sean.wang@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240613030241.5771-1-sean.wang@kernel.org> References: <20240613030241.5771-1-sean.wang@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Sean Wang Extend mt7925_mcu_sta_vht_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 Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang --- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 57b89eca4e21..1b66dd26bd1e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -1448,21 +1448,21 @@ mt7925_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) } static void -mt7925_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) +mt7925_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta) { struct sta_rec_vht *vht; struct tlv *tlv; /* For 6G band, this tlv is necessary to let hw work normally */ - if (!sta->deflink.he_6ghz_capa.capa && !sta->deflink.vht_cap.vht_supported) + if (!link_sta->he_6ghz_capa.capa && !link_sta->vht_cap.vht_supported) return; tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, sizeof(*vht)); vht = (struct sta_rec_vht *)tlv; - vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap); - vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map; - vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map; + vht->vht_cap = cpu_to_le32(link_sta->vht_cap.cap); + vht->vht_rx_mcs_map = link_sta->vht_cap.vht_mcs.rx_mcs_map; + vht->vht_tx_mcs_map = link_sta->vht_cap.vht_mcs.tx_mcs_map; } static void @@ -1641,7 +1641,7 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy, if (info->link_sta && info->enable) { mt7925_mcu_sta_phy_tlv(skb, info->vif, info->link_sta->sta); mt7925_mcu_sta_ht_tlv(skb, info->link_sta->sta); - mt7925_mcu_sta_vht_tlv(skb, info->link_sta->sta); + mt7925_mcu_sta_vht_tlv(skb, info->link_sta); mt76_connac_mcu_sta_uapsd(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); -- 2.34.1