Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp979411pxb; Fri, 15 Apr 2022 17:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4U/VbXi/83vTzSEtIcBZdsFjHWGlpGbqavol4U8B0hH2lmdiQ3CYwTUuXLy1cubehZlFi X-Received: by 2002:a62:17cf:0:b0:50a:4601:36fe with SMTP id 198-20020a6217cf000000b0050a460136femr1528448pfx.4.1650068134840; Fri, 15 Apr 2022 17:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068134; cv=none; d=google.com; s=arc-20160816; b=eSAPUrc2C251MIqObPOjcTsbSQKKNp4DUd6aFzEk+r3ULabcv4uMxPglIZ7MpSDAwT Yp9LqthOuz8XZBrUNVC3EwDrt4qBOTwEZAyY9mi67iYtWNwEe4KAbWS/D7N39djkfzts gQoMwsuhH616pKF8PIdze5heNjs+8KlGpey6ozjelrPyhAYBbwlrCNhkmUuSh5LlFQVX 6WhO/npr2iREfWG7h9WHdUVD2B989AqFaF6QljYAOlQXqtpSaUBNoZ6g/WBDw1RnDogT vAdtWki6GF0xM0cFBLxvOaiU/nm9e6cEuzmtsqfnVzE+DJPG3jWsHTpkGcCSqhK+uKAC puSw== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :dmarc-filter; bh=8AMfLKxBHKwcxOqbTbniv7Neox2A8tQyIO2DdF3+VWE=; b=zIzSY+X3vf7YzDGJRVk6wooR/dOjABhUmT/4pszG2azotILV9Xk4WQ7sSKyV/k8sDL DH7AK0EE5rCL1khNgD+mychBCFFi5lqZKF+CXRCuW5YXiCL68Bkp/IX6stRthZ2RZiiE KSX8c8nE4mFuoDf+kq9p8n7CSvG6AbdPUz6jun8jyYM+K3g0W0EKAmirwKjdRQCRTQOQ +A0lQYmL7VyK2rVwZ9T0wkUWd4TqqlcIKpVzuw2nEIlqr+WkbTjYOcITUXi8ge/nWg5P /LQkQHP1R5MDVgoGMYXmjHT34S6vlKfSRe9xW6eTT/bHTxzuK1XlSSBlTzKxKPE0t1SP 5W2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@slashdirt.org header.s=mail header.b=rJEMmm9T; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=slashdirt.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g23-20020a63dd57000000b00398ab3fdcafsi2877168pgj.655.2022.04.15.17.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=fail header.i=@slashdirt.org header.s=mail header.b=rJEMmm9T; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=slashdirt.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CBFADC74A1; Fri, 15 Apr 2022 17:15:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352431AbiDOK4B (ORCPT + 67 others); Fri, 15 Apr 2022 06:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348531AbiDOK4A (ORCPT ); Fri, 15 Apr 2022 06:56:00 -0400 X-Greylist: delayed 491 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 15 Apr 2022 03:53:31 PDT Received: from vps.slashdirt.org (vps.slashdirt.org [144.91.108.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8720DAACA8 for ; Fri, 15 Apr 2022 03:53:31 -0700 (PDT) Received: from supercopter.milliways.lan (82-64-212-153.subs.proxad.net [82.64.212.153]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id BBB246021A; Fri, 15 Apr 2022 12:45:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.4.0 vps.slashdirt.org BBB246021A Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org BBB246021A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1650019517; bh=lkrm3ROjHkqcg0OsziAkJPqgkECGkh89TmnGlT8fS+o=; h=From:To:Cc:Subject:Date:From; b=rJEMmm9TZ3B9sju4UTc+4bfwx8ZCrgdRmvPzUxthk4l/rGtl2hzsr7ebhGUmS7cv+ Zp9UWKQ/u/8CAtDyuUyvYzaJD/34H0xclHt6CVf8QvVYuVOjGlvUPfp+zpaSBZMgDE jpQ4kdCZqX9l4wOePkRfHLWZUTa7LLox4gZx5JiY= From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= To: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , linux-wireless@vger.kernel.org Cc: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= , =?UTF-8?q?Petr=20=C5=A0tetiar?= , Clemens Hopfer Subject: [PATCH] ath9k: fix QCA9561 PA bias Date: Fri, 15 Apr 2022 12:44:19 +0200 Message-Id: <20220415104419.22749-1-hacks+kernel@slashdirt.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 ath9k is setting the TX PA DC bias level differently on QCA9561 and QCA9565 although they have the same radio IP-core, 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). In real life testing, without this patch the 2.4GHz throughput on Yuncore XD3200 is around 10Mbps sitting next to the AP, and close to practical maximum with the patch applied. Tested-by: Petr Štetiar Signed-off-by: Clemens Hopfer Signed-off-by: Thibaut VARÈNE --- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index b0a4ca355..8f8682f25 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -3606,9 +3606,10 @@ static void ar9003_hw_xpa_bias_level_apply(struct ath_hw *ah, bool is2ghz) int bias = ar9003_modal_header(ah, is2ghz)->xpaBiasLvl; if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah) || - AR_SREV_9531(ah) || AR_SREV_9561(ah)) + AR_SREV_9531(ah)) REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias); - else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah)) + else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9561(ah) || + AR_SREV_9565(ah)) REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias); else { REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias); -- 2.30.2