Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2159910iof; Tue, 7 Jun 2022 21:45:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzitH8BSREyBLKyc/TTBcLJ13EmaGwwDOav8kYApBAabyT3eyQ6Tzl72xG5ZBEwlJFuu7j0 X-Received: by 2002:a17:903:32cb:b0:164:818:d40f with SMTP id i11-20020a17090332cb00b001640818d40fmr32254112plr.126.1654663514117; Tue, 07 Jun 2022 21:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663514; cv=none; d=google.com; s=arc-20160816; b=BiB/giSZJ5GHZdZ29A/hZIR54prel/BTjjZ/gXRrp0hFLNhES1T37mDhedyDpaX3pe 4WmcIWhhZh4/LqLrkl6W0reaPWpl4ppN2jLgk1Vyv8EgVQkmVVPLvekAwrMG1d3inwZO RjHzH7dnE1pXqopJ1p3MrMo6juIAFMQWrBOTZFHVvv7WdddWmIuc+0mDm3mJ2DCs8naP BK7PWXL9ApjObvn1lCRI6tA7UvlzksczXiP2mdQnz6z0zzc0s8jkiz+QltKp10Iq2Tu6 iTXc3lT3aXBK0b+cYlDkrUOthbnqzNFDyY3ohtKvORhcuoRZAk0CKyqC6AyS37edSORW AQeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IZeeHihZ4sVBRJsUHsEw5eob/TcER6IhCt1Cts+HW3A=; b=AClfPy8xo+Jx6eQqQBjYvlUrXvhL5tP7r90LZ/P/wsgDtZJL9ElNJSX8H6jhPX6mo5 opXoDMs4wiDBYU5XhtFwcHQ9nbb5evzEk+lEM3/ST6+Y9Ms1HUyE4J0AV9nRpbvg1Nup Ae+6+FEcu5K0XlyAu+fK2kS+7AWk7BGOpL1OOjem8xZzjkfIroeRMcZLg8OtCdW7ma61 G0YQWghaRACy76yZQmxm8VJ7VGpGPqI3YVcXL7+IKGdAboQfcUX28wiulz/kl8OcGDvR mIt84ZihB2wt9InRGxPB1lUbxazlUhKyfj5/6O4VoFKcBjgzh08s0X7cPp4a+Dh4AKuz dAGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VmQ6XtZT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 185-20020a6302c2000000b003fcae53b1f1si11142675pgc.173.2022.06.07.21.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VmQ6XtZT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4029945A9C3; Tue, 7 Jun 2022 21:23:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346125AbiFGRWM (ORCPT + 99 others); Tue, 7 Jun 2022 13:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345938AbiFGRUF (ORCPT ); Tue, 7 Jun 2022 13:20:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE11510657F; Tue, 7 Jun 2022 10:19:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F06FDB822B1; Tue, 7 Jun 2022 17:19:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6567DC34119; Tue, 7 Jun 2022 17:19:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622391; bh=6GPI7gYf07+zFN1Ol/tp6iH7PZSLrK3qLnRFMdReihY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VmQ6XtZTrM6G4EKhawzUi3tZP02t4oOYAvyw1Hmtn5dReoLdjXiGigEWY+MwT9an7 r8JRi/YHFXcZ+4l/fQ48fS3xdrWiWxBufCo7x5yzPd1lOq6EKIQc573NTTmL6fnkl3 mNq2bg8SO8lfOGDcrjH9cw78wzYaaVwjADPrNAYc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Thibaut=20VAR=C3=88NE?= , Felix Fietkau , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 043/452] ath9k: fix QCA9561 PA bias level Date: Tue, 7 Jun 2022 18:58:20 +0200 Message-Id: <20220607164909.831571207@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-kernel@vger.kernel.org From: Thibaut VARÈNE [ Upstream commit e999a5da28a0e0f7de242d841ef7d5e48f4646ae ] This patch fixes an invalid TX PA DC bias level on QCA9561, which results in a very low output power and very low throughput as devices are further away from the AP (compared to other 2.4GHz APs). This patch was suggested by Felix Fietkau, who noted[1]: "The value written to that register is wrong, because while the mask definition AR_CH0_TOP2_XPABIASLVL uses a different value for 9561, the shift definition AR_CH0_TOP2_XPABIASLVL_S is hardcoded to 12, which is wrong for 9561." In real life testing, without this patch the 2.4GHz throughput on Yuncore XD3200 is around 10Mbps sitting next to the AP, and closer to practical maximum with the patch applied. [1] https://lore.kernel.org/all/91c58969-c60e-2f41-00ac-737786d435ae@nbd.name Signed-off-by: Thibaut VARÈNE Acked-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220417145145.1847-1-hacks+kernel@slashdirt.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index a171dbb29fbb..ad949eb02f3d 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h @@ -720,7 +720,7 @@ #define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \ (AR_SREV_9462(ah) ? 0x16290 : 0x16284)) #define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000) -#define AR_CH0_TOP2_XPABIASLVL_S 12 +#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12) #define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \ ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \ -- 2.35.1