From patchwork Fri Feb 1 05:34:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Surabhi Vishnoi X-Patchwork-Id: 10791809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 830516C2 for ; Fri, 1 Feb 2019 05:34:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73F39319CB for ; Fri, 1 Feb 2019 05:34:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 681C331A14; Fri, 1 Feb 2019 05:34:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16246319CB for ; Fri, 1 Feb 2019 05:34:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=eJtB5Q4/81HjtakRmrkXd7OwyYE58vqi8UOOPsh1vvE=; b=oXF 0DuGVEoHvkQfpix+iDf5T6IRYR48EGziWq/NDWslbod6ETT83P0cB6bU9a/nfSe7RfE2YWi3Y1q0Y vSlw4pnM6kXaDm9nV/NFw+qVFJ4UaCx2nF+naAUF/NjPZuKP0MLZeqfnb3lBi7nEOTqS772dyHwqk E1ZtfIWn6wFahW2vSrlD9DnjbDk9RXycZgMYV7D18CAKP9pwDD9v/2bmLCWrrScz0pI2tV+H3J3mQ HEHxlmz5KEGG1HNkn10gEe4PmM9hXSkK1v8vYII//8FcMuZL4WArL8B8TCGUaJG8dm3aOGwbbpBO8 KNlcnx4YXrhqJWTJ7DhEIeaiMnyqkog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpRTJ-0002zN-3l; Fri, 01 Feb 2019 05:34:37 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpRTG-0002y1-5K for ath10k@lists.infradead.org; Fri, 01 Feb 2019 05:34:35 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 307DE60721; Fri, 1 Feb 2019 05:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548999273; bh=A2ssXpwHfRoPOu5Es9FccMPqeFHFVqZ4d+pUNDCy6c4=; h=From:To:Cc:Subject:Date:From; b=MjTSbjB22uDBJE75AR1zCoc2hR2AAJsou+++kCzb8ctuRFz6cAFyjzZXFbsMz3Vnf cHHuhfz3DRGcQiDR1UqdfW4rvgVT4+W1K3EwFQfEGtHTRCM+/hSgNw+cA+izloBwoY U9NyxO3CNkFbSZ9kKDC8ZcGZVMOZBuxcJiv1DgAs= Received: from svishnoi-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: svishnoi@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 761906043F; Fri, 1 Feb 2019 05:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548999272; bh=A2ssXpwHfRoPOu5Es9FccMPqeFHFVqZ4d+pUNDCy6c4=; h=From:To:Cc:Subject:Date:From; b=RPQygYe7LIf244IgfbZrl9KpLBqUPReOt3Pfb/Dk5QV5TFXjO1oDGHpZOlDO19puh 2vaTaJ6ABXF0fOtQzEFDe8upjwepJkXorLt2IYeEM8k93XA5GMElj1vuKkUAnR8AzC ODJlOKE5+qLxTmMxqt7fKGF6yED9tw07dz73zkvo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 761906043F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=svishnoi@codeaurora.org From: Surabhi Vishnoi To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Add a condtion to fill the LDPC capability correctly Date: Fri, 1 Feb 2019 11:04:22 +0530 Message-Id: <1548999262-25353-1-git-send-email-svishnoi@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190131_213434_239421_A5D3B7D1 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Surabhi Vishnoi MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The firmware advertises the LDPC support information for HT in HT capability info in the wmi service ready event. To provide granularity, firmware now advertises WMI_HT_CAP_RX_LDPC and WMI_HT_CAP_TX_LDPC separately. To support LDPC, host should also check for WMI_HT_CAP_RX_LDPC and WMI_HT_CAP_TX_LDPC in HT capabilities. Add a condition to existing logic in host to know whether firmware supports LDPC or not. Tested HW: WCN3990 Tested SW: WLAN.HL.2.0 Signed-off-by: Surabhi Vishnoi --- drivers/net/wireless/ath/ath10k/mac.c | 3 ++- drivers/net/wireless/ath/ath10k/wmi.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index e49b367..1645b1e 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4549,7 +4549,8 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar) ht_cap.cap |= stbc; } - if (ar->ht_cap_info & WMI_HT_CAP_LDPC) + if (ar->ht_cap_info & WMI_HT_CAP_LDPC || (ar->ht_cap_info & + WMI_HT_CAP_RX_LDPC && (ar->ht_cap_info & WMI_HT_CAP_TX_LDPC))) ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING; if (ar->ht_cap_info & WMI_HT_CAP_L_SIG_TXOP_PROT) diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 427ca79..0aca84e 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -2076,6 +2076,8 @@ enum wmi_channel_change_cause { #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 #define WMI_HT_CAP_HT40_SGI 0x0800 +#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */ +#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */ #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ WMI_HT_CAP_HT20_SGI | \