Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2621256lqz; Wed, 3 Apr 2024 03:53:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUm4pC3v7ThXsbE9qdgxjIMiWbZ2Hy+6HRFBZFwo3eFPl4to3x2idx3ROiq08vcAYW3Od4HCNPETBILxJnZ6CuO7QpFyITtZ6CN8zLjg== X-Google-Smtp-Source: AGHT+IHSt8DHN5hGJLTGHGiDASLrKmPb7CVlvgOKw9h9diForc/s07ZFdWfOlD/o0kTxTv8REejr X-Received: by 2002:a05:6122:1782:b0:4cb:56c5:5816 with SMTP id o2-20020a056122178200b004cb56c55816mr2661708vkf.12.1712141631684; Wed, 03 Apr 2024 03:53:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712141631; cv=pass; d=google.com; s=arc-20160816; b=RAbhymit63FmiXJOTurrfpVId7os20G/1sASTzsCAe6R8LJgSyTePErKOsE/Y0bfdp mzamIX16kAOXvLhI8OS9wKkra/+Brrv0oTo/m0MwR/R8HFfHQ/ZTUfbyv73XkXh9f+LV 4qF+K4Ri9LShS11wDiDee5mqGUssyvdAyKNfUub+fetTiAlS9wpoSaAN+38+vAIcROmV 7ZLIWq70FSow5P1ZI9gW+pltHog5mWe6xOIkknor/HZ8tjdqDPN0QTCcL5DmQEdDoCjG 41IYy8t3vXLMPyYbGni/pWwqjvFuGMn/oSZD8TkHrGAOVfThZeO25azzlfkaVXua6Sg2 6bqw== 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:message-id:date:subject:to:from :dkim-signature; bh=Bi8CmWyYC3S1OMhHBGv7//trnZFH8HiYjc/gqU4+eZo=; fh=qW0phhq3fb3oiohK/Mu9j1KY1zyRNiiioKFc5anvatM=; b=ovU/Ld1eHB/qSXLOwTktiMAwYyLyHY4DwaKjeFMpcz85yMkj5royGvbHBSPNSnJUWH ViBkUtX075Wc8/Se0GzGtN0ZBB3dh0FKJ0Qr2DvLk/9/1JprCCrv8xKE8vOnvY6bpyGp m8eBErTzYRfpDpTED5Re5HQ2JnVx9kvh4sVx6jVrZvI4FFD3YCUg59kSkB/TQmX4vEWU 4vNVO2TBmLnWIYJMfXhX7WyeoKSMHxjUC2/SDhadhk9Z2m5SlFh5mH0t8XMtywt0qMbr Clo+5PK2eOBW4hiyrNc2tKHgbo5iNlgYgRK4Sx8Dt5jPclpSr8zDAyts8in0yABbWx3P CPiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Bz5uJPRW; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-5798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id df13-20020a056214080d00b0068fd34ed059si14137005qvb.291.2024.04.03.03.53.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 03:53:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5798-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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Bz5uJPRW; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-5798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name 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 1D3071C226A4 for ; Wed, 3 Apr 2024 10:53:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6F547317F; Wed, 3 Apr 2024 10:52:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="Bz5uJPRW" X-Original-To: linux-wireless@vger.kernel.org Received: from nbd.name (nbd.name [46.4.11.11]) (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 AD61F1411D6 for ; Wed, 3 Apr 2024 10:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712141569; cv=none; b=Pp2b93nMJVUChiSvUqP2SWb62sdnSUwhLsRRgijnQ/QoBLxUnwmgP26FoR71AUS6NICUkqVenNJSiadxorLt1y11xhXDLqKH9bHHSZ8Y0j21AoPJADm0vxWtkj56Fq9zMGyOitQ8uG4m0jZ2dfVcI5gbaOZvPGqdBMvo7Q6z63Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712141569; c=relaxed/simple; bh=+0hKOhgqBsmGI7VoeFqWOQwM0SZXh84wljtnBWsmjjo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=e4SQjg3E3s+VuxYcjg3O9MDSFh9NoKpwyEvv9Fu5PSCXndvKAcj60dfLY82OizCZL7IsCsczdyZvHlbyBg1BK/kxXWOa3D3WmcmZNjAEHl0ds1evdrRgq26NUuuCmdGAFOiIbkSVQoo7jwzsUz0oCo1wXOSkansWp6N8SjgeKS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=Bz5uJPRW; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Bi8CmWyYC3S1OMhHBGv7//trnZFH8HiYjc/gqU4+eZo=; b=Bz5uJPRWqBMRaLiO9bu5bzX6Ug Zux7MwEMiFN6QfRaclhKNcLQcCrQEQotHYHWpbKmaSuJVuVrZZc7eRjF4o75Q08y8feoslj68uF2K tW7zhi8Y22hsjfQno5pdVH1tGcBaVZ6ot5Q3OoznekA4d4aiYgrybPsXIwv4MayBM5nQ=; Received: from p54ae9c93.dip0.t-ipconnect.de ([84.174.156.147] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1rrxt2-00CgfA-Rj for linux-wireless@vger.kernel.org; Wed, 03 Apr 2024 12:30:32 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 01/13] wifi: mt76: mt7915: initialize rssi on adding stations Date: Wed, 3 Apr 2024 12:30:20 +0200 Message-ID: <20240403103032.54823-1-nbd@nbd.name> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Improves initial rate selection after connecting Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 3709d18da0e6..49d5b459fb44 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -744,6 +744,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; bool ext_phy = mvif->phy != &dev->phy; int ret, idx; + u32 addr; idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA); if (idx < 0) @@ -767,6 +768,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, if (ret) return ret; + addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 30); + mt76_rmw_field(dev, addr, GENMASK(7, 0), 0xa0); + return mt7915_mcu_add_rate_ctrl(dev, vif, sta, false); } -- 2.43.0