From patchwork Mon Jun 3 19:01:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 10973905 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 66A0218B7 for ; Mon, 3 Jun 2019 19:02:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5767B2837E for ; Mon, 3 Jun 2019 19:02:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B7FA286B4; Mon, 3 Jun 2019 19:02:13 +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 E001B2837E for ; Mon, 3 Jun 2019 19:02:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=exQflmX9FRlwdTPdkgBDnwYvG54jaayJepQBCU//BU0=; b=GqsqJ+pqgKZy/b 1ofMzOBJDEsHi9O01LDqjapWM7bC89fSgCFN5EsgtPhftLTBDFwuAbyppAzsM8fi5C4IUeW7L8/wC NoruMNIxAtCZsskTj+5i78GhOqMzUSKgGNjDM7ZXjJxbYv0uKHE/qIZTnbRf2J6enTYxgfFBMqAHA GnTEt4g0DeUqVfrpYnizNc1HMZ6hicV1xtS2G7QbeNcDa9H7iM4cphMmOyn4p/hRQ8Zw+7Sw4PFJN jI7RSjJAguBKv5/Y4XahvKJl1EuQuZ6RhjzT221/To/wsllqrliXroevaz4sKg6I32eXt1KG+ZN1i J6RwKrM9U6gj3E0ayQaA==; 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 1hXsDj-0002xs-T8; Mon, 03 Jun 2019 19:02:11 +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 1hXsDf-0002tn-Vf for ath11k@lists.infradead.org; Mon, 03 Jun 2019 19:02:09 +0000 Received: from p5dcfb250.dip0.t-ipconnect.de ([93.207.178.80] helo=bertha.fritz.box) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1hXsDd-0002zi-GK; Mon, 03 Jun 2019 21:02:05 +0200 From: John Crispin To: Kalle Valo Subject: [PATCH V7 5/8] ath11k: extend reading of FW capabilities Date: Mon, 3 Jun 2019 21:01:54 +0200 Message-Id: <20190603190157.25165-6-john@phrozen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190603190157.25165-1-john@phrozen.org> References: <20190603190157.25165-1-john@phrozen.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_120208_167998_251135AD X-CRM114-Status: UNSURE ( 8.69 ) 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 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 ca0c14109d09..330f22f9d3ff 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -527,7 +527,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; @@ -538,6 +538,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 2afdaea913ec..4c3c70c6938a 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -327,6 +327,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 { @@ -349,7 +350,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); @@ -359,7 +361,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);