From patchwork Thu Sep 10 15:05:46 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: 11768067 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 B42E759D for ; Thu, 10 Sep 2020 15:28:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94496206CA for ; Thu, 10 Sep 2020 15:28:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Gr9fnaA8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731290AbgIJP0s (ORCPT ); Thu, 10 Sep 2020 11:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731243AbgIJPFK (ORCPT ); Thu, 10 Sep 2020 11:05:10 -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 CB0AEC061757 for ; Thu, 10 Sep 2020 08:05:06 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id w2so385312wmi.1 for ; Thu, 10 Sep 2020 08:05:06 -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=Gr9fnaA8iYTG7yRNU7GaGAoTGRg9cvsIndyipmaOrtLFe31rtUOq/Q7bZhEvNvs02v BhULYhRWwO7RdZXHX4AQXq5Wi5TPiSZHUibwrhwGb8hd8Czgm49kss6B8GurM4K3utLX pSJNrVpzviXq7hfQodkVFP26uefiy/e1ihVZG4y+WUO1ECYP1nbnlxpPsLKxq7Rv00EH 9hPelMGvMVa81CCdpGMtNSnu8CHQXSGI7GnV8gvV7+VEVLnLmPJ4FkT6gSvSudTC2f2q VDACqYjN4J95mFxKjCeN0NyWPhCOJEv/mzu59qXnxvA+7DE4Q+ip5YGkBTjYdPb8dNwL TYzQ== 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=Pu3SMLeiLDSqpmu0w1O7ynxJwmO+2dGSdLA87RzF1QfDDB2/wC5DbskKK+kdD2VDx8 kN92Iq7Zt0vN1PAWZ6jj5TRju3qIz/DuMbHrW95AV6f2/andY2uNW1Dn9PgBOebhpGF+ thuBERQCch/qSP6RZZHooCjIXNwRp3ZJU0dTirh+lBwjsoQVjB/Yc9jhQt659nBs3yGU JzOKxTVEQA4h6hYx/eihT3Anr47B1pBPGFQ71sf7UwPmrT0UhzncEBkVDedbXNP21sCz SpBzV8Qz5PhroYibJTd2rt78WaVwWnpPiRFDZDvf+cWewsWVncDox8c4PA8wBPYVj8rL z6eQ== X-Gm-Message-State: AOAM530EMn/pp9iPdJNvzip3781876587mUkgRSjiIYLZl5HRXK4SB7v zmaeSccZuIce38bmIpxttBb9Rg== X-Google-Smtp-Source: ABdhPJxnPgWVWGY6XpkHsUsZ4W085JPo5ACIy4DeOdDklp9774/WPhUeXH8gJH+qAmSV2jkf+7jrgA== X-Received: by 2002:a1c:a107:: with SMTP id k7mr407052wme.67.1599750305565; Thu, 10 Sep 2020 08:05:05 -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 g8sm3852620wmd.12.2020.09.10.08.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:04 -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 v5 1/7] wcn36xx: Add wcn36xx_set_default_rates_v1 Date: Thu, 10 Sep 2020 16:05:46 +0100 Message-Id: <20200910150552.2178882-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 Thu Sep 10 15:05:47 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: 11768979 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 4F69514F6 for ; Thu, 10 Sep 2020 19:47:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2EB4721556 for ; Thu, 10 Sep 2020 19:47:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RZt1wPIm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731281AbgIJPZ0 (ORCPT ); Thu, 10 Sep 2020 11:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731244AbgIJPFM (ORCPT ); Thu, 10 Sep 2020 11:05:12 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9B05C061796 for ; Thu, 10 Sep 2020 08:05:07 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id c18so7060890wrm.9 for ; Thu, 10 Sep 2020 08:05:07 -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=SKVnCy4wmdEaKgi/x5VI6aI0MpqpfMkf4mS3vr+tRpY=; b=RZt1wPImechtv562sczfWCXSD198o0wSTi3foTtwCQNCxxO7J5KM49Ya0ww0l8APrc DFBpON3JAiQu/UqyRtDdoa2oCRI6RLoLARvnf+KtCLI5QZWaV5oXA5WsJLfJgp/w+4AX Z1R268xv6FE8Ej6PieBybfz+8UKC/pXXTTb9D8JWTiDevserEsn/FrlOSWoFUt2G64pi 0FTTq9FC9sPxVQY2qzjT1Qz6mQsvFMEPHQiWYlcIKdt2nB2GrlDk136TLvVw0j7NYDPQ +Lowx/hmf1jv2VJhYGI7dCG1waJ/GaIHItJI2z/DcphwPIBGONtXeZimSL0NT43gpuI0 l1TQ== 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=SKVnCy4wmdEaKgi/x5VI6aI0MpqpfMkf4mS3vr+tRpY=; b=S3/fkeHaAWujuRn7y4Qmq59kCwQImqA+Eh7SQ9HQrMzfkmHJeJPJpWPYWMa9yInS5n z2Ep9rjR46uJQ9ME5dMzdzbwqAFfeOJQvqamMz1K8enWwbbu2Y7ng+pUvK/cEWC82bcK Art9cPLX23kyBPVEJAlCbygVPCYzNIK+ECzLOtYN5jgm3wJuq8gAvvOHciniE07/x9bp aLc5j7OQzyPmEsAjDb+pypu97x0WJctTX5vyA0EGfcYqGgTuyd09bBkDHqFTVExHQwzA 14oSDZezOlW4ISJMfzNQ/J8hn5ai9VVUFUo0JMVyPsoVCEGJSfUNc7jEFOCk0ZAO84HB SY+A== X-Gm-Message-State: AOAM531RbjaJgsSl/mnrkipziXysPFxREgqYLy6gdRKDPqfGGfD1kiCs SnsME6i8dH+VhmZuczJR8KBVzQ== X-Google-Smtp-Source: ABdhPJxh8hY07XFgWJstn87GOE1ymM+W9EAZT8wucpH2/l3S2bNDAzeqNnNV8KQQ7VDMOEW/yY527Q== X-Received: by 2002:a5d:67d2:: with SMTP id n18mr9410811wrw.223.1599750306568; Thu, 10 Sep 2020 08:05:06 -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 g8sm3852620wmd.12.2020.09.10.08.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:06 -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 v5 2/7] wcn36xx: Add wcn36xx_smd_set_sta_default_vht_params() Date: Thu, 10 Sep 2020 16:05:47 +0100 Message-Id: <20200910150552.2178882-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index d5ca9907af86..bf584ac382cb 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -190,6 +190,24 @@ 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); +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 Thu Sep 10 15:05:48 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: 11768923 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 7E7A0139F for ; Thu, 10 Sep 2020 19:37:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E9A421556 for ; Thu, 10 Sep 2020 19:37:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="evEgOTzg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726662AbgIJThi (ORCPT ); Thu, 10 Sep 2020 15:37:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731388AbgIJPn1 (ORCPT ); Thu, 10 Sep 2020 11:43:27 -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 23B40C061798 for ; Thu, 10 Sep 2020 08:05:09 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id o5so7024891wrn.13 for ; Thu, 10 Sep 2020 08:05:09 -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=7wpHFXT43hTfOLrdx99kEARdkSVehiZDUWZ0k5+bAcM=; b=evEgOTzgaaH6t8OrC3OfLOrvtmjvvtWy6/oM6kpfQZFueL4RDlMs/NaNMf46+bZmji BHWyrDr15M1vvd5h/mt6thxXPuAeX8FKslzAGvLv6f523ZSH3aM5vaoZ7vYZm3olM0Na F2/J0wlidFiQZH+2a/ym0wNxkk+ZHgu1nal2TwQzRgSvD+3CAJeq3je22NnkcbrRN9N1 fOlJUFfH+ceujS+6q0xe26LRWmPXOk1BVPSZCxHvZeC/YUvBeVJ0L8JP5bVMMdXg4cjm evAGlZPFCo2hJiFn/hIqycA2bXWmXsZsHn3ylPbbPab2oHuW2uF5NxEue+vyeg25nl3H er7g== 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=7wpHFXT43hTfOLrdx99kEARdkSVehiZDUWZ0k5+bAcM=; b=ZxYHTLWgvWVBz97C+JhOfkNzwjCct/gEf/tQLwo0aWwveQqU3ODQWGUfexm3XQnKaf GpWkElE4iSymRFNoGgssRMJ6dlNZtGeR3men4lyRtzSREfodCNYmfyHgMM6005pcUp57 gAnQFvM/l6587RxP0EL8mNCs+QRY0WQkbIEDC9UXSdjZOmjwZBQMwsy6MjA5ilkSsb4t cvESfUgVadHpOU/bXEl7bvU3y+UtSAexDx6KLUIf1fz8OSmLpAsJnM6W8JJASgWlYJvm bXWe6hwLAlcAu2Bp+cpMNyo34nRS2EQHJXJZe0gEPP46/mySELnIXVTSm5IBtGogR91f lXgg== X-Gm-Message-State: AOAM5337uMEtUs96lbn7QqkhFPM+QNdu6zXCKXtA/bPRrsE9NHFV+TcF lZ0wuLmFSUOaydGBV06cLFD4Jg== X-Google-Smtp-Source: ABdhPJzNUxBT9htfbVVzU6xcr26+bo403u2r16FXCbiC1iD+pO3xoxBV4V9NeEAnrAai1rROkANWHQ== X-Received: by 2002:a5d:4f85:: with SMTP id d5mr9470628wru.7.1599750307766; Thu, 10 Sep 2020 08:05:07 -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 g8sm3852620wmd.12.2020.09.10.08.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:07 -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 v5 3/7] wcn36xx: Add wcn36xx_smd_set_sta_default_ht_ldpc_params() Date: Thu, 10 Sep 2020 16:05:48 +0100 Message-Id: <20200910150552.2178882-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index bf584ac382cb..e926bbaec220 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -208,6 +208,17 @@ 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); +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 Thu Sep 10 15:05:49 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: 11768981 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 3C1A959D for ; Thu, 10 Sep 2020 19:47:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18CE821D81 for ; Thu, 10 Sep 2020 19:47:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XhvUAiTc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730901AbgIJPZP (ORCPT ); Thu, 10 Sep 2020 11:25:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731246AbgIJPFN (ORCPT ); Thu, 10 Sep 2020 11:05:13 -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 2E935C061799 for ; Thu, 10 Sep 2020 08:05:10 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id x23so370602wmi.3 for ; Thu, 10 Sep 2020 08:05:10 -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=f4Wm7zFdeM/PXkNGWzim4XzgHqQTMapz68tBAyod2iU=; b=XhvUAiTcPyQFkGpIWZwHI1zHlr55baPSQMkdq5SfjBQRf7DHDnQDCmA2/Jfpixf3yB ZltpY+FAT1VUZdu4L2strNyyUTYMIjqf0FZCkAZGBdIkCPsvX8Vdk5GgSaSLwPtrgbiO u/By95FDOTAosQAr4tDiLqJboOJvmF+SpWEiWbH6/giFEUKiN9l4FxWfIyRHk3/95mDZ kIwdGoU0AX09KnxNafhm+gs9lXzxBlk2klokLGlVympQZJ9vp98T3sldLMkaCMUycYB4 5AAvlUrqR3EGYivk4ymHdeY3qUtWbbH49qlme3fzpqo/Pc1lK0csmcs9JIpH22JbUs/h LcRw== 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=f4Wm7zFdeM/PXkNGWzim4XzgHqQTMapz68tBAyod2iU=; b=esmTx9odLHe9h7LezO7KDjm1IUdsEyxAWmz6n7ikwkuoT855O49bBJ8scYXXZLBpdt fN4D36r/U68AVJBGS2WTrmuoQOFDKhI0pXCQKgCCDcyEt/OA6Pb7++TRdHDZHg7sB7b1 QciCih0QFKogD2nu+VZei1JoEaBWJWTJZW55oeLoeBCF1nObCpbi8mDwn3NVzTjUezPv NBHniIInsUQDj/ZFb1QgyzHodIXuseUw3/uVrsHlSPctLbDygW+PwjGnoiyGuVh4RTel 8C198SaNVrQcS+ugWmaZuzg3SOjJZgzQ9v39/f5BAbKi6IF4H8uzgEnTlPLTcqvE+T7v JJOg== X-Gm-Message-State: AOAM530RwO+63X6U02U9X8x+bTDqNXjLkkcH+ICemCIvPBIE+W/ytDK2 p+/PjQE6cx03Tj/kSD8iQRPnLg== X-Google-Smtp-Source: ABdhPJx2RJti/ve4EreyzXH6NxnbtGYtLRaEEQevCzISnCuRTmIkXoBrgREJ5VDpNpe/vKvxbDsLQQ== X-Received: by 2002:a1c:24c4:: with SMTP id k187mr444074wmk.148.1599750308810; Thu, 10 Sep 2020 08:05:08 -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 g8sm3852620wmd.12.2020.09.10.08.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:08 -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 v5 4/7] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Thu, 10 Sep 2020 16:05:49 +0100 Message-Id: <20200910150552.2178882-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 | 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 e926bbaec220..1432f310f758 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,31 @@ 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); +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 Thu Sep 10 15:05:50 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: 11768055 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 2DC0D746 for ; Thu, 10 Sep 2020 15:25:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 112E520BED for ; Thu, 10 Sep 2020 15:25:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VgXQxDJJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731257AbgIJPYj (ORCPT ); Thu, 10 Sep 2020 11:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731249AbgIJPF0 (ORCPT ); Thu, 10 Sep 2020 11:05:26 -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 F2601C06179A for ; Thu, 10 Sep 2020 08:05:10 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id x14so7042867wrl.12 for ; Thu, 10 Sep 2020 08:05:10 -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=J7OETVLDh9JWcogSM8CDzEM26oQ0pGJijOBeVJ880zs=; b=VgXQxDJJradt6PJ+rpPriG71cFDgg04zrawTaOr0wQGs28wSCdRy6a9jMPgJFTufeq gQmZ9yqbKxUKQ5ZtrwTuZsItIbSjuAC3b3Er4JPLZfKB205+Sdudrf9tLveLx5baghF8 xUzeRMBq9gukRX+390jzn4t6aNPINlMTG5JZwJ06uM/Xl/G5xqLbsluD03kVRqMZ1clt vpwizbxuT19pzxKnGI+Rs/rEQ1vqcCE/YzCQ96IaYJapbL7j8xFJLx3WI5RQrHHR0bYW hj8JYBFrzYyQPwQxqDbIqRMIy9GdRQad9ubUW1/4zowORaqAnyqetIyY1dDz4XmWWHSW FGfw== 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=J7OETVLDh9JWcogSM8CDzEM26oQ0pGJijOBeVJ880zs=; b=L4jTg/wOLi/n500WNbnXTBaTe83bY5YhwbMsNwMUYUT2o1SHFN+QkDXzc62EwBrhBR pHyegsBaqUDE5rCX9mEzvGRFX75rW7gA2Ro0/U6gXzsgTyvwQVZDdK6Jg5b+AYqF2YkD owa2Z/f+g+4xVGK40c/84yWNDn1mZGF+kArTmPXe0ZitAaagpGZDpvUV1/UlI1/TUJVg EeBkR+KDN7kFUOicp+T9tejo3FF3ZTCrona1zyqkFnhXEVOMeFGB1cpgERAB8mk2gcRf +yAvTQFxZuYSeIuRuxM0A+qNTn9xwPVUtC3LOYRvUzOY4BytF4cr32OBAFCJuLt1Yre6 uuYg== X-Gm-Message-State: AOAM5328uS0JXkKEx08soUoaWYmS0KVXO2vMifD4deRq2dwk2K2KOV0d MGrnVPT70UmBxWeRFh9Vm5V5Yg== X-Google-Smtp-Source: ABdhPJxdTzHFg2dNDzSnltVUbVyOFhFAS4b/miIRWMD1tkzilNTT/H5qJMNHwFYK3IYFnEvy9fNBiQ== X-Received: by 2002:a05:6000:d0:: with SMTP id q16mr9492606wrx.24.1599750309722; Thu, 10 Sep 2020 08:05:09 -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 g8sm3852620wmd.12.2020.09.10.08.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:09 -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 v5 5/7] wcn36xx: Add wcn36xx_smd_set_sta_ht_ldpc_params() Date: Thu, 10 Sep 2020 16:05:50 +0100 Message-Id: <20200910150552.2178882-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 1432f310f758..ab9b6116cc75 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -199,6 +199,17 @@ 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); +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 Thu Sep 10 15:05:51 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: 11768921 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 97AFE618 for ; Thu, 10 Sep 2020 19:37:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 774ED21D91 for ; Thu, 10 Sep 2020 19:37:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IZI9RjLP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727070AbgIJTfb (ORCPT ); Thu, 10 Sep 2020 15:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731386AbgIJPn1 (ORCPT ); Thu, 10 Sep 2020 11:43:27 -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 20760C06179B for ; Thu, 10 Sep 2020 08:05:12 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id w5so7058063wrp.8 for ; Thu, 10 Sep 2020 08:05:12 -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=HqHLp1msqI2btcU80XmiahuTU9fQPQhG4xjHOmh9N3E=; b=IZI9RjLPsZtDmR1K6FXBEjSuD+Nn8XBfF2l44tXm0qvaW8Cf+ijXJauAxJgho2bJzI qklqQzKv/SLavr7ry8CIIZ8NUzpOIgzoah8yBgFHfIkFFBAl5FqSESxmZZOvAKvotj9q DiAfgr4fi3MNWc5Socz04euqF0bVEx9+ycSDimrQHbtPr5QUygJZPob2CGmdK42jb/ij kFMw/3RdSNVe/Ou0WMrjwKDDelzkltWR1anyntKVyVbRgksFTzovPWkVM1K5u+HhkMqB ynFJWe0AddxwePCeBeGHeG33/cwbxGWXl+7dG9naBmkfRNB5PgR2XUJ4QxSAvH4tI4dk 9d5Q== 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=HqHLp1msqI2btcU80XmiahuTU9fQPQhG4xjHOmh9N3E=; b=C+QiLihPlK+r58pQJ7tOPAPwsG5OVhjLgNWWdAsaqgKbuAt3ohx1KIkVYeCt143gHp ds0QEmXM2W+g0NawjmVvgbaFy+twqYEMLd1ag8JGDcOC+uQDftkq9MTUpP7iVUOe9hyw TYcv0BSpwbvxCXP8F153u8rSL5RMn4wSr2Ba+dBBgYdFB+kVAmK4K8cLvC+y2/LzNlUK bFu0xR8JpIi3PVNyUNWD9c+S89s0VkPFKsZPDupvMxTdtXgT6ZkprY/U74BGU3PWjWaG pk7+AKyj/Oc+5H5x8Z99Rjzd8BMglVgl3Tcu56M7nXzkqlbuuee+8agLowDUxWg2JbKs K+jg== X-Gm-Message-State: AOAM531RIA7Y0K7FczOeuqs66XW6lVTp+x7n76T+CXpDG8zJZ4nzpBaT bqoUZ3DAxsVtQYJGf3EzNemjrA== X-Google-Smtp-Source: ABdhPJyZFhVb9R3SjF9SkGY6h0CvLw8SSbRilNUwd8SBUI/pc1eG7//X129ygYMjaZQA22XT53vWPA== X-Received: by 2002:a05:6000:1184:: with SMTP id g4mr9551476wrx.20.1599750310677; Thu, 10 Sep 2020 08:05:10 -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 g8sm3852620wmd.12.2020.09.10.08.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:10 -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 v5 6/7] wcn36xx: Add wcn36xx_smd_set_bss_vht_params() Date: Thu, 10 Sep 2020 16:05:51 +0100 Message-Id: <20200910150552.2178882-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index ab9b6116cc75..d5089aa382bd 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -146,6 +146,19 @@ 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); +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 Thu Sep 10 15:05:52 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: 11768985 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 738C0618 for ; Thu, 10 Sep 2020 19:47:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EE2321D91 for ; Thu, 10 Sep 2020 19:47:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KWF1TE7u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730720AbgIJPYr (ORCPT ); Thu, 10 Sep 2020 11:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731248AbgIJPF0 (ORCPT ); Thu, 10 Sep 2020 11:05:26 -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 20050C0617A1 for ; Thu, 10 Sep 2020 08:05:13 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id x23so370760wmi.3 for ; Thu, 10 Sep 2020 08:05:13 -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=CAsNGz4Cs4vTJ9gk8zApIj6qmRBVcghapi1gG95W8wE=; b=KWF1TE7unzAEhs8mBdAaCBqHg8xU0QTmm/1L49vgLG41pjIppgCTYMAuxQXE147tVK v+8eS110ObbZb7k0raX1jkSZH1UhLIjImIHJZpgSPlt5zDS9Xk7X8vP5i2XHKeiKhRHM n5EsAqCEKxyQigYfdMFfIsjRjVtdh9Wu8v3S7EIjYJwUNat3RCmYP8xfI2IEzfIdzqqF HSjf3B3SjiSDM4CdHSJsaFduFAzIAjIZLXVcpLYMZkBTJRa2suyrBJp0kkhBOZp19iI5 yjOr+HRfz/5pK7wuEBctRXhwMAv+nPGfUUhhaOQZVLqgqSst33oE6o18+qBVhjOTrAZ6 JbcQ== 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=CAsNGz4Cs4vTJ9gk8zApIj6qmRBVcghapi1gG95W8wE=; b=U+bSGX83WUAvGwgIIsMj+tN+wsm8tDrGI2Fo1ynK3XMNFiPlJygl/UQP/4LJiN4sRs LlvRolRNS572oVC5CrhygJaFdR6FHc8enlDBMDmA65rRyzVPbIy5/OluvvcfnUEVqvm7 W4k80ndt9uMwLgejmsplrA+RSBUf+zFPcyjbU3JMeuATAR5HeXVWQq8o08YVzNBClLpn 5TK8P5YMD+P/fOesospw92NNe36DP5Kvj+rwlRz5DJ6xT1gFmEdzkg7W8k8Nu0QHHSo3 0JsRNNUXAiYK0FePRq9PLClTcY72OMHH9QcEMvPax3B1vF6M4AiWLSEMHgcRLZEWfwgD AKgA== X-Gm-Message-State: AOAM531MeslUo0aHYlLtD6C+6CJiBkLVibOFxp7P9l7hUUDnNyI3Jsu4 TvlH4HaGrCPeDZTf27qIC9BAzA== X-Google-Smtp-Source: ABdhPJzgPl9pTQz3rN2OGcS68x08jmBI2PTo1MVeEItk1UFjeMzU3tt3amQuONyoRYPwvIy9YP7OcQ== X-Received: by 2002:a1c:740c:: with SMTP id p12mr435592wmc.176.1599750311807; Thu, 10 Sep 2020 08:05:11 -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 g8sm3852620wmd.12.2020.09.10.08.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:11 -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 v5 7/7] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Thu, 10 Sep 2020 16:05:52 +0100 Message-Id: <20200910150552.2178882-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-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 | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index d5089aa382bd..71ecf3ef5ab2 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1262,6 +1262,36 @@ 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); +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,