From patchwork Thu May 9 20:15:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 10937625 X-Patchwork-Delegate: kvalo@adurom.com 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 476A5924 for ; Thu, 9 May 2019 20:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 373A71FF60 for ; Thu, 9 May 2019 20:16:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B5CC28A3A; Thu, 9 May 2019 20:16:10 +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 6BB591FF60 for ; Thu, 9 May 2019 20:16:07 +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:References: In-Reply-To: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:List-Owner; bh=qOOKazYNvEfLjbiY1aBirnt9HHR3cdXhO1xuX6G21QY=; b=HIdKBjUnzBXKDDIoWOa9CCvUvR 833C8yEweoq3TBCIw/7bsFDl5oGjKxzIAHQXj1HV85Oyup1SSWbLEXZy3AG86cmrdfQCFe9YvZBXF WvKfvJHir0V/0CyyRHvpgJUsgKKost/rTmj7PFMJ9wSna0wQNN/kPWwH4fUo+Ll2h/2quGmoGR94b jZpFNtyJ6fgyfQmblQXFHtti6hSJU+J0SjtGQ/DW9hQyp8TtM/6WoR1nm740kcpKC6Nk3NlMRDQ2k L53Q5hLfo0RrBbMFHxkasaIKzLk6NDMXbjykZcDOfeWzgDcN05R21i/ucV28L6vrgJmPH2kwE6WvM 8IZRCDfQ==; 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 1hOpSY-0003X7-LS; Thu, 09 May 2019 20:16:06 +0000 Received: from nbd.name ([2a01:4f8:221:3d45::2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOpSU-0003UG-Ha for ath11k@lists.infradead.org; Thu, 09 May 2019 20:16:05 +0000 Received: from p548c83e0.dip0.t-ipconnect.de ([84.140.131.224] helo=bertha.fritz.box) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hOpSS-0006sS-8u; Thu, 09 May 2019 22:16:00 +0200 From: John Crispin To: Kalle Valo Subject: [PATCH V4 3/5] ath11k: extend reading of FW capabilities Date: Thu, 9 May 2019 22:15:48 +0200 Message-Id: <20190509201550.3977-4-john@phrozen.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190509201550.3977-1-john@phrozen.org> References: <20190509201550.3977-1-john@phrozen.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_131602_742821_1EB19FD0 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Shashidhar Lakkavalli , ath11k@lists.infradead.org, John Crispin MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Read the additional mcs and extended mac capabilities field from the service ready callback and store them inside the ath11k_pdev_cap structure. This allows us to generate the sband_iftype_data dynamically. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin --- drivers/net/wireless/ath/ath11k/core.h | 3 ++- drivers/net/wireless/ath/ath11k/wmi.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index d17af2255465..50032e701255 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -521,7 +521,7 @@ struct ath11k { struct ath11k_band_cap { u32 max_bw_supported; u32 ht_cap_info; - u32 he_cap_info; + u32 he_cap_info[2]; u32 he_mcs; u32 he_cap_phy_info[PSOC_HOST_MAX_PHY_SIZE]; struct ath11k_ppe_threshold he_ppet; @@ -532,6 +532,7 @@ struct ath11k_pdev_cap { u32 ampdu_density; u32 vht_cap; u32 vht_mcs; + u32 he_mcs; u32 tx_chain_mask; u32 rx_chain_mask; u32 tx_chain_mask_shift; diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 5712ac030419..1856dbcc1859 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -325,6 +325,7 @@ static int ath11k_pull_mac_phy_cap_service_ready_ext( } else if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) { pdev_cap->vht_cap = mac_phy_caps->vht_cap_info_5g; pdev_cap->vht_mcs = mac_phy_caps->vht_supp_mcs_5g; + pdev_cap->he_mcs = mac_phy_caps->he_supp_mcs_5g; pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_5g; pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_5g; } else { @@ -347,7 +348,8 @@ static int ath11k_pull_mac_phy_cap_service_ready_ext( cap_band = &pdev_cap->band[NL80211_BAND_2GHZ]; cap_band->max_bw_supported = mac_phy_caps->max_bw_supported_2g; cap_band->ht_cap_info = mac_phy_caps->ht_cap_info_2g; - cap_band->he_cap_info = mac_phy_caps->he_cap_info_2g; + cap_band->he_cap_info[0] = mac_phy_caps->he_cap_info_2g; + cap_band->he_cap_info[1] = mac_phy_caps->he_cap_info_2g_ext; cap_band->he_mcs = mac_phy_caps->he_supp_mcs_2g; memcpy(cap_band->he_cap_phy_info, &mac_phy_caps->he_cap_phy_info_2g, sizeof(u32) * PSOC_HOST_MAX_PHY_SIZE); @@ -357,7 +359,8 @@ static int ath11k_pull_mac_phy_cap_service_ready_ext( cap_band = &pdev_cap->band[NL80211_BAND_5GHZ]; cap_band->max_bw_supported = mac_phy_caps->max_bw_supported_5g; cap_band->ht_cap_info = mac_phy_caps->ht_cap_info_5g; - cap_band->he_cap_info = mac_phy_caps->he_cap_info_5g; + cap_band->he_cap_info[0] = mac_phy_caps->he_cap_info_5g; + cap_band->he_cap_info[1] = mac_phy_caps->he_cap_info_5g_ext; cap_band->he_mcs = mac_phy_caps->he_supp_mcs_5g; memcpy(cap_band->he_cap_phy_info, &mac_phy_caps->he_cap_phy_info_5g, sizeof(u32) * PSOC_HOST_MAX_PHY_SIZE);