From patchwork Tue Oct 19 16:23:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1543476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYfGP63N2z9sR4 for ; Wed, 20 Oct 2021 03:24:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mcrun-0005F2-K3; Tue, 19 Oct 2021 16:24:37 +0000 Received: from mail-pj1-f46.google.com ([209.85.216.46]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mcruh-00054p-Es for kernel-team@lists.ubuntu.com; Tue, 19 Oct 2021 16:24:31 +0000 Received: by mail-pj1-f46.google.com with SMTP id qe4-20020a17090b4f8400b0019f663cfcd1so272049pjb.1 for ; Tue, 19 Oct 2021 09:24:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HEv3LzJ1SYohRPig1OZ6zDrsTHELSNAX62fwacQMstU=; b=pHa9XKe1M5Bh1+NaxjghGMhP0SzLYw+bXJx8Ai3DD6EyWZg2Rlsf2kkSsbKXefDYrI +kvubBfFuLp93dBmqXwSiaoiXI/gt2CPW7Yvk75PTi1nJD3ottxeEYCbJ347UwiVg3gM y/zFCPnUVIGaLLeOpuNBF2rllj7PubuD8KxC8eLq0LGgSIqD2g3OCjy+U9EmTngurvLf yyAnP574Vkv/I6XLzg83mRzQT0NoiEa0XOTmWVh5b5SzXmsdfQ2OEbEZfCeZNfrT9vTa ebL8ACzfZX3RJ4UWwuxg8U5YCa1luqTn6NGHpdsb6sXdZdMy6MhGmZk675QaaikzG88C Y+Yg== X-Gm-Message-State: AOAM533dclPZmu62YQrMMEOAKBbC0OwJz9yGVT1tTZ9lVSL1ZgYBkF7i Jtqd+PRcXt1IFOR7d8dafkTYB6BB1Ew= X-Google-Smtp-Source: ABdhPJzyC281Vl8ahPJAhVQsnFlX6j45wgBS+bv0Gd8Zq6jfwxxRuSVuArikrufA+JjiM9tmd4MrtQ== X-Received: by 2002:a17:902:968a:b0:133:e2c5:4908 with SMTP id n10-20020a170902968a00b00133e2c54908mr34193759plp.2.1634660664658; Tue, 19 Oct 2021 09:24:24 -0700 (PDT) Received: from localhost (220-142-196-159.dynamic-ip.hinet.net. [220.142.196.159]) by smtp.gmail.com with ESMTPSA id s13sm7538429pfk.175.2021.10.19.09.24.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 09:24:24 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 08/25][SRU][OEM-5.14] ath11k: re-enable ht_cap/vht_cap for 5G band for WCN6855 Date: Wed, 20 Oct 2021 00:23:51 +0800 Message-Id: <20211019162408.1407525-9-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211019162408.1407525-1-vicamo.yang@canonical.com> References: <20211019162408.1407525-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.46; envelope-from=vicamo@gmail.com; helo=mail-pj1-f46.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Wen Gong BugLink: https://bugs.launchpad.net/bugs/1939528 WCN6855 uses single_pdev_only, so it supports both the 5G and 6G bands in the same ath11k/pdev and it needs to enable ht_cap/vht_cap for the 5G band, otherwise it will downgrade to non-HT mode for the 5G band. Some chips like QCN9074 only support the 6G band, not the 5G band, and use the flag ar->supports_6ghz which is true to discard ht_cap/vht_cap. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210804181217.88751-2-jouni@codeaurora.org (cherry picked from commit 54f40f552afd5a07e635a52221ec4b0ce765c374) Signed-off-by: You-Sheng Yang --- drivers/net/wireless/ath/ath11k/mac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 1804c0e8dfd05..7e1c9e12dbea4 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3817,7 +3817,9 @@ static void ath11k_mac_setup_ht_vht_cap(struct ath11k *ar, rate_cap_rx_chainmask); } - if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP && !ar->supports_6ghz) { + if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP && + (ar->ab->hw_params.single_pdev_only || + !ar->supports_6ghz)) { band = &ar->mac.sbands[NL80211_BAND_5GHZ]; ht_cap = cap->band[NL80211_BAND_5GHZ].ht_cap_info; if (ht_cap_info)