Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp129257lqq; Wed, 12 Jun 2024 20:03:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtLT7Uq31wLrx1fnG3YvLwfHB+2XHSoWdEwYSBZ+41/pSZb4TU4VSZBDs1vEXacFBIuzO0eh2UrmFOvuKc3NFtXa5Wa5MuUern4t5kiQ== X-Google-Smtp-Source: AGHT+IF+BtHks1RunBXCccTwexld34aER4dzcjl/ZruOGkG1M+ZRf65G+kDZ5PCSySFNxoYOxECq X-Received: by 2002:a81:8d49:0:b0:627:ee15:a92d with SMTP id 00721157ae682-62fbbee2db0mr35645097b3.19.1718247805622; Wed, 12 Jun 2024 20:03:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718247805; cv=pass; d=google.com; s=arc-20160816; b=rsGBIXlDMDrkBsrfU+oqUBWgzRAusnipbjeYB0RjZtwSXGLVJChDYxQILZoI6WcZWW 6FHPrKuBaghiUPx+A7WcmTyocYS3Fc0oNQOvFOiiQZYtrAhQi3W/IStyjUSmWjlPlO8G VtjzAYDF4CJoZZ5YeqSXMTEAC7yCK+krzXwCX5Ya0sajmtSiald48xK8IRRqGwCjIbqq Kr9HpfycGUA9Bgpp7Ffq8TWEyvR7fm2D2RnFQu4+z0mGWTAucjeaaFtON1fsmBZkKrkl o0QM3j6EnH0OImjiOpff4zTVq4wUgCzXjkE7o9X6BvInRPNni/9ZUPH1STo88718ejm5 EIWg== 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=tk2KfDSTIKehiWysrLk9gdpwiwyKzUSH27r7ZuD+Tno=; fh=y9LkEnf8fcmleNjGtP3yHhC4n3JdjujBdD6PeyPgjsI=; b=eZXp7Zln7b2Pn96m1CEIJwJvIeCjZINqAb+2+3WUNz21+dyYqEb4FjjfiPhh3cdRvZ rU8fWLjJQ3ZX7wQiF4ga2mwm/OanVqzYa4XF34sveAyASA5/XbG+KoeKMCb6m3U33EgZ iZ0vLbBxWMT3UKEFnUXZdgsUVKpDJfIxssHGpXb7XlUkoY6WfaFvfzZtciWlghW09s5m EeDkmIQY45db336V7JvL9V36IN6ImJGv7QJkszB8iHC0pjT0UujKBa26Yp/Tnh5KOvDk 9YE9hFk176Mug9JEFBNdnsxL3AYURQfcPr4quC59hbZaY+ctHQoNfVoxxjqv+WzH2EnQ gE+Q==; 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-8918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8918-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. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b2a88fsi5260266d6.343.2024.06.12.20.03.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8918-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 386421C21385 for ; Thu, 13 Jun 2024 03:03:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF71C12CDBC; Thu, 13 Jun 2024 03:03:06 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (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 3DB0312D761 for ; Thu, 13 Jun 2024 03:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247786; cv=none; b=ZH0yC5MiYBOguuQiP2i6TSo6WKoreWHIqp/G7YbmS1qYa00WfnfDj7e6oUqyp6sh71E2Z88ePgdson/uHgwrMSGX3FOPrxVWxDYiXcFJpkBN7AsOWIvoEqbm2GXxtE6H9wWnFCKCLiIo4vqnHiG5EeFDV4eSqfx4gws9jBRiQfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247786; c=relaxed/simple; bh=+7ToAbl3gbxstCLlL43SN8x97eaQW3/ezVyS/mKkyo0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QUqjKZ7UpZo/6hiDDUfx85eFAt96N32PhsfgTDnwurRsvT+OvFX8T7i7/Hqf3NKRAR2zL4Ao42cTT17iqXu3d+PGFknh+UUnFZk1I6w3pxtfxVG+39/5zi2C8+BrFKk788UQwH0UZxN0Pl06Z4G/g2IACLPPwA0h/qalFuBbcU4= 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.167.173 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-oi1-f173.google.com with SMTP id 5614622812f47-3d1b8bacf67so76791b6e.2 for ; Wed, 12 Jun 2024 20:03:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718247784; x=1718852584; 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=tk2KfDSTIKehiWysrLk9gdpwiwyKzUSH27r7ZuD+Tno=; b=Mp8SGRG5D9m/ZapzSR9U4C/jInLxQ5ITwZDxBwSCWO/dM5gpRQ9pzWPghv8dSBKYlY DB2ImgmF8PNJWhYmLegrYO4s0qg0u91SOPWeHyHiBAkxacPBaUrBLtjAODU2NAJgty5a pe1q9PE/o24BlP3FxNk4+mRmzmViRKXCw/rKslF+AxUNZkYOwJk04cKrDMHip1D4wFsl 9x/D52+4I24dTlXW47dADijrm0yNugmpYuSYALneS2zoqFySOlJzVClaxMA90sfLAD7V ZwMZeuqBLPBcjzuoK8oQHwzUxuzIuwRUSNs5KRQsDrm/5lPbTTHrOlCe9JCnWwDtnka9 K0Og== X-Forwarded-Encrypted: i=1; AJvYcCUVYFyooulPZDNMP7cUqDWeQ3hw0L1qGJ0gaYjNGinmQZ5pnQkcy2J8jh/6bkZE/kpfRPlzd6Tx9iP4izBE+w1XPnkF0+Wf4q/AZ85w4+E= X-Gm-Message-State: AOJu0YyrsOZPNujB4JodTfZtrzOD9E3vZ5W0RFiXNhJUHNxQ4fu1DQZX rpG8qLPpTIApCn0SV4kM+2KOLsrLgaSKNXmLVNq/mWHNKbUKrx7HceWyndeSvnc= X-Received: by 2002:a05:6820:d88:b0:5ba:ead2:c742 with SMTP id 006d021491bc7-5bb3b7a3d2bmr3670796eaf.0.1718247784338; Wed, 12 Jun 2024 20:03:04 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:03 -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 08/47] wifi: mt76: mt7925: extend mt7925_mcu_set_timing for per-link BSS Date: Wed, 12 Jun 2024 20:02:02 -0700 Message-Id: <20240613030241.5771-9-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_set_timing with per-link BSS 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: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang --- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c index 7b9deb586b34..6a1afff92399 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c @@ -1400,7 +1400,7 @@ static void mt7925_link_info_changed(struct ieee80211_hw *hw, if (slottime != phy->slottime) { phy->slottime = slottime; - mt7925_mcu_set_timing(phy, vif); + mt7925_mcu_set_timing(phy, info); } } diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index fb261ee525be..b82cc1bd09b6 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -2296,9 +2296,9 @@ mt7925_mcu_bss_ifs_tlv(struct sk_buff *skb, struct ieee80211_vif *vif) } int mt7925_mcu_set_timing(struct mt792x_phy *phy, - struct ieee80211_vif *vif) + struct ieee80211_bss_conf *link_conf) { - struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; + struct mt792x_vif *mvif = (struct mt792x_vif *)link_conf->vif->drv_priv; struct mt792x_dev *dev = phy->dev; struct sk_buff *skb; @@ -2307,7 +2307,7 @@ int mt7925_mcu_set_timing(struct mt792x_phy *phy, if (IS_ERR(skb)) return PTR_ERR(skb); - mt7925_mcu_bss_ifs_tlv(skb, vif); + mt7925_mcu_bss_ifs_tlv(skb, link_conf->vif); return mt76_mcu_skb_send_msg(&dev->mt76, skb, MCU_UNI_CMD(BSS_INFO_UPDATE), true); diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h index c692996e057c..d3584743c266 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h @@ -582,7 +582,7 @@ int mt7925_mcu_add_bss_info(struct mt792x_phy *phy, struct ieee80211_sta *sta, int enable); int mt7925_mcu_set_timing(struct mt792x_phy *phy, - struct ieee80211_vif *vif); + struct ieee80211_bss_conf *link_conf); int mt7925_mcu_set_deep_sleep(struct mt792x_dev *dev, bool enable); int mt7925_mcu_set_channel_domain(struct mt76_phy *phy); int mt7925_mcu_set_radio_en(struct mt792x_phy *phy, bool enable); -- 2.34.1