From patchwork Tue Sep 8 18:24:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 11763877 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 251DF138E for ; Tue, 8 Sep 2020 18:35:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 098C42080C for ; Tue, 8 Sep 2020 18:35:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rlVXfZHZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731789AbgIHSe7 (ORCPT ); Tue, 8 Sep 2020 14:34:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731491AbgIHScb (ORCPT ); Tue, 8 Sep 2020 14:32:31 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C03A5C061798 for ; Tue, 8 Sep 2020 11:23:53 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id y15so319366wmi.0 for ; Tue, 08 Sep 2020 11:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XRk+Q9bEx9jVxUktPh3Y718LsTPSVLh7wgm2w67dQZg=; b=rlVXfZHZTQ8fR/OJyfrsuIAIwYMSj1mSlKU9L76KwedlHBg3VpWf63pguI3doij2A5 ASkLZsv3ka8Dd9LjTZzsj3HiHn42wqAU5u/txDu96Ow8WadDdmtpBMpQaDWNxHolH/g3 PFpU36A9wLoLF2jnb8avElhwQbgM7KvlWgGp0NdakcK0MunWu+AMIKy+PqP9ou4PqaZF aLCLm7u2IVGODPdiaokIRYOibLBJ9COsXMuWLmO9KEWNqNzk0UHaCViLiLpGGOENjGfE c3zaw+8MrYySOUvisYmUJ4wpfF2HRd2VK216qnJFUf08rYmdt71Ei1R3fI9tHHdXKlPY b43g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XRk+Q9bEx9jVxUktPh3Y718LsTPSVLh7wgm2w67dQZg=; b=jUemJ5OUaiT/uzq7mLXH9okg7no4NC40IkgLyurpviqI6MTIzK+LXd9n2qQyPa8jBe 0uOsIO2tnCHJIX9N6NTKXUrg/OFqmYKUUG0ZVzs3Nc9YP91uHDhIh9TGE4teG4nLV+0A Chh+vL+XQADKe7LbYGzjSvkhuEK9LtNCOoF/jWjcMSa7HcH2Q3FxF3gTaDh6cZ228Zps i6ptQLrOuRTK2mFhaYSdh7fGBc1Rx2pGClx4wJ9Ki6ETx5+uWrtc0J2nNAkKx23Fp0ce Br5y14pr4sIBqAiWdbKg1TqbnNKmAzuaZMDyHyUXD9bnAyBdS4y8tcbTeKSTkInq7MZH 2Tuw== X-Gm-Message-State: AOAM532CnhGZ6bPm3VODrQiBQ/RKKV46FZjHt8aGnIaOi5EIHiQdOKhr ND8uUbk29Xspk0sprLcIFw1k3w== X-Google-Smtp-Source: ABdhPJyvzH5jKqBQjqEIJ+xeSJJqZr/txpSQ/oGYiJZp6skcvGJZGawWt+dFeljNIyqY2ylCTcnxxQ== X-Received: by 2002:a1c:f214:: with SMTP id s20mr396218wmc.84.1599589432446; Tue, 08 Sep 2020 11:23:52 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:52 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 2/7] wcn36xx: Add wcn36xx_smd_set_sta_default_vht_params() Date: Tue, 8 Sep 2020 19:24:32 +0100 Message-Id: <20200908182437.2870281-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds support for setting default VHT parameters, which are exposed by the extended version 1 STA parameter type. Signed-off-by: Bryan O'Donoghue Reported-by: kernel test robot --- drivers/net/wireless/ath/wcn36xx/smd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index d5ca9907af86..bb31c4d4d9a8 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -190,6 +190,22 @@ static void wcn36xx_smd_set_sta_default_ht_params( sta_params->dsss_cck_mode_40mhz = 1; } +void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (wcn->rf_id == RF_IRIS_WCN3680) { + sta_params->vht_capable = 1; + sta_params->vht_tx_mu_beamformee_capable = 1; + } else { + sta_params->vht_capable = 0; + sta_params->vht_tx_mu_beamformee_capable = 0; + } + + sta_params->vht_ldpc_enabled = 0; + sta_params->vht_tx_channel_width_set = 0; + sta_params->vht_tx_bf_enabled = 0; +} + static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, From patchwork Tue Sep 8 18:24:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 11763897 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84E6C138E for ; Tue, 8 Sep 2020 18:35:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 691CB2080A for ; Tue, 8 Sep 2020 18:35:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Am0e6ABT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731504AbgIHSfq (ORCPT ); Tue, 8 Sep 2020 14:35:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731255AbgIHSc3 (ORCPT ); Tue, 8 Sep 2020 14:32:29 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D54FC06179B for ; Tue, 8 Sep 2020 11:23:56 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e11so187922wme.0 for ; Tue, 08 Sep 2020 11:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FIXgUDCAw5H+6nCd7qyCvsfy5qAJIAQL+JK4lt32D9s=; b=Am0e6ABT6mWjoCC+451SwrlPEHFiWuCdQBmfAeUhYsBZEsC2Q02Lsnc7ODIa8tfa24 wtR0ZwWNnFO9BQCurNKzCuwrfO/o1WE5y3KEkXlJ1232Mak+QgxOX2Il2t7oIEwUBbnb BcorjGQutPtrJrnl+tNxqQnIfD/XnGTUL93eLv877RdZIlpnre5z3RACLYbty+g4WWzg 6+PaxqUypYlfk6r33boAmX+gNv7/IRK0702YkLN4LmKOS9+m0puVQDC0e2DJ2ITLWnyW a1idco+6FztxFnfLc/6dPxoit1KFB6VqCRUsXa53vfJ+FjOPaMUSSiBiE7qYN6JXKL2t 1U/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FIXgUDCAw5H+6nCd7qyCvsfy5qAJIAQL+JK4lt32D9s=; b=KKcRlhIMrP26UlYb5TAR0geQwP8nu7RWo5VIa3+/5SVuN/dSezaDFYxoeWYWuq1Dr6 L0iCW8SBFSufLExqXv6OTP5ByVmBaec2B9Uv/AWdkOJzEhPx9tw1cnEIcexDimJJB8HU ngz/eUR2UtDfi6EQBimAilQH/C94qf8hzhgfXBq0NktexTJexnkMWb7BhOL4v8im18Ni bd6fSshS+M1+dSiuiMmoLTEm6HeeFkb93igYU2CuJprPqd0Aq1jjIiODT2AXb6jh2gS5 gQHjwj9tiCQAmBTNcpehhu5CiVrIXLzZ7elqnfl/glvca0L8dadwQQFrjmDS5kwGMGl2 fCqg== X-Gm-Message-State: AOAM531Bpwh/gprrkK/Bc3EW0n9m/RmakO7eAvdWmpqNp9EYGl6nTllK wiXs4U7jMGx92qYvotY9vG9Tcg== X-Google-Smtp-Source: ABdhPJzIkQdaxPaZ0eNhU/6/jza9oxGPEJN2dKzSMbg7Nb50Av9ZUxQXuJjjOZk7FT5gVnoMKe4W3g== X-Received: by 2002:a7b:c384:: with SMTP id s4mr383075wmj.138.1599589435367; Tue, 08 Sep 2020 11:23:55 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:54 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 5/7] wcn36xx: Add wcn36xx_smd_set_sta_ht_ldpc_params() Date: Tue, 8 Sep 2020 19:24:35 +0100 Message-Id: <20200908182437.2870281-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Adds a routine to allow setting the LDPC bit for HT parameter passing inside the version 1 STA parameters data structure. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index a563a30c3a0c..14af98af42f3 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -196,6 +196,15 @@ void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, } } +void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (sta->ht_cap.ht_supported) { + sta_params->ht_ldpc_enabled = + is_cap_supported(sta->ht_cap.cap, IEEE80211_HT_CAP_LDPC_CODING); + } +} + static void wcn36xx_smd_set_sta_default_ht_params( struct wcn36xx_hal_config_sta_params *sta_params) { From patchwork Tue Sep 8 18:24:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 11763883 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D06C159A for ; Tue, 8 Sep 2020 18:35:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D98C32087C for ; Tue, 8 Sep 2020 18:35:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ELL5xuzq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728899AbgIHSfN (ORCPT ); Tue, 8 Sep 2020 14:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731591AbgIHSc3 (ORCPT ); Tue, 8 Sep 2020 14:32:29 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95B51C06179E for ; Tue, 8 Sep 2020 11:23:57 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id y15so319522wmi.0 for ; Tue, 08 Sep 2020 11:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z7Rx0C6d6/7/5yg3uB9kdCw4d9C0cgfMEPvtmg+zlZY=; b=ELL5xuzqWa5q/mb3KbbeH7b1DIUvnFd4gU1GPgji4LIdQxFVLUSsIqvF77f4GSTsb0 xRzUQauUMIParsS3SZiuTzZba7KrcARB1zKYzOpZd4xYgzxpTiOOCHrJygRLhjoewD3M 51OgLZFBO1pd3y6HDpwVpO9PVTP75+UJtHjNv+UynvH3ArKrQyYh0SFsXfgOUGDPIsIL zDqekLyd5RviwKFlswZ7iPR/6MG0cjpZNryTOt4k9mV1LAgdRw8ouynY5k17kmUuwKg/ J2m0Gbo7SkoxJd0S6ZlimPNwNgIjYPOc7AYe6qOiUvRuZe+aOni7e/0xeTZTSkt3J74f lkpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z7Rx0C6d6/7/5yg3uB9kdCw4d9C0cgfMEPvtmg+zlZY=; b=EvGRZBkoXqJ/ShWRasAmPb+QkAPyD5bHTISPc8OEGCj7hP4YNatua+7qeaaIc0KBel V/ECf+1FKAkVsHBPqzyw27QEDLa+H85RaPFbwAmaQSeI/LP1scCr9AloDvvPy/rOamu+ uvSGpFBlZzlpaitxvYIGwT2VJc4LBr2CiARJCB4wZpogGULFnICdNBNqGWTR2hLyXCgg meC8e+8DG/50UvLQTQR0+uDj0WmQejEM1lGR05liEEbJYsy0ayJLoB1YK++zCesSlKYQ 6E+9Q3Vo6eHa/+22zhxP+z1LVVXqu+QMFgozbITEkIie0fYwBommnLnLPCQSxGJlEAuU u5oQ== X-Gm-Message-State: AOAM5326BMDb4VKH3XkQw5Q/YcOBS/1HIfn8cbuagGovczEZ89jX7B8/ 7iLADap/HDTAnVm7eixiYqWI8A== X-Google-Smtp-Source: ABdhPJzwYzDZ3CVLP/JaZNpUKGYihXcw/6dRiSaZWiTAK6EsSRvSATiLIzpoDE0HLexlTbysmqKUuQ== X-Received: by 2002:a1c:63c1:: with SMTP id x184mr394519wmb.138.1599589436290; Tue, 08 Sep 2020 11:23:56 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:55 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 6/7] wcn36xx: Add wcn36xx_smd_set_bss_vht_params() Date: Tue, 8 Sep 2020 19:24:36 +0100 Message-Id: <20200908182437.2870281-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds wcn36xx_smd_set_bss_vht_params(). The job of this function is to decide if the BSS is VHT capable and if so set the appropriate bit in the BSS parameter structure for passing to the firmware. VHT Channel width set is not set since we don't support 160MHz. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 14af98af42f3..fa6f5943a43d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -146,6 +146,15 @@ static void wcn36xx_smd_set_bss_ht_params(struct ieee80211_vif *vif, } } +void +wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_bss_params_v1 *bss) +{ + if (sta && sta->vht_cap.vht_supported) + bss->vht_capable = 1; +} + static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, struct wcn36xx_hal_config_sta_params *sta_params) { From patchwork Tue Sep 8 18:24:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 11763891 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6F911744 for ; Tue, 8 Sep 2020 18:35:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CDD22080A for ; Tue, 8 Sep 2020 18:35:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="P3hedTcY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731542AbgIHSfr (ORCPT ); Tue, 8 Sep 2020 14:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731845AbgIHScN (ORCPT ); Tue, 8 Sep 2020 14:32:13 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 874EBC06179F for ; Tue, 8 Sep 2020 11:23:58 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id l9so303698wme.3 for ; Tue, 08 Sep 2020 11:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oIyFTjtZqqz1/a9JDLpNoneKVIe4xiF8cj2LgmPKQKo=; b=P3hedTcYIXhIoygbLO9ap57mxbcZf4C1cLkaPFU4XqJCSwQr0eJ3Tvu2n+u0/5mvuB L/UIxs6DyWGSGlZTaPOyPiCqr2+241eJzHIzsGBfYDg2upz6V8M2jG103FNGiVL63eL9 FpGreDD0mwbuyM8JaNRhUsV8ueKxJQbeDedC0Rkx9WOu9azu6S+RY3ZWlcbuc+48Xi9q m3kLnNfDfa+cZoVoNJIWM8OslHniy+keNzdY6VOBdMAgEpsOmpKDp50mvF05gLFF97F6 T3J0/CkVrvO7zcLq0ltOTJN6/Ml1ifMa8VDPA42Fp+L1CwBVNU474tBrq9a3DrZ5OJIo kFvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oIyFTjtZqqz1/a9JDLpNoneKVIe4xiF8cj2LgmPKQKo=; b=UOlFO5Cdf2H6umCOp4gbzIIAfibY0IMBYt3wDf27TTeKgNqx7SDueoCb/nIEghW+mt AxPIYKVc0VfxEs+SEEjUDjhcnsNhzVETNaYsuTWCdEk/kEPDCBdlusqt/JgaCKz3bh4w dA0vOScVgMwN1HGNoaHwbUkb5aABYJySpQVZ7aKLnBJd/2HmgMh9YRdAR2XAlgHWC4DO +DXVOZedY0p7MlIDUWD3nYDP45ZoZyPAC23xdLrEa9JVMMi8kujDJy8PpSfNDe70QDfY SaQZacT01aurYKUgdWuP1ETdUHYBd8gBYMxjB1W36ksQ9XNS19kKawhej4ppfYc/ZIGl XwwA== X-Gm-Message-State: AOAM532A7LdiSRoQWYrzIQvOG/rn53hvyc/HtIyzu6+TA5xPMZUjrDqr rZeWATFbBFhsI73Sj+bT7mWOeQ== X-Google-Smtp-Source: ABdhPJxpjQSkSpJ1/KdybXnK71YSrVKp3QaZvbfj/dyzxnR0RvqlFQpcpc1rm4cWC/xKXuNWVVzwxA== X-Received: by 2002:a7b:c1d3:: with SMTP id a19mr368649wmj.19.1599589437298; Tue, 08 Sep 2020 11:23:57 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:56 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Subject: [PATCH v3 7/7] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Tue, 8 Sep 2020 19:24:37 +0100 Message-Id: <20200908182437.2870281-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This commit adds a wrapper function wcn36xx_smd_set_sta_params_v1() which calls into wcn36xx_smd_set_sta_params() and then subsequently sets version-1 specific parameters. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index fa6f5943a43d..f434c355d32d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1249,6 +1249,31 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } +void +wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_par) +{ + struct wcn36xx_sta *sta_priv = NULL; + struct wcn36xx_hal_config_sta_params sta_par_v0; + + wcn36xx_smd_set_sta_params(wcn, vif, sta, &sta_par_v0); + wcn36xx_smd_convert_sta_to_v1(wcn, &sta_par_v0, sta_par); + + if (sta) { + sta_priv = wcn36xx_sta_to_priv(sta); + wcn36xx_smd_set_sta_vht_params(wcn, sta, sta_par); + wcn36xx_smd_set_sta_ht_ldpc_params(sta, sta_par); + memcpy(&sta_par->supported_rates, &sta_priv->supported_rates, + sizeof(sta_par->supported_rates)); + } else { + wcn36xx_set_default_rates_v1(&sta_par->supported_rates); + wcn36xx_smd_set_sta_default_vht_params(wcn, sta_par); + wcn36xx_smd_set_sta_default_ht_ldpc_params(wcn, sta_par); + } +} + static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn, struct ieee80211_sta *sta, void *buf,