Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp129338lqq; Wed, 12 Jun 2024 20:03:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLBEtxJMYYgmLOXDTimpgkEAxUC0AmCbxuxfq+yRcpwV/9Xi0NMpqAc9QHFU2h/19HELfOGw/ItxO3rWFxlWIepnrbCnfVE1jVG69hrg== X-Google-Smtp-Source: AGHT+IF8RHele6AVKiBWWefn/LQKtigQ8VjZghf4zBcs1YcdlVbeIuVRVdFh+SMh43GefVbRiTfY X-Received: by 2002:a17:906:fc04:b0:a6f:1f66:833d with SMTP id a640c23a62f3a-a6f47d35ad9mr189209566b.9.1718247817599; Wed, 12 Jun 2024 20:03:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718247817; cv=pass; d=google.com; s=arc-20160816; b=JxHNk2T4hHSiOCTh603wNCjGjEGvM9wlLGR6YVw3a8uWMwPVZvU/qRMfjIMWTDRjKD Pd5IKqYKj+4in9tLmcBKfaGZAKBlh64wWBUMlQ3vyvnisZYt3tm2MklC6SpekmJiRD76 twnDNKEw1JHxKCWGhJ4pcFVjoLhoJfZ61Y32tCVitcR8dz2MmNgM0m73fmio9jadyriw zoMuo9hTFfmHhF8feQBx33xbW7/S7JsOmKmV3vyI/qKEnmzofFDQQh8f6q+jsWzCrTFt Ex9b6Uj2im94Bh7k/Jm5/7QkIcdiHdTKpv5m0l2C49dKi/ed6YWQBHHYa+jSLRELUQop 3V9Q== 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=pQHpQNEsytBYs2FLiCmUpTPqTQTP3NJD/MKbmAcXuJk=; fh=cTq9JASv4gCV/ARDnkZdYbozISUmIMsK2pvVhcZOjAo=; b=UOR0jaG8JiL3xH0ele/ui9mS/oyCbAjSz5q7UNji57/Y/VHB4Ac3Ka6ek4atYW2NFu Yi/TJXgsWBij2A5QZP/ky6uYkdxaxWzou29NmLJdw/oEH9Ns4ZJMeJrC/fbVxFGsdJo8 V8I7jHmPLJ65n+hgEm1Te8Q87FIgf9fjWU73QTyLpQFsCBEKOZAJr3Wd+TRg7ugmUteW JHxXdvBW9EeOtIWv7oWWnSo2LOwWyWfIpbEMO/zPt/vtfMZqwgQ1TbyyQ64sObW0IaMl zBdon/jwDiYUCpaGkzTgLV4h8nWBqViyo6RoNHIpywrJcfVnATfBaR4t+IahjukHUIsH OVUA==; 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-8921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8921-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 a640c23a62f3a-a6f56e3b49dsi19576166b.823.2024.06.12.20.03.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8921-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-8921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8921-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 536441F21633 for ; Thu, 13 Jun 2024 03:03:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8083B18028; Thu, 13 Jun 2024 03:03:13 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (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 1018212D1F6 for ; Thu, 13 Jun 2024 03:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247793; cv=none; b=Bsmh+5CRX5CN1zkgJg22JQBX59xZNrNGwQGb79Kqqn4lCfKKrEgCTKAlUwOtHeS2vaGRN1YuyGS1le6LfmXrn3i2h2kxfc3/6BgPpZ4cgD3vqlx32IzdLDbsxDDZH3vtrj09ASHWnxppe1b/PGixpWZRStCtdqDeTk2en1R0Ws8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718247793; c=relaxed/simple; bh=IXqV1O3S4gEuJh566HxUR76On4HvwLVKlwCuBwwUXBQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Vg86RvY/gjAevut+PRGyFPdb2IZkmQwattb1byBDgEUSU4JxMnNe1K6ZRlFZXS9yUY/8N2VF7Qtd4Sr/fwNObjV7ayR7wiNJB2olaX/h5VeAF4x3nlz49BPYVSNPW+IkL5wklYzLqsEDlDbOWjs7OoCQVDtHrYaWJURdLdI99H0= 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.41 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-f41.google.com with SMTP id 006d021491bc7-5bad97708efso31430eaf.1 for ; Wed, 12 Jun 2024 20:03:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718247791; x=1718852591; 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=pQHpQNEsytBYs2FLiCmUpTPqTQTP3NJD/MKbmAcXuJk=; b=d3zjlhinyL1I0kDp0SpNb1pX3U/xgWfgwwc02N43yhmE8iucwvLHFvREQchLCShEPj GAz2nsE0AsjMx9/udHug1SoL02W7mrv0UqtenXmhbyxvdY1xWzsA85bQGfxUdddQrccF SYA28mWeSooNBVJLPDLU3ZbaMdIJDR658Hld6g+VWRVN7R34Ux4OYnpnSEsn4ZTIFe2p 2/bkGCGQRMB8ABq6H5m+jKIzR+2wjWvoJTwVCku09PJGHnu3dkqx9RRVsSmS06mdoVkK EUh8GxLjVdZMNwb1kj6GmsLcYHg39YDBflZpaIIBobxPz7B/qte2ko6dZW8Z59mWbE7w iqsg== X-Forwarded-Encrypted: i=1; AJvYcCXhiLgw8fZmV/n4mn+fwAEs5xxJXjTsOo0x7Q/NtDMXBF4Z9IYCDorQYml0j8izki+CDSJdg/XANySW19HWdO06Zy4S7d9ev4kuU5SqmSk= X-Gm-Message-State: AOJu0YwhTxEBxAzLCiDTINcSdMj3Qh4qqoQJmOS17uBySSFFz3uT0vQT SAQraxQj/VJSzrSoE8ikj6Fi+DzBNbmZm4ui2/Q38EQmz0pRmI7o X-Received: by 2002:a4a:a5ca:0:b0:5ba:e11d:a2ae with SMTP id 006d021491bc7-5bb3b9f4ef7mr3671269eaf.1.1718247790954; Wed, 12 Jun 2024 20:03:10 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:03:09 -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 11/47] wifi: mt76: mt7925: extend mt7925_mcu_bss_he_tlv for per-link BSS Date: Wed, 12 Jun 2024 20:02:05 -0700 Message-Id: <20240613030241.5771-12-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_bss_he_tlv 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/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 10e38637eb83..533214403008 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -2238,7 +2238,7 @@ mt7925_mcu_bss_qos_tlv(struct sk_buff *skb, struct ieee80211_vif *vif) } static void -mt7925_mcu_bss_he_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, +mt7925_mcu_bss_he_tlv(struct sk_buff *skb, struct ieee80211_bss_conf *link_conf, struct mt792x_phy *phy) { #define DEFAULT_HE_PE_DURATION 4 @@ -2247,16 +2247,16 @@ mt7925_mcu_bss_he_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, struct bss_info_uni_he *he; struct tlv *tlv; - cap = mt76_connac_get_he_phy_cap(phy->mt76, vif); + cap = mt76_connac_get_he_phy_cap(phy->mt76, link_conf->vif); tlv = mt76_connac_mcu_add_tlv(skb, UNI_BSS_INFO_HE_BASIC, sizeof(*he)); he = (struct bss_info_uni_he *)tlv; - he->he_pe_duration = vif->bss_conf.htc_trig_based_pkt_ext; + he->he_pe_duration = link_conf->htc_trig_based_pkt_ext; if (!he->he_pe_duration) he->he_pe_duration = DEFAULT_HE_PE_DURATION; - he->he_rts_thres = cpu_to_le16(vif->bss_conf.frame_time_rts_th); + he->he_rts_thres = cpu_to_le16(link_conf->frame_time_rts_th); if (!he->he_rts_thres) he->he_rts_thres = cpu_to_le16(DEFAULT_HE_DURATION_RTS_THRES); @@ -2341,7 +2341,7 @@ int mt7925_mcu_add_bss_info(struct mt792x_phy *phy, mt7925_mcu_bss_ifs_tlv(skb, link_conf); if (link_conf->he_support) { - mt7925_mcu_bss_he_tlv(skb, link_conf->vif, phy); + mt7925_mcu_bss_he_tlv(skb, link_conf, phy); mt7925_mcu_bss_color_tlv(skb, link_conf, enable); } -- 2.34.1