Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5260094rwe; Tue, 18 Apr 2023 04:36:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ayCJbiUlvIQpBn+TLxNs11ljLo40p9I5kDjts4WWRyY480yCxqKIRs2ziHW93me+w1zEjo X-Received: by 2002:a05:6a20:394c:b0:e9:4683:284a with SMTP id r12-20020a056a20394c00b000e94683284amr28217570pzg.4.1681817777605; Tue, 18 Apr 2023 04:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681817777; cv=none; d=google.com; s=arc-20160816; b=OsiupGvvPbVRI8wsVZwAUlZdEOM1dpt+BV3+X624IP7AlOovGV0IHn03N995ZXCgAk RJ7KmVzBey2Q6HCl7lLkePfM+roDJTjryeCnYBTT8m99sSpvU7C+Dq5SRRrI5oT8RjF+ ou0cwmJZdTA+skdxbqlMlD408smXR/pvzZ760m07KldUO7tmDSQbeHAps39hl+LZsA3l VrsnH8Q/+MDD6XAeW7GlO4+coW6+DT53fVYF4KiJETFpTq4G02NNCyd1ksPtg4GaqpPc K7p3DxyTxsnY6aGUAiZDs1ym/DiW4MauDgufoE6lVCWlumldzTRH6lCeJ7ZjwVhEPF/J 0Jrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YMtn41d62YzIGJAK7Sixo90w1YjeKEzyXpaA0ki63Ps=; b=aM9r1jmAC0U+ZYFQMX76iua/gYJYXSpJJ/j+qs5Duyg1UsQKAj7PdUeGHBGwg12hkX bAhUOTxfahXIEsWMDzaRzDn+BaItuVjECbbvY/TuD+tUd6DCmT/aGGd1o8gcdf8gLPuS VRhbqmRF6HZUCSznhuMqd0rRJn6EcSmsawib087aXl37di/Vfwh8gvxDS9zIzFMjO2WZ ugDOD1xuw9veAJBoDMfuUbFUGzN1QWPTgviIyF79QzuFEJRR98WK0ng5Xs45x1Rnc5jx hzWLrXPWCodQ2BVKfex8Tb1SV8xezgOgz6Q4wPmEBXPzVjv3Em6D8j0TdV8uRyxxLqW8 cYSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="iz/VhSjK"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a5-20020a63cd45000000b0051372e8f9b5si13871813pgj.791.2023.04.18.04.36.00; Tue, 18 Apr 2023 04:36:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="iz/VhSjK"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230032AbjDRL2d (ORCPT + 63 others); Tue, 18 Apr 2023 07:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDRL2c (ORCPT ); Tue, 18 Apr 2023 07:28:32 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D67744A5 for ; Tue, 18 Apr 2023 04:28:31 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id c9so33419308ejz.1 for ; Tue, 18 Apr 2023 04:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681817309; x=1684409309; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YMtn41d62YzIGJAK7Sixo90w1YjeKEzyXpaA0ki63Ps=; b=iz/VhSjK5hAn2E6m67XsYOxfqSJL6VRfIZ9R7ULuzMW2Itdol5B88Qqv0xpsnbrGsy omB52hLCETQccjf8Jj6y7YlpIeuKu6wO5JiEBS6Dge+inrBYau0NZhTZCXqjXBQJamCn vw4DgyUbIrABvp+v3yPVhGd/EivMbwKvn++6NjI8tLOYzrz72bwHuJ3Nq2gjmaiWB2Pl IiSY6e1SSEzrTklVXl4zuIjziPhSGmqqF9UjS+OAMTcRDcHx4x9Ms5vHotLb01tSqzk2 xR0ArFAzpQEQAvA3JCl7nVgLzNzFg2y+6naX0P2hJTi5c18Iu7hOBER81TORlA9I6OMs 3lAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681817309; x=1684409309; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YMtn41d62YzIGJAK7Sixo90w1YjeKEzyXpaA0ki63Ps=; b=DjcCenQ+nCsXIap45nLUIdGBWiUnshlIc3XbzHToGN+UIkKzFoF0OUvaLcO96hkYk2 LBFqplLGjk06UfEDp6k9VuRiya6TMMnwU1SWbCto4lszoLYnFYjkCQ1LemB5q7zqA2KS eF2BI471jsq4WPqi88MQ9rZElq/Pi4VlHpK6hUoxSnEm50Zc1q4eyoxyhp/Mq20+3/Z7 AEm+XaPnUfzteGZCVGf4rgEUkC/7aMoswHoyW3+nPG+RevNO+xV1nRRzk2KTVLkG9/4c ov9Q3zdKRKO8yBMsnRbAjpu0PSKTTShj9GPIN7w469Jv11ulkmC9EqoeNsxgQO9OVSDe GmGA== X-Gm-Message-State: AAQBX9f+kKxzYEqlQQw/vNx6xC6dKI9srK+JJmbePXHnDcK+P4A8i/8+ xy3yREADhlg7p5hbln5CKTXQM8XUE7M= X-Received: by 2002:a17:906:856:b0:94e:f1b9:e933 with SMTP id f22-20020a170906085600b0094ef1b9e933mr9559194ejd.53.1681817309539; Tue, 18 Apr 2023 04:28:29 -0700 (PDT) Received: from [192.168.1.50] ([81.196.40.55]) by smtp.gmail.com with ESMTPSA id j25-20020a1709062a1900b0094f614e43d0sm3466511eje.8.2023.04.18.04.28.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 04:28:29 -0700 (PDT) Message-ID: Date: Tue, 18 Apr 2023 14:28:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 3/3] wifi: rtl8xxxu: Simplify setting the initial gain To: Ping-Ke Shih , "linux-wireless@vger.kernel.org" Cc: Jes Sorensen References: <5d839cb6cea043de9f79f6490f9ccfb2@realtek.com> Content-Language: en-US From: Bitterblue Smith In-Reply-To: <5d839cb6cea043de9f79f6490f9ccfb2@realtek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 18/04/2023 04:13, Ping-Ke Shih wrote: > > >> -----Original Message----- >> From: Bitterblue Smith >> Sent: Tuesday, April 18, 2023 1:08 AM >> To: linux-wireless@vger.kernel.org >> Cc: Jes Sorensen ; Ping-Ke Shih >> Subject: [PATCH 3/3] wifi: rtl8xxxu: Simplify setting the initial gain >> >> The goal of writing 0x6954341e / 0x6955341e to REG_OFDM0_XA_AGC_CORE1 >> appears to be setting the initial gain, which is stored in bits 0..6. >> Bits 7..31 are the same as what the phy init tables write. >> >> Modify only bits 0..6 so that we don't have to care about the values >> of the others. This way we don't have to add another "else if" for the >> RTL8192FU. >> >> Why we need to change the initial gain from the default 0x20 to 0x1e? >> Not sure. Some of the vendor drivers change it to 0x1e before scanning >> and then restore it to the original value after. > > When WiFi gets connected, it will try to adjust initial gain for target AP. > If we scan in this situation, change it to 0x1e to have better coverage to > find APs. > I see. I'll remember that if I implement the dynamic initial gain.