Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1436782lqt; Wed, 20 Mar 2024 04:13:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVurKw2HdjimEhTUE9B6dffRZ3z2XFD9FqnYyi4x808DAABZvB81IZmkDx/ryfj7nu503KRmi++a+CYI2CHQNta7JXquPZxpD9sCkOUYQ== X-Google-Smtp-Source: AGHT+IGLTPgRGlk2KDD6FRHlkGwqiBI2xnhj8eMmQ7Awd5B/CGpHkI0iJwp4zWQz19YF4D8jGDtU X-Received: by 2002:a17:90b:3595:b0:29b:b1f3:c4ab with SMTP id mm21-20020a17090b359500b0029bb1f3c4abmr11613041pjb.46.1710933188763; Wed, 20 Mar 2024 04:13:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710933188; cv=pass; d=google.com; s=arc-20160816; b=xCoTwhegyiDdYMJgoGMqzgC8fAG7wItxrDc+v25Vg+YqKJMj1vhBuNHmlI1eaA6GeS 962c0aijfrXdO2GAFm04l6FsfaI3p3/soxMwtYMkLUIiJ3DShh/0LrVBY+Gmn4rVlfZC wZF0Dca4wkBsvDZUDoSskcdtO+px7vKWDTn7babiKebU4VF/2yvPMUSydT44hsLk+Xtp HBfNG63TjwTYk5Y3iVxplWMya6SuSj+3gU/1FDDTOE3sjZbKD0lEVCbJqAEbe5nlMjbW a0csMk/WFu9SCDNp/a3OeyfkUvpXWbvihWK6M1B54lImx1IrJX8CVUByjMsR+cYW3gtS flWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qHFq/SHYWwmMrxqEzdo+SS/aNsqA6ziw9jOujhP9PYE=; fh=7C7YVp+0PjKaRfztwfnK3t116drZsM1TAGznzzXJkag=; b=lmrWVc52+TQjAwdohIsr9qK+9U3JTJjO3wcWKEkBw8OL2KZqI3ULDg25XVd2ImjZXI 1fSkL6vhGIcYWjzBgS9LaLLTXeu8IPCRukCg0anSuGqrDsS+DFq61Np30NpTfpbpqPO4 0j6iS688JJJ3U2HT2b7wSB9UlTgYElfJ7iZ06my+9IttECrGhuML61jeWsP6X1WFzVKV QmH0hy1mkPgMQ1a//IdeFL1KpEVmBnDEFLIF+RjZHE/zeLfg/YQMoGz96ypl8YeA4hnB DeQo0OjJnTEL0oq3G8nTIL6tNiinGl1t5119GvirnSNYnaWJgiIPBZZVVXRQ6gEkp0Cv 9ZPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DdAfNmpq; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-4978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id oc1-20020a17090b1c0100b0029bf9be6b4dsi1306758pjb.30.2024.03.20.04.13.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 04:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DdAfNmpq; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-4978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3920FB227BA for ; Wed, 20 Mar 2024 11:10:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 398863FE48; Wed, 20 Mar 2024 11:09:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="DdAfNmpq" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 400973FBBD for ; Wed, 20 Mar 2024 11:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710932980; cv=none; b=JfId11wfIT6DtE+MYHIGJrNt+32hXubSyrDQ+9bojc+uwgli/Z77FQLtFBoLSAEX6DoLRrmEcydXICcGssWNCshOn98x9Osid+WnwgSk+aynP0VoByjIN7uFJYZbUpv8egqnqDi8AAezXv3dT1Fqi06++HMLTHiQIt+3XabT1XA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710932980; c=relaxed/simple; bh=Nu0iw3rfJrRFteva0XOjZqgHtrAK0NABa8uRjEGyA3o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E9qf5Qr+bUiTG8clR+fhVRhRM9u1myiWa5QhlTf7o1iHXjS362blaYh2ZE78WwbeAuUwk3GdYy2fDtPAGNCLPZ1uUgabPC5XNSZurH/RD9H9SXhsirgfhhnrTzL9+xa6M6tcBlIvtsr+PWpnRo/D5u5k16YO+VGRmQM+hJjxbfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=DdAfNmpq; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 50660752e6aa11ee935d6952f98a51a9-20240320 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=qHFq/SHYWwmMrxqEzdo+SS/aNsqA6ziw9jOujhP9PYE=; b=DdAfNmpqefUoT18qqyU5epKKXWrQJe6MFBhgzRJko3ENiBwTzyljijgxX0q4ght7rtF90y4TufzVbitoXn/6k+bPKpNZFCzESp/RBUGbdoQzksQA2dmNunN+4QUorjiME0+eHGEUpHPLL6GJ5mf2sQRkSRvB5PtvQ1dmPOxWrcg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:c5e9300c-f843-4738-a986-a13d4849fcc6,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6f543d0,CLOUDID:83443985-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 50660752e6aa11ee935d6952f98a51a9-20240320 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2096128869; Wed, 20 Mar 2024 19:09:26 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 20 Mar 2024 19:09:23 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 20 Mar 2024 19:09:23 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Peter Chiu , Shayne Chen Subject: [PATCH 03/10] wifi: mt76: mt7996: set RCPI value in rate control command Date: Wed, 20 Mar 2024 19:09:11 +0800 Message-ID: <20240320110918.3488-3-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240320110918.3488-1-shayne.chen@mediatek.com> References: <20240320110918.3488-1-shayne.chen@mediatek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--1.180700-8.000000 X-TMASE-MatchedRID: QbPx/KKIOtkVAKRaMHqjDuqwWVBfMuvoiXPf/NTPc3L7a38GZa638/9T oIqmlx19ThbvLLI8RvPySrCMyCN+k7f0EuHoGRzuXP5rFAucBUF9LQinZ4QefPcjNeVeWlqY+gt Hj7OwNO22utO5qEfOUcvaotXfhHsZS0JIXn46gU++kqPMl4Gd85C8Y298Z3DOAzbuP/fdBgNF+R fkwBqz1SePOtBmr2D8XDMWiox8SpCKT2uf3M1sLUma3zYT97IFAYfQIAUhBayZvmCbKVb49sZL6 x5U/HriPpCuffGH9zI= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.180700-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 51CF1722E20EA23050E6926241C88091E4E8080300A86576510A5276BDA6BBDE2000:8 X-MTK: N From: Peter Chiu Set RCPI values in mt7996_mcu_sta_rate_ctrl_tlv(), which can make the FW rate control algorithm be initialized with a better MCS selection table. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c index fd0cc945b22a..ddd93ec1dddd 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -1968,6 +1968,7 @@ static void mt7996_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7996_dev *dev, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { +#define INIT_RCPI 180 struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv; struct mt76_phy *mphy = mvif->phy->mt76; struct cfg80211_chan_def *chandef = &mphy->chandef; @@ -2065,6 +2066,8 @@ mt7996_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7996_dev *dev, IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP); } ra->sta_cap = cpu_to_le32(cap); + + memset(ra->rx_rcpi, INIT_RCPI, sizeof(ra->rx_rcpi)); } int mt7996_mcu_add_rate_ctrl(struct mt7996_dev *dev, struct ieee80211_vif *vif, -- 2.39.2