Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp129973lqq; Wed, 12 Jun 2024 20:05:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXr6GNtcYY5hFuUGQnBPT9d0MmtyniETU0nmrjW3zz+72nH1exoK6iQF7zhBYod4PhL2yUi0E1Z5C9kFwc4ZZzJz20IydZ9rhkuIsovxQ== X-Google-Smtp-Source: AGHT+IGk1G1QB9KPsLjOOsMKkwrMZvZrvJpdEk4cWvSOM9N99/VpdIqnaQ/yAJkRDNbYBtkidq2/ X-Received: by 2002:a17:903:1107:b0:1f7:258a:98a4 with SMTP id d9443c01a7336-1f84dfce0f2mr23807635ad.9.1718247919303; Wed, 12 Jun 2024 20:05:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718247919; cv=pass; d=google.com; s=arc-20160816; b=DrlyYKluwQj/qy/6GOjjSQ5QFvg56OOapeBjXprTg6Z3oLtWTr3cJgfZKgRFDrXQkC H6oUhKcb+8AbZJo9Oj0EtT7Q7yNucUPS8CFE4XdihIS68A/v7QKJhxmv2d9uggOppGX4 ZRS8CWzghiwAgu3XxbEWIs5rNjmSDz3wlkbMbIK0Dv97GaUXjPVwy4LTrgoQJhQOG0pO 7EuJqb0GieaNXVEMaP83UDoVta82KpBVX1kLXFsm+ybQRnNTobDIouCUZK7xd6gKpxUF Qxq9zqOZN6k/8s+jI9HsPOjKm5tfwVZOMedrn9Hp8AB32PDpQkAb0T7yakUnrDSt2x75 HgZg== 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=h7OsvxRZu1eH3rdvc+37NIE+pK4g9A8AD+jv6tlQz/U=; fh=AE9AOIURaoqI2cHyZGs1aZjTpVKPFQykuRcsMH56sRM=; b=A5htdjsvnJxNEvcwj95etfDfPPKVkyEDMHvKmXpzHzBBS9JqBpAnwXlVwyCFJjgaXy SGG5ICWZMOU2CP8peVUh+07HQz7s1+86fsolGlPnTy++BTyibgpWi2DQ/3uX+k2n06Hf BPd5/MFiBfoWDfWRUi55UsP45L73TYT3r+JGKIIdxowDPlvvo/ZLaxtHyNxOwm7jPs56 8xyfmx3KQeQshYHYlMYCA9XZvJC3wLlUaV+Mz95eFSMLTqN3HwwTFhOVIyo/Jcqhm+xm FkVl7BZCIjzxQi4scYOykIIxecQjBYfUtjMBR+W2a2DzB2lErWx8oa6ehjes6bAS59rZ tFjg==; 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-8942-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8942-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd5e8c8asi380077a12.36.2024.06.12.20.05.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8942-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8942-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8942-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 174E2283F92 for ; Thu, 13 Jun 2024 03:04:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C46D12F37B; Thu, 13 Jun 2024 03:03:56 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) (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 CEEF3130A68 for ; Thu, 13 Jun 2024 03:03:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247836; cv=none; b=kl1bEG3KKR846qlnSmRK5IudyT4WlG9sA47W5+X8ZS4UJIlr2GbEO/mPjWdMpTYZ1Kor6LzdESaeBr5YVLTkane4MIX5VAhAtcMth2/3hU3rbiGnufFqC2UTwY1khwn/jp8S3G+T+Wfg+noOKDlbu7svqvyUgsHM6dnWkt5tSYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247836; c=relaxed/simple; bh=50MFFmWO/ZMIS5cZIt5jyUeGaFz137k4IkheypCC1Jk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bq13ruYhcb8iBD+vkmx8leDnpW1jyKUq52OjnlcaCAQgfbFpwhJvfwlaXUMzu/s9TXWgyhm4JfK1aTIOncjYZpiWniC8CgM/rCC6mt6UbhwBTdZwqYhWZOPPaht8z02npWfLcVWSrNo4QuRcKaCa2SiyZ7v1DfGg/YXJVEied6Y= 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.53 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-f53.google.com with SMTP id 586e51a60fabf-254976d3327so77741fac.1 for ; Wed, 12 Jun 2024 20:03:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718247834; x=1718852634; 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=h7OsvxRZu1eH3rdvc+37NIE+pK4g9A8AD+jv6tlQz/U=; b=k0/OX6IYqmOZR/z0/Cu6KvtJaVy7gFd3SCOdSubrXYm99OFopXwlxQjesA1ds/qEIu hW0e0gWozJfeStvW0GL89QGg63dMolqQkH27JRNj2jY9c1f8MB3qY+JrnbTUvaivGObj jOPuOOQJjBahuiSv43eE4xlUXXO+t7PS8bc2sAkugm+58P2RQGgxukmGy+Wxl8+30Sqh UYGp1nquMnQw8yBQIXA3dILXSHXXWZaIv9cdsPIfyL3n4qmpCUglFiXddQ4nH6rOjG3J Gintkghi9AO1uWifYE1ZGhKtbqnc3Ds3N8bjcMpOjEA5ziP5qdg/cDrmYil7rMUW8ywv vKeQ== X-Forwarded-Encrypted: i=1; AJvYcCVrRXWAFUNu7YeOW3ZyiG+vgZKCoL7uWVdxHIY9lNhXJJ1Wi3q9sFLYQsLG/gDFq0A6GGZtCqZoutBL76lCkA==@vger.kernel.org X-Gm-Message-State: AOJu0YxplT2iCHM1/VZ5tlaumuHK3fRbonU34EmOxoU52kKP5L6PZ7O0 XpsirKdbW84qet2ZOLcOOerET1XgCWSHxtNTzaRHd8LnhPkRxjpN X-Received: by 2002:a4a:d196:0:b0:5bd:87a0:66d with SMTP id 006d021491bc7-5bd87a01b93mr286464eaf.1.1718247833853; Wed, 12 Jun 2024 20:03:53 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:52 -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 32/47] wifi: mt76: mt7925: extend mt7925_mcu_sta_ht_tlv for per-link STA Date: Wed, 12 Jun 2024 20:02:26 -0700 Message-Id: <20240613030241.5771-33-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_ht_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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 1b66dd26bd1e..66d45d676739 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -1433,18 +1433,18 @@ mt7925_mcu_sta_eht_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta) } static void -mt7925_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) +mt7925_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta) { struct sta_rec_ht *ht; struct tlv *tlv; - if (!sta->deflink.ht_cap.ht_supported) + if (!link_sta->ht_cap.ht_supported) return; tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht)); ht = (struct sta_rec_ht *)tlv; - ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap); + ht->ht_cap = cpu_to_le16(link_sta->ht_cap.cap); } static void @@ -1640,7 +1640,7 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy, info->enable, info->newly); 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_ht_tlv(skb, info->link_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); -- 2.34.1