Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp129659lqq; Wed, 12 Jun 2024 20:04:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDOdvdx4b3Vz0xfZUOWMkLWh9EoEDcTA9FyFctco2hoP1N5ubzG/U1X6xZoFPM3BI0cTgbKPuCsSqPxCL+vS1f8VfzZS8yMQEmqAHpNQ== X-Google-Smtp-Source: AGHT+IEUSsWd4BRZPRWnn28iXy5x8q7WrSI+k70SnCTvXf8+fwwfcPgOSp51D2U8JHAYwWOEYrIf X-Received: by 2002:a05:620a:4446:b0:795:5e08:9e79 with SMTP id af79cd13be357-797f6136a2bmr424574785a.73.1718247870517; Wed, 12 Jun 2024 20:04:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718247870; cv=pass; d=google.com; s=arc-20160816; b=yXJBXk1t3zlUzjYM5kqm6H82U8MPwaLDKO8q7JvE4e9Hh0TLFKK68+yGwDtHXWvMKB nutCIEbKY3TOdKWU1DD68lqk2NyKwdPAc/urQz1PjrMhFlpvQZJay6NkQjTXf12+VVKq lGrGhYpDfXyUL0hJjmKKJP8ZwrfnUlajhL+6wmndXcFCM9uHLs+NLbID9ly9XNmLuTti b5zdXboB7cDgy8fZcifUJRmiCWiKjgs4LtU4VCflU3eLSsn/cabCJfSF/+Gr6yuPOqfK 6GKCcYHsYMiSwb81NelB9jwMkT88RMlYQyhCa0qyNOsKCerKqfIAjlV/6tOoQtnjnfmX KNqw== 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=dccZ5/3CuQxaIWTMPM2TCEJVGRDx3lSvYRxYcTANQJs=; fh=AWKKFj7cn567NKgMTH6BANhGBUTXU3t7qzhXydJBaFY=; b=d6VnT4jPUC86i7tfKo+/FMbnnvKnwCkHu3aHtGW9HvQqoPi1H4976k2Zuuk43UES6D J3SJNJcNLYt2q7hLVEtFK+u/G6agewJLc4jydOOBJRIdPPET2XOc7psknBkep9KbYBrr vxXuzt+scdAAIPrzl4qoW9VRC7E77U+jktMa9M/JVKGA5PdLgUokb45HAn1sWHM6oTgh 98wD3w2gAwN/j6FThlY+a7YB+geYQ4ANSXs6jV5qVbfjc9pFwXAFBXAv6hsXWajaghPP Pk8k2ttqrV5yWlxA+SefvFkEnwRb2KuHSVOwefjOfV0s6+7Sj/871Vp91y2mDLeTCOj8 UiPA==; 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-8935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-798aac9b95esi45367685a.17.2024.06.12.20.04.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:04:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8935-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2C2421C21777 for ; Thu, 13 Jun 2024 03:04:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B11112BE84; Thu, 13 Jun 2024 03:03:42 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (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 9781612DD8A for ; Thu, 13 Jun 2024 03:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247821; cv=none; b=b17cwiaoDsQtAduj+ybONGue6l7dQ4MT7kvwP5l0gGmwR1q6zjVpnEugLf00JurDibWE/aAnKz+ZW5dSwVvcVZcJS6lVqvrC4MxPl7iOh5sB+yRW1a97H6vw29IvriwVH+WpB2BQL+CiFFuqFeaX6RZm5mLxIfOwN5FnLV9bDmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247821; c=relaxed/simple; bh=QuXNssCpr6iAI/MXCOOpedGnYZuNiZvHFAAtY/z+fWs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aE2IYHNtbrhTg5haUYfBLL4cT0qwIPngzu8zKvFrAqjIvalqMcNFthCo2LwCG/cMS2/mUOGitW7xlDF/WxFsXD2q4SBAEBKmwdvMQS+Qcm7n1y++yxCy7D0MdKeMITfZB5ITRnZI4rDsdnEcS9Ek9s72YbYh2BmJaRflzTdxXn0= 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.161.47 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-oo1-f47.google.com with SMTP id 006d021491bc7-5bb24436f72so14145eaf.2 for ; Wed, 12 Jun 2024 20:03:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718247820; x=1718852620; 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=dccZ5/3CuQxaIWTMPM2TCEJVGRDx3lSvYRxYcTANQJs=; b=r1lL94rwb1+kN2D6NiuIUcdEhdB+uUN0KMG76GbSG/1Z2QLlMMPrvkfqJVkJA+kQVz NYnHjAWsx54MrGFkr4lu0lf5Ds7ZHlwoEqrVuaS2+N+An8bu7qdWFwRt7x7bPq/GhNV0 V10I1ppPVta5EXIdsTCwr1kvyfLErM/4tKgwHjeW686Klk7njI+U+pAuXR23MN3dW+ZC 9Y0ET67iLo5JRT8aPuMRJLDZ1fyrPGDY3FomIbvQj2R1hnr2R/RJ/LayXFIeMuIRqng3 /TAZ2OBsXOFHWCAhtLGhS85CAyIweTjk+E8iKCUTPD29MSlYqOubbE4ur0YjtIQb85yl gyxQ== X-Forwarded-Encrypted: i=1; AJvYcCVW1O+X+tLFGDe96z7MS/VQhDf/0McKWjdT4oeDi+53zl2rndC10OiVhOyCWmcHGcrRDysywHQmApM4JPoccj2WwTmebiaCI/cCUdaSt3E= X-Gm-Message-State: AOJu0YxQ3YYjK+4FVTZQ9KaAqG8AiSxCbnI+GgQQ6pgarPR5PA/vYqXB d4oi/y10E9zsJRwVlWNpbUy99kfVib2kKA7Rk1OPFwpcSIvAdwft X-Received: by 2002:a05:6820:f49:b0:5bb:815d:e2ab with SMTP id 006d021491bc7-5bb815de308mr3531890eaf.1.1718247819665; Wed, 12 Jun 2024 20:03:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:38 -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 25/47] wifi: mt76: mt7925: extend mt7925_mcu_sta_state_v2_tlv for per-link STA Date: Wed, 12 Jun 2024 20:02:19 -0700 Message-Id: <20240613030241.5771-26-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_state_v2_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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 9b69b4b178de..45437603763e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -1540,7 +1540,7 @@ mt7925_mcu_sta_phy_tlv(struct sk_buff *skb, static void mt7925_mcu_sta_state_v2_tlv(struct mt76_phy *mphy, struct sk_buff *skb, - struct ieee80211_sta *sta, + struct ieee80211_link_sta *link_sta, struct ieee80211_vif *vif, u8 rcpi, u8 sta_state) { @@ -1560,9 +1560,9 @@ mt7925_mcu_sta_state_v2_tlv(struct mt76_phy *mphy, struct sk_buff *skb, state = (struct sta_rec_state_v2 *)tlv; state->state = sta_state; - if (sta->deflink.vht_cap.vht_supported) { - state->vht_opmode = sta->deflink.bandwidth; - state->vht_opmode |= sta->deflink.rx_nss << + if (link_sta->vht_cap.vht_supported) { + state->vht_opmode = link_sta->bandwidth; + state->vht_opmode |= link_sta->rx_nss << IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT; } } @@ -1643,7 +1643,7 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy, mt7925_mcu_sta_eht_tlv(skb, info->link_sta->sta); mt7925_mcu_sta_rate_ctrl_tlv(skb, info->vif, info->link_sta->sta); - mt7925_mcu_sta_state_v2_tlv(phy, skb, info->link_sta->sta, + mt7925_mcu_sta_state_v2_tlv(phy, skb, info->link_sta, info->vif, info->rcpi, info->state); mt7925_mcu_sta_mld_tlv(skb, info->vif, info->link_sta->sta); -- 2.34.1