From patchwork Wed Sep 9 15:36:01 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: 11765651 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 D83B414F6 for ; Wed, 9 Sep 2020 15:36:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B799E218AC for ; Wed, 9 Sep 2020 15:36:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bsHZas5H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730349AbgIIPgH (ORCPT ); Wed, 9 Sep 2020 11:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730324AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -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 02B00C061348 for ; Wed, 9 Sep 2020 08:35:22 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id w2so2725352wmi.1 for ; Wed, 09 Sep 2020 08:35:21 -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=OT/7V+2xByy/9ST9yJhKKgW312HrOX/Xe+N2WUGIkkU=; b=bsHZas5H2PogNEUA6W0g82l8+D6alBojgldv7kndyF6dhnS7zVICdOWB2x63LbOvpx Sf/9x9WfAYKNaGD2z1Zx639CL3W6BBtuCcrciQxqVmVHWLxbYb8K7a+vdrUjacc6/9wP rP3RPbwCKmNTwjRA30X9y8akpVYQL+MEs7Nho79dkUeV8Bf+4qQcCil2LovECX1HBAWE 3Q5yfX+/oLFKwTNAlu4Wfl9fQbvQjLqlIOFVYe6A8hJy+JpEcRZOQiO6nbw6nMjxLxxv EhZbCNeHySRJMLH/3OnOgbSjrkFMZA06ifT+yYTgA2vxGgITVtLIa46vD0BzP+Yr9AqD azYg== 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=OT/7V+2xByy/9ST9yJhKKgW312HrOX/Xe+N2WUGIkkU=; b=uGaOXjeuNnopOKPREFfiMffCEbY4oDadVAcbRoG2Jgepe70wvNXoEP9rhUYj3VhoBV z/Aubd2Z4zmTrY7IYK4r9mjLzFkp/e0ZRR+gnLn/nSxE43cn0iKlqgiRjO9CygiXc9Vw mlWsrgnTv0BV91pkZsfypNOtEnUjF25GG59R1h72Dv+82ahYOfLBRwtI9u+No0iMjbY3 YVz8e1eMDRFrLT/jnMDm4J7M5OITB0bGWWKB2dV6jihkrD3upRmuX51sfAUQGtClwCFv EbCS6oJXXA/PmhuVp7LOSzORpy+UDbfjxlV5oVbEjWztzF/yOfGETL9ldGKCo3WFx/cl LraA== X-Gm-Message-State: AOAM533xSErFnG/1W20KMeEgDQWAvlSzK4ZLM0EG5/DELZJ1//F7GTFz gZGQx1aAT6U/g/PbTKjnoXsebeSZ/n0RLw== X-Google-Smtp-Source: ABdhPJwxtt/Q/OUfdEjYwKFN9C8X7r33ruY5xIkjs2fHRhxyeFAsdHNl0pQ3QQrneyP+ex53s7Bm8A== X-Received: by 2002:a05:600c:2146:: with SMTP id v6mr3992097wml.159.1599665720668; Wed, 09 Sep 2020 08:35:20 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:20 -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 v4 1/7] wcn36xx: Add wcn36xx_set_default_rates_v1 Date: Wed, 9 Sep 2020 16:36:01 +0100 Message-Id: <20200909153607.2904822-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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 Add a routine to set some additional default parameters associated with the V1 data structure. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 8 ++++++++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index c5e94ba8f941..ab6685dc956b 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -793,6 +793,14 @@ void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates) sizeof(*ofdm_rates) * WCN36XX_HAL_NUM_OFDM_RATES); rates->supported_mcs_set[0] = 0xFF; } + +void wcn36xx_set_default_rates_v1(struct wcn36xx_hal_supported_rates_v1 *rates) +{ + rates->op_rate_mode = STA_11ac; + rates->vht_rx_mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9; + rates->vht_tx_mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9; +} + static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf, diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index d7d349de20e6..2da81d9926c4 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -271,6 +271,7 @@ static inline bool wcn36xx_is_fw_version(struct wcn36xx *wcn, wcn->fw_revision == revision); } void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates); +void wcn36xx_set_default_rates_v1(struct wcn36xx_hal_supported_rates_v1 *rates); static inline struct ieee80211_sta *wcn36xx_priv_to_sta(struct wcn36xx_sta *sta_priv) From patchwork Wed Sep 9 15:36:02 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: 11765661 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 33412618 for ; Wed, 9 Sep 2020 15:37:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 126C22078E for ; Wed, 9 Sep 2020 15:37:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TcvelvCg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbgIIPh0 (ORCPT ); Wed, 9 Sep 2020 11:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730338AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C0EC06134A for ; Wed, 9 Sep 2020 08:35:23 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id z4so3477691wrr.4 for ; Wed, 09 Sep 2020 08:35:22 -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=TcvelvCgJwMqXFAmH7XepZ7yjnv4D3CBrQijZp4eWMuzGSj/4L853SV8BCJyqnU1sn k2AIp8mV5GWZvv2HWN8NziCzWxVHENTB+A9ZxGMY0FWSRM8Vs2H2ST/XJ4MihCeYCsB+ fI1wwfw1G5oa4ud+Dsg3lyzu5xiPZH6UTwgsxgZAEEs+UiBw50guYEUrDbmwRN057nSZ Z/VWJn4Psngsk51f7JU+vuqYqB4DRxtNloLlUFB+eRT+Xs6bC8aznWdeRnZ3jMXWhJmP pDN+S0CUsjyqvo5arv183dMW2eieV99JpKW7O7/M7LjTb3uHWitXk1ga8t2S+9AaCxJf RnYg== 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=HJkKGBG3yHTXr4NoTc9Rop8romTj7vII7ycF46unlepZntwrs2O3PRoOrvkmeckijl EUXtFlPQJb2aen8clhK787KlV1eHacMwmA14UOeWsNMIhBlyjv5g0pyMdJnd4avE5pUf 3AFS6l/uUs2WzzASdy4LwfIIQeuBzFH71vQFI8ipBfbnLrBO9lwMsMBt/BuBs6IH8FDr P/CvuE7VxCbiezJ/qQjA6kKNWGzkoe2aq7Q4LGJvXhenJy4JI550Rv7AqOXQoqdJi2p3 IbmG7kd3GNZlSE/hjpAGbjRLco75XrxsVdNeBxJgfUf91qoyoQxrFSTrkOqAL6IpUwk7 W3rQ== X-Gm-Message-State: AOAM530jYiRqboP8pAy5K4oxFpuS2CooNZokcVPwlqgz5YfNzr9S5hFm d+3JanlPLOs8i+Oohv1txWa7LQ== X-Google-Smtp-Source: ABdhPJzulFpVKf4f2RIhrdGDR+kLtYmJvPUYY+kTUhK9+Bco/C3jIUDt13whm94n+wlCHmrDkXCNnw== X-Received: by 2002:a5d:4949:: with SMTP id r9mr4646209wrs.27.1599665721708; Wed, 09 Sep 2020 08:35:21 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:21 -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 v4 2/7] wcn36xx: Add wcn36xx_smd_set_sta_default_vht_params() Date: Wed, 9 Sep 2020 16:36:02 +0100 Message-Id: <20200909153607.2904822-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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 --- 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 Wed Sep 9 15:36:03 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: 11765655 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 8FB89618 for ; Wed, 9 Sep 2020 15:36:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D4ED2078E for ; Wed, 9 Sep 2020 15:36:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mrzHj7Pk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730368AbgIIPgq (ORCPT ); Wed, 9 Sep 2020 11:36:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730337AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FDA2C06134E for ; Wed, 9 Sep 2020 08:35:24 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id k15so3425015wrn.10 for ; Wed, 09 Sep 2020 08:35:23 -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=YvzZFSwrpgxQ+WGjQnmFyunvxfM/MsB1Cn6EiHCvmSY=; b=mrzHj7PkoKxaWbAiMRcoNDlZ2GZ8PDAayUNOVzfyIYiPaWME9V0JZp/E+cb7sSCYTg ICEb8H5GobNU/iI88f8jZP3S60JNE8EFmAvmBDm/AuWk022IU1Z/BUlZCtd+xCyji52o 92kOq7Oo9zF+XzYpwm0guUQZG/dJLXzWHKO7S32hmcJbu8o1V3qTcy4y6TEsojREDv/2 jOVoJNZGmAdYC6e0BFUB97mv0g7f791yygtQh0Jte+cFmS4+AwCfyfzwm2RTV+Gq5CA0 QhlGPfMRcgAd9+IZ+yU2iYsc/Z+eky6dToSGZ5GV3rp5uqvBX5blm7xlv1SY01sAgthv r0GA== 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=YvzZFSwrpgxQ+WGjQnmFyunvxfM/MsB1Cn6EiHCvmSY=; b=mBMqIf6jiypDdJvqsNfUbxZTKdPQw54G+YAslCjt869qsz8yIUEi1JBpMLRiVUB0Dh s0deWb3FIcTvQRPmAQU2wxJrCrvx0Zr4hVra1VZgk+wL9jOvSsq+/Yt7UlgKIo73WkGE W8CrEc9BY17jRsabjzi8kT5sl2z+cyiI0RcZ2Lf2hztGFBQcEdbGez7+DDThUH2fpbjM 1XgsTegAqms8zt/swu5FrZLMPZbWbqnYfxurLo9hgjzQ8EE/tkudj6Bt8+LYRTZcWBuB G69a40E6ntGJqlmfN40FL5UCLsfVX0g1HUEuVb+W54+8y1C2ahqWrvrtYy7lrlpzAm8R 9J2Q== X-Gm-Message-State: AOAM533b4o/43RuB8FdsK7T0Sd7fUxS4uuIw4ZCJjkKBuMGV1cotfAm4 szFxsO4FIOCbcywHaILxQmu0rw== X-Google-Smtp-Source: ABdhPJxAMGciObmICOVeSOdwbSPqQUaKByVqgEB4dJEltXHIyVCCVVTR07el+uEDFmNEp2CZCq3DtA== X-Received: by 2002:a05:6000:100c:: with SMTP id a12mr4731941wrx.115.1599665722734; Wed, 09 Sep 2020 08:35:22 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:22 -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 v4 3/7] wcn36xx: Add wcn36xx_smd_set_sta_default_ht_ldpc_params() Date: Wed, 9 Sep 2020 16:36:03 +0100 Message-Id: <20200909153607.2904822-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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 Toggling the LDPC enabled bit is possible only via the extended V1 data-structure. This function provides a means of setting the default depending on chip-type. 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 bb31c4d4d9a8..3f57acfe11bb 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -206,6 +206,15 @@ void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, sta_params->vht_tx_bf_enabled = 0; } +void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (wcn->rf_id == RF_IRIS_WCN3680) + sta_params->ht_ldpc_enabled = 1; + else + sta_params->ht_ldpc_enabled = 0; +} + static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta, From patchwork Wed Sep 9 15:36:04 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: 11765903 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 30F46746 for ; Wed, 9 Sep 2020 17:10:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D0D2208FE for ; Wed, 9 Sep 2020 17:10:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aQ8/qJTn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730914AbgIIRKu (ORCPT ); Wed, 9 Sep 2020 13:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730223AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -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 0A925C061360 for ; Wed, 9 Sep 2020 08:35:25 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id z9so2834240wmk.1 for ; Wed, 09 Sep 2020 08:35:24 -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=0kUBjvvwl59BwNDewkzvG1ZSSZyLN3Mzs35/KuiVmWA=; b=aQ8/qJTnIosWf8oaUZYlsVXTXol7ua5ZbHXFTI2Txf0+d87Iak0A0pgHxBuBO3wR6v 4jSFPyDL5RG7JZ/4F3ILmdgo4J2pJtVeTUuo/np/+tYy2acon7gLX1Vczazf2bIjUUQM 2aspNUTnkPsshWET/2uiWme4dlj4LhZOmwgXcnS9cV/lQfPw8JuLEfmz34tpRvECrOo6 OENWY6IdANrg59qeUhih4d2HHK+VasFrft8qcO1DgexWNK+3pqtmhvnBJ2g0OaIrIp9G 9LsZ+vVTZsmKZUBg0YBKhlAUvUjUw4jGPvSbaKHTWP36e2F/JeIIntK2ribRNG+w7oqv UDwg== 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=0kUBjvvwl59BwNDewkzvG1ZSSZyLN3Mzs35/KuiVmWA=; b=Qf7E5WnsAuzXffBbBUFVxzbXfUxt9NvbERt+O7ujy40fnop07DIC6EieVX/QqhMgsV urfv2SQ3EffkNpLmjfVn+4772ZtDt9fnpqR8HKWZbwxFwEJQ6HWRJ6Vkup1crxexdylL dDlNFQ6ESWLDgaVb/51ysk2lt8AqxhkeUFb7uSZHS6Gsj4f4Wnmq/yQvZdTWl4yd1GQo uI6kSrWPIcTA3ttH+uuriD2gr0JoQeT5BNVKE5eQQpf4w7xxw36Va+hWOZ1gMsXtwfCm f1DLF6ITuAzE8Fo+0dWlxH3QKFS+m7YDhnlLG2D8KoYLy4NNl2r32JW3j4yoaRgI8htu tEww== X-Gm-Message-State: AOAM533OLiLPHqhrFSxoSQkmSl4WFzDaGXdU1GYjE1uhKeI1NOkMxXF6 3BbTL/jokm4Xi8Q4Rryfd+wj6w== X-Google-Smtp-Source: ABdhPJzL5IF+LAclLJDn2I0yWlA0AwjjUDUHHgW0afA6dlAA1r8eGoDGh04yVj+Qh15JmMEAzREjZw== X-Received: by 2002:a05:600c:2257:: with SMTP id a23mr4297084wmm.102.1599665723762; Wed, 09 Sep 2020 08:35:23 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:23 -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 v4 4/7] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Wed, 9 Sep 2020 16:36:04 +0100 Message-Id: <20200909153607.2904822-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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 VHT parameters based on the declared VHT capability bits in the VHT capability structure. We cannot do 160MHz so VHT Channel width set should be zero. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 3f57acfe11bb..a563a30c3a0c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,28 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (sta->vht_cap.vht_supported) { + unsigned long caps = sta->vht_cap.cap; + + sta_params->vht_capable = sta->vht_cap.vht_supported; + sta_params->vht_ldpc_enabled = + is_cap_supported(caps, IEEE80211_VHT_CAP_RXLDPC); + if (get_feat_caps(wcn->fw_feat_caps, MU_MIMO)) { + sta_params->vht_tx_mu_beamformee_capable = + is_cap_supported(caps, IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE); + if (sta_params->vht_tx_mu_beamformee_capable) + sta_params->vht_tx_bf_enabled = 1; + } else { + sta_params->vht_tx_mu_beamformee_capable = 0; + } + sta_params->vht_tx_channel_width_set = 0; + } +} + static void wcn36xx_smd_set_sta_default_ht_params( struct wcn36xx_hal_config_sta_params *sta_params) { From patchwork Wed Sep 9 15:36:05 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: 11765657 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 3ED6859D for ; Wed, 9 Sep 2020 15:37:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2029620672 for ; Wed, 9 Sep 2020 15:37:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eKRhlStC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730381AbgIIPgu (ORCPT ); Wed, 9 Sep 2020 11:36:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729479AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52C7CC061364 for ; Wed, 9 Sep 2020 08:35:26 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id m6so3487775wrn.0 for ; Wed, 09 Sep 2020 08:35:26 -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=eKRhlStCkuMr4/tC8YCMRh8j107aOkvK4lTslY4lHfiqyORjUsWw0n4xOrCbIeLPia ld3FttlmTezZROqvALiXJ/c7uhXy15aBv2sNwszWS55pd+M0U1YlQvgBQlytYGbXvIqd c7xin0waA46/jJbIKSmuWVMh6H8u2l6PkVELk9XpO+dTxjg8rGdXt6ZcdmFRATcrI9Gy NGc0gajAN9o2SlQSIh2GZLRvYcazLUU2HefEv7Z5H5/9SvcGPVvpyQZTrhO8AOqYdaKa juXWNt1e4HldFXPKB1xop5hwi8TqFrR4BorIzNGuSzo5yqUjNC0lIw4qO8KIIU/Gy2Dx YUmQ== 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=cv6m5XZgQu+f/Qu0BfrbfpWL8AGLGS+WrrZDNSqbtjZ29D62GfO7Ktl6Fk0CIFefgP HpqGYln6HCmBtPH0Bb4oZwEkR6NP18U+jCvaj8fvq4lrAYSTmLMcBAM7tYPufEC3PfI4 tk1nv8nngN98fXDyKTbXrjC4/69rRbbkW6glYHpNRM7GB4U5DgesVblkiPZNoSsdomaV rpjhzRj3nBcEDAmw8O2I0OcHdK5vwys8n1TTP5M3DvW/sPZOdTGGsF5jWWJn+y0p+wQs Q9kAZNYnh9IuYNr5XxN8Gfjd2+7rlQBG7NkbiXsZPthj860GL3UsMnxn1KJaeKovfibk WnQA== X-Gm-Message-State: AOAM530uL/j6w82QI6PVXiF83Cq8nwDULrNWg6yxMjZTrVi6+haXXL6/ q/+NApQarvG/HgbnLNFc7L9Z3Q== X-Google-Smtp-Source: ABdhPJzsOuG+sLkMJhadLbz7LALyL2YYbJJjVFWKm9IinM1h/eof1hdrIYqJFxe1yiWRN0xgPnTZzA== X-Received: by 2002:a5d:540e:: with SMTP id g14mr4778533wrv.148.1599665724737; Wed, 09 Sep 2020 08:35:24 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:24 -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 v4 5/7] wcn36xx: Add wcn36xx_smd_set_sta_ht_ldpc_params() Date: Wed, 9 Sep 2020 16:36:05 +0100 Message-Id: <20200909153607.2904822-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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 Wed Sep 9 15:36:06 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: 11765659 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 96A98618 for ; Wed, 9 Sep 2020 15:37:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D8322078E for ; Wed, 9 Sep 2020 15:37:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sNE+b88z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730403AbgIIPhU (ORCPT ); Wed, 9 Sep 2020 11:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -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 17B37C06137E for ; Wed, 9 Sep 2020 08:35:27 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e17so2728155wme.0 for ; Wed, 09 Sep 2020 08:35:27 -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=sNE+b88z3vCssUNGhpsNU9MhqJzm1UaC03/QDnRE3Y22nZjT/1Amo6qflrLXB15Otz q41O3aV10K2m9xekepIcIa6kiViE5QwUJtKCjk7RWf9bsUamNWyAvLdnuV6PEKjFCXaq DAZlUlqQ2WKtOhnFAY1J/lTgUGzcI5Omw1opccMqyh4W4rvXlEIRiB0Q8+mD/kfKiO/7 Kaq7lqwsmtLUGXviTuVdU2S+SluDGjK7k5XbjSGn+HuepKXAeSopPZ+6gj+aV2mLOIBX cdubXu9zNtDMrANpXSICedKOdOZl02PS46qlS0zvl/uH+kMmztYsIhHrcK5xddxNHrRA cSTw== 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=YJtdXcS4//gO85Ff1WBaanXTk2jdOxzGqofm3KRxPMMHnn4hyu9GVbUhIov/I+Jmzz kOjKXXN1vcwwxPyGiHn+fZWdC7W2q+7QP3K3gsp998tYlFvBmdxHFhy57w73yPcB3ugJ yNzkK5V9RHAynd64cij1wfa8b7Ft2ClS1Cxh94zRrmug8D5ICKaskYTO43sMijPsY+Sx IUNEtR3e6VkKOdk7x0WFEqDJP9z/g9cqF51TKxQKWdbkkAuQjNBnxwBn0YuQX/FxZ4Vq QIL1OjZ4/tbfei/rDMed788BPOFOtSS7AnlaTnlV22TCu0eGjX0mKucRJ6EN2y0nzN5s Ym+Q== X-Gm-Message-State: AOAM533fzPHRVW7UTVi/janPFH+diZmVMgYj79ZJ8mPeWuONPi4AVSWA FHHhJ0qnxbauUjKCXGQWJSfZkA== X-Google-Smtp-Source: ABdhPJwbX0yoJltI+N9d03XcUiNnxzGsI3oHHtRZg+AZZ0n6yamRRR0uHbwkbl6wytYE/XVWAAZoAQ== X-Received: by 2002:a1c:7c1a:: with SMTP id x26mr4322697wmc.112.1599665725760; Wed, 09 Sep 2020 08:35:25 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:25 -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 v4 6/7] wcn36xx: Add wcn36xx_smd_set_bss_vht_params() Date: Wed, 9 Sep 2020 16:36:06 +0100 Message-Id: <20200909153607.2904822-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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 Wed Sep 9 15:36:07 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: 11765905 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 95A39746 for ; Wed, 9 Sep 2020 17:10:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74C8C208FE for ; Wed, 9 Sep 2020 17:10:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p1F1j9GB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731011AbgIIRKv (ORCPT ); Wed, 9 Sep 2020 13:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730242AbgIIPfv (ORCPT ); Wed, 9 Sep 2020 11:35:51 -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 4B28CC0612EE for ; Wed, 9 Sep 2020 08:35:28 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id w2so2725701wmi.1 for ; Wed, 09 Sep 2020 08:35:28 -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=p1F1j9GBStbqTAuf9N1+OYnjS5Oeo1GPYEvtZT/s0ZGkdaAvZxEXQyHqiJd5ztC2Pm G5HJASnm2OzOyhKv2IikPx3E79fI0HNY5/F6GcN4fqFQPJ7Mq3Gg6kVLljpJ9SCpylGi cKoZ1eyKPCmuUWR0VPD+uLqqHcZ2ZbMS614LUaKGBNcRdU80dCeHxHlqukYcqVxPyv/H 5eS27dXazUDRzlydUeQ2Vy/k5d3cgbflfbDvFQBYz67A0VVXOY8vYvl60AuNgbfje4ax hCg+dQyi5TRlAIUPgOSvQAocGm2AJ0eP6xgDOo2BigtjCIktuClHQ3C+t87Brh+skky6 BC/w== 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=WbNOSrc8IPRU0HOFm7CiQEmokO3ggeKJNsv9ikbVRFRGRKIYbnGsbTCuUo5lXEEA1G 9EjLOkLYkA0GiXYjNKRgGxtatuadlpCybL23LIDzaE9tmeL2rd24AxcPsPn0JByMvS2w 4BbboZDQOoceb+qDwcpKKQtIzgHBTs5dRWHxrfD87hWO2UaCMqDywUT6Fa27He4v5Iye ZRFVvB7y8efTThucluO7tb38z7S91E/Day2aCeC6JoGqo1tFi1e2tcyQkcvVabqZkV6t 2zq/iRMXTZP+ICFqvysEPEltZlpGhtNCsVqUGnJKqWZD/M+B74LkCvx+FbYeUEFxPuLa 55zQ== X-Gm-Message-State: AOAM530hrRxnWMAlDd7WHXI1WF4PwTJ+A49txabEjSou9G3mJVSYonjP yOMedUPMX5ljLVbIcGE8uoC/mw== X-Google-Smtp-Source: ABdhPJxNiriAaCOg+apnSefnPK1mEOT1tfsjULdTzgfgzopBVsitxkGSivSiuQfyBLa1YDrjJ3HmQw== X-Received: by 2002:a1c:63c1:: with SMTP id x184mr4147993wmb.138.1599665727018; Wed, 09 Sep 2020 08:35:27 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s2sm4473335wrw.96.2020.09.09.08.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:26 -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 v4 7/7] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Wed, 9 Sep 2020 16:36:07 +0100 Message-Id: <20200909153607.2904822-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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,