Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp595407iog; Mon, 13 Jun 2022 08:49:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3JU/QDsOu2eY/2CSe71qth8ErrVF9bL21+CmfsPctz60ThBo+tz/9l4q378SC5U8aQ/y+ X-Received: by 2002:aa7:c84d:0:b0:431:4226:70c9 with SMTP id g13-20020aa7c84d000000b00431422670c9mr397485edt.51.1655135366994; Mon, 13 Jun 2022 08:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655135366; cv=none; d=google.com; s=arc-20160816; b=QpJ8BIyg+yRqsJDanpt0c+MXBxXnBRQQAXJsNsHj2BPhDIoTqjj9aKfncjlUWxPQvv eBxABfRGibttfaNEXGWeyWLpWoOGXHtTKQKIaGq/MqNPGESjg/VfZQ0CzeYnix1MZSlH 6iL9bFkUH9FTF7zRzB8CENA1/RTECn87I+W6CeXcABvmsH2nC/rZv8K0MGA36ZPVW3a1 dh8vrv45EBi0e+zSXNWLG/fPDNCfpfqhnXohVObYTO92s1CsdaaklzOx9kmKDhV8hgIW JjGoxLsmN0ZiEs79dw1llzg4Px4RJBLdApsHiwltnzB+hWlpu2yVTxgcYSqbT8gcPURC iuSA== 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=P8VKZLmHm6AVbJU/dQ5BuvOgwAm3ZPRTVu0ukkg+y4GGObQYHHf0f/oS2PaoaMjzB0 q+4SuJXcTUH5Yz5xDocZNonlMx2P2Dw+jakADL25T5t1G5EVGEHVDFutBa+hhbKRpVtt eXDWcmpUjz7bXLX+Uy1eZX6uyVFsxyFKxvDcVR1K52tXmi4G7e41zlfqs4OPspx7d86n zUScUtvjGFYhw4KrW2Htah3yg1VdnDoSWrDPdAudt1Gm4B34sn+XvSYfVdzjntj8MTJ5 bMD5z4AOwdtMQc0gAy+lnrwyMglJ7HBtm5pJZMf9URavFyiN1kO1GArUdhfn6agsK5VK 4NUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sVNhZzvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji21-20020a170907981500b00717f2a08a2csi4578232ejc.169.2022.06.13.08.48.58; Mon, 13 Jun 2022 08:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=sVNhZzvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345853AbiFMKge (ORCPT + 99 others); Mon, 13 Jun 2022 06:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346503AbiFMKe0 (ORCPT ); Mon, 13 Jun 2022 06:34:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B1DE31; Mon, 13 Jun 2022 03:22:27 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1784560AE9; Mon, 13 Jun 2022 10:22:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 268E2C34114; Mon, 13 Jun 2022 10:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115745; bh=6GPI7gYf07+zFN1Ol/tp6iH7PZSLrK3qLnRFMdReihY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sVNhZzvUevW5HaxC6MWw4d0T4PUgekLi7aPwCmv/GhoDS1VjQ4BTmRaPfNJ6Uo3sV VhE3CjuZYnemVNVRd4zDpxAV4LF5NvMjZx1bUQP0/9Jnmd3b0JH04FsjyLJDEI074t /xqxAiwGlQUeMgq+heKeOUaoKnNh/zYTkVrjmhxo= 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 4.14 016/218] ath9k: fix QCA9561 PA bias level Date: Mon, 13 Jun 2022 12:07:54 +0200 Message-Id: <20220613094912.190545029@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-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