From patchwork Sat Aug 29 03:38:57 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: 11743937 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 BF863109B for ; Sat, 29 Aug 2020 03:38:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A367220872 for ; Sat, 29 Aug 2020 03:38:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Bwwm4eyg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726929AbgH2Dip (ORCPT ); Fri, 28 Aug 2020 23:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbgH2DiZ (ORCPT ); Fri, 28 Aug 2020 23:38:25 -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 9CEE6C061233 for ; Fri, 28 Aug 2020 20:38:24 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id k15so859566wrn.10 for ; Fri, 28 Aug 2020 20:38: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=QqDt11mrhmiC3IjI/UjDrW3b5x9edV6yQCJKabdElZ4=; b=Bwwm4eygLWjAmmtikit2YuIr/6cNiQeVC3PE7wt6HWj4QyY/skq+bv6NJY1COURw7N iV6dIQGzFXnuo6enxxIfu2gwMHUIlrIlPLH/QCRVx2ZwjPVWbZjYoEqNQD7xm7u9HeDC xPEaMw5HOnvBs71OAOdIqvVqijCXywiaPljSR/A1HjDB90u5PhlSZx59/Gj6vCp9+KOD mulfAj8MHQ82v00Oc8ZNESviG7joVGHmoku7ztOKxUiqK4SaqqHTXxp0lhZj9L1Wt5/y MK89fRPM1/WnXhyuWHMclqPTzP19TDxEPGxtkDjfxUWcvBI8/OmQL/yxbpmN4y3xUA8Q /T5Q== 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=QqDt11mrhmiC3IjI/UjDrW3b5x9edV6yQCJKabdElZ4=; b=opHEbBCjAA0lxAidywpsMVl9vfKBfoS8TtA0E7NCsq0PPcDbM74m5M46+OYXUCbQ64 iMtCjUK9XahOEW8UcvFMFsXzhu++J4jT+CE3pf5tsod5dLdE7kb+2U8IOVEEZpQfLe63 Ox/SOi+r9DWIYPKq+4xvzVpaheu6Sw43MvLIqD57DtDWUR/pScbV57G4IG3OAbKdPMFW 6U+Lh6XiacKW5+dmQm+/EPx3EedvZcSQ0Rb2H2/XLV8hr3sAitS/VpC29fioQpBLzWCQ +U81GV+2ngyolCu8DJNS12r/8vSQmSzlkzjp1ysMBFNTbfrM2o5reiMfxpEliER2r/8o WDxQ== X-Gm-Message-State: AOAM530n+M7mj5ZXzK6gwihHNDUmr6U9xwNXr9HJy3vZPjBasAwVu7jo CwxVa1we7Ktt4qwzOUxW3aaW2A== X-Google-Smtp-Source: ABdhPJyVnzToKikFTB2/QFxGZl8CHMU3ZqrkLCq4ZhVES3IO/49nlw6cJb6rPfOshDLBeKVtGabDoA== X-Received: by 2002:adf:c983:: with SMTP id f3mr1675278wrh.348.1598672303342; Fri, 28 Aug 2020 20:38:23 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38: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 v2 01/12] wcn36xx: Add VHT fields to parameter data structures Date: Sat, 29 Aug 2020 04:38:57 +0100 Message-Id: <20200829033908.2167689-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 In order to pass VHT parameters to wcn3680 we need to use a super-set of the V1 data-structures with additional VHT parameters tacked on. This patch adds the additional fields to the STA and BSS parameter structures with some utility macros to make calculation of the structure size easier. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 573799274a02..3cceeaf0136f 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -1592,9 +1592,15 @@ struct wcn36xx_hal_config_sta_params_v1 { u8 reserved:4; /* These rates are the intersection of peer and self capabilities. */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10 + struct wcn36xx_hal_config_sta_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_sta_params_v1 sta_params; @@ -2015,8 +2021,14 @@ struct wcn36xx_hal_config_bss_params_v1 { * "STA context" */ struct wcn36xx_hal_config_sta_params_v1 sta; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2) + struct wcn36xx_hal_config_bss_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_bss_params_v1 bss_params; From patchwork Sat Aug 29 03:38:58 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: 11743997 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 982731575 for ; Sat, 29 Aug 2020 03:39:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 809B220872 for ; Sat, 29 Aug 2020 03:39:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="I2ght7KY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727824AbgH2DjT (ORCPT ); Fri, 28 Aug 2020 23:39:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgH2Di1 (ORCPT ); Fri, 28 Aug 2020 23:38:27 -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 8F975C061234 for ; Fri, 28 Aug 2020 20:38:26 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id h15so847869wrt.12 for ; Fri, 28 Aug 2020 20:38: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=VWQ4Mgj5nJFptUvhPYJTMNqJmysjiQoavD7tKrDaEsk=; b=I2ght7KYE/B5nH2d5bhSaDOCKvd0k1yBR5ZhLE/yT9OApX7QSRPgs0E+vJjKJEvRQ1 zRoM6Sah/TVJaU0BsCI02iIEipZ3Koj3JQdREkIirjjNY6B1mePBDQDwMhTjJOVmlq2h INg01W10mTrQolzhIy4Cd2MG8Z6Bc8lsxbYnX8h3JhzVMuaZJaN7jqfQB1TX5OzlVs96 DnT6Rg1O6721xBAbeyh72wDZww9UwDK2nWOhAQwyNWXn2YXTuG4mZ1II/8e5Cvz32VCZ iKUNXLKSmyEdN7XEhHboVcwjG1PwBaAEHer6ksDhxQc6x0c+Dpb9UDtxEqrJn8AEjTDC oyhg== 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=VWQ4Mgj5nJFptUvhPYJTMNqJmysjiQoavD7tKrDaEsk=; b=a6Atq+zIQk7rr+qAJ7QVecMw2a+Ig3wxSlwpcq1Umzpj0cWqPmEieaiXjVNLOlrvGP d8a8l15eore5vBVdoZgsXI5VsSrjyV1tW47BWdeTNtUBPlIO9p2sQfhHmxy8NVoqIfLO vU8zz3JgHeAKhexw5BraynX9zo0MZ4KYr+qnFPBPQn1tNLeQRRY0JArqsccNpZlHevq4 +7a4zCYwkV2sCeUGr3Ssts1uUehc42tJnfP6p4OO9XbqOwgMOFhOIj+3NLGRIKL4r9NH tZ2Xj3vGA13XkfWSZA76S/0ZCW5dQZ4M3LD80qjh/5kErWgpaUYJangSunV6hgrxOM1t JyCw== X-Gm-Message-State: AOAM5321QmQW9KuUUiot+FX0+B0EnZIdW6Ejjv4DfqwULx8WlYs/mGvx n5FnT7nSsf2AcAlwk9DQLc+wmA== X-Google-Smtp-Source: ABdhPJwPCnNoj+JQq6W3LPaPE8I+08sepY6ZOrs3FJzgnWfHFef+jvWjiyOPumjrjFKyxwx06V+ltA== X-Received: by 2002:a5d:540c:: with SMTP id g12mr1687315wrv.120.1598672304240; Fri, 28 Aug 2020 20:38:24 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38: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 v2 02/12] wcn36xx: Use V1 data structure to store supported rates Date: Sat, 29 Aug 2020 04:38:58 +0100 Message-Id: <20200829033908.2167689-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 patch converts the internal data structure used to store data-rates from version 0 to version 1. This allows us to extend out the internal storage to represent VHT parameters. Using the extended version 1 data-structure allows us to avoid a whole raft of version 1 specific fixup functions. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 5 +++-- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 4c30036e2e56..8534d36c3ae0 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -242,9 +242,10 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, sta_params->aid = sta_priv->aid; wcn36xx_smd_set_sta_ht_params(sta, sta_params); memcpy(&sta_params->supported_rates, &sta_priv->supported_rates, - sizeof(sta_priv->supported_rates)); + sizeof(struct wcn36xx_hal_supported_rates)); } else { - wcn36xx_set_default_rates(&sta_params->supported_rates); + wcn36xx_set_default_rates((struct wcn36xx_hal_supported_rates *) + &sta_params->supported_rates); wcn36xx_smd_set_sta_default_ht_params(sta_params); } } diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 342ca0ae7e28..d7d349de20e6 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -169,7 +169,7 @@ struct wcn36xx_sta { u8 bss_dpu_desc_index; bool is_data_encrypted; /* Rates */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; spinlock_t ampdu_lock; /* protects next two fields */ enum wcn36xx_ampdu_state ampdu_state[16]; From patchwork Sat Aug 29 03:38:59 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: 11743939 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 5D01E109B for ; Sat, 29 Aug 2020 03:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 463C220872 for ; Sat, 29 Aug 2020 03:38:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DywYRRRp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727044AbgH2Dir (ORCPT ); Fri, 28 Aug 2020 23:38:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbgH2Di1 (ORCPT ); Fri, 28 Aug 2020 23:38: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 9A85AC061235 for ; Fri, 28 Aug 2020 20:38:26 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id k15so859598wrn.10 for ; Fri, 28 Aug 2020 20:38: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=nY+hO7+YD8XCHQqADSniuLxqB82KrBsfnqLkBYlMHwY=; b=DywYRRRpr+7zl7H02erezX/Lq8ylwnbjDFT4gFborvKHBdMYy3UF3+9nEERLiYona3 ELPKUI4yewnjsv6phO2TCMDA9FO2ijTGHhLW3Gb02WLoryph8ntLtFRqhALntGuF4DIh 11HlZU0vJMgnR8mq9hlRbLsHvunQGIfrzQGdxl4z7WPbsKeYcmHA1W6GpOBgt1Pfrhp8 6TXXIj5ken5Om5GF+lCs0/rdbt2p/vBjt+E9W+McMwHROj9RB/+nIz6jAUKl6buV941M wrCAAmqTjr1sqos7w5NcAQddxz4mVeNC5P04JmNXaaHAYBvNDMoYKCvZSm684F1sKwVS 8Odw== 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=nY+hO7+YD8XCHQqADSniuLxqB82KrBsfnqLkBYlMHwY=; b=KykKyyDN/Qr6CeZC+0+5CO3JiaWYvwZFwJQN8RfEa/qMeMvjqdocKKBZx51ELx/iAu pFc1ZHP5I45tKlqPi9w/feye+4146NkXrOEJueG1CXVkGDL/D+PUSPHQVZt+o1WV6mBW OhuMznMSoCFnCw8po1Be83NsKS+Fq7W96T9qzvozAt6bbsESGSziDLocMoY+l4AZm0ZO QR6HhIoTVYBio9XuWIMVguiqUQqyRKOfHK3Aa4vmQg/PDV3DuBcEBjWqDphiuB0XkWeK Lb3XceeKyqNZFowCbhKpJuk8g74rGVkyx1XfeSPsZBxb3BYzx07m8o5PVocHA6agbbWs c8Iw== X-Gm-Message-State: AOAM531fB1I8RdfhOuOmbUo+dPic4Sn+K/xkdgl+wHJepIqPwqQxY0eY YFPxJvdYTM1Dt3J2I5UEHoaLZA== X-Google-Smtp-Source: ABdhPJyxFvU7DRBDqBwqV/HpYizqxnqRqs7ZfX8FrFLY1OkjvaJXJaMuhA5mSB9P2MUT3Byfp+Nd8g== X-Received: by 2002:a5d:66c1:: with SMTP id k1mr1695903wrw.8.1598672305271; Fri, 28 Aug 2020 20:38:25 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38: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 v2 03/12] wcn36xx: Add wcn36xx_set_default_rates_v1 Date: Sat, 29 Aug 2020 04:38:59 +0100 Message-Id: <20200829033908.2167689-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 08e23dbb60fb..d589a00d901b 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 Sat Aug 29 03:39:00 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: 11743977 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 B2D171575 for ; Sat, 29 Aug 2020 03:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C24920872 for ; Sat, 29 Aug 2020 03:39:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="csGKY3VO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727818AbgH2DjS (ORCPT ); Fri, 28 Aug 2020 23:39:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbgH2Di2 (ORCPT ); Fri, 28 Aug 2020 23:38:28 -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 D8C4CC061264 for ; Fri, 28 Aug 2020 20:38:27 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id z9so855446wmk.1 for ; Fri, 28 Aug 2020 20:38: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=rRqKSMYLkOaKma6hces3R6ozgO9nu1SFFWnxLHLzpL8=; b=csGKY3VOY9JXG15H2u4jrtOYlIQk776WhWvFofhzxxiSCkgWBkL28SQMcxyI6srSdS eZEOMmswzv6cOe4kp8l2fmRkk5HOUIMnrEpj5YeqYcYD0yQCmIfkJpXSdLO2t6eC7YrL Mh6LRpBYM4XvNiqRRAXP0TxGywBqhrqVcxB1re+dqHtjtF3PDRj5wtOqxHStVZW0rtj8 YNCEI2buzQwdDjoBIi8XHbksbK47Mkd4ndALhJgu9LMsRd3i+YpI/H6YMTBoxGw+AMxT o530JDYGpcamEmZuti06r7ZFIf14ShN9LcOWeXl9koBG8j3thj8yGVRh9NAKQy99PW6G nXmQ== 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=rRqKSMYLkOaKma6hces3R6ozgO9nu1SFFWnxLHLzpL8=; b=lr7v/dL0BPh78NRLPkHNTDFmIxIfMgIDdbhPJn74bollspHLIMWQHchrJ2mbwPVS8Y 0BURCfqrZU99I+WJmsBC6zG+hwr04lcKPbIYn1VXkJxmnrN+2O+MeamXAawjTGe4moN6 WaH44hHn3pYZ6Ov3RCE8IQNIqE7Q4jVx7TzIIErLs7qAf1yMxEF+HCQDqnEU9x6yt+rV lNkIpDXupaBQuoZqTDvIZmbigWCTkEAvydbK7tDDAcjEvQeoXtr9y72CPnE5ppg5z6hq DivrE5S+mNcy/1qUjpkX2cWrzkeYNdLpkYARVWUAPfdBLQx+tE5D2kLVFIIs/bDNUfnL qOfw== X-Gm-Message-State: AOAM5311fPq57AJoWXxxowD5yC2rFJdr2/Rm1vqoZj2BR4o3cZmWb6cR V6WM9YLSD5zrG1+tS5o3LiDd8w== X-Google-Smtp-Source: ABdhPJzXCMP7zOHEhe40suPZ0eQGMQprioaQBpdzl4Rd4/BlT6Jc6vfrgTnCCZ4cXmOgUEgHrFmwzQ== X-Received: by 2002:a7b:c397:: with SMTP id s23mr1544014wmj.174.1598672306206; Fri, 28 Aug 2020 20:38:26 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38: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 v2 04/12] wcn36xx: Add VHT rates to wcn36xx_update_allowed_rates() Date: Sat, 29 Aug 2020 04:39:00 +0100 Message-Id: <20200829033908.2167689-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 VHT rates to the wcn36xx_update_allowed_rates() routine. Thus allowing the driver to latch the declared rates and transmit them to the firmware in the same way as other 80211.n rates are. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index d589a00d901b..e92907a33443 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -766,6 +766,14 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, sta->ht_cap.mcs.rx_mask, sizeof(sta->ht_cap.mcs.rx_mask)); } + + if (sta->vht_cap.vht_supported) { + sta_priv->supported_rates.op_rate_mode = STA_11ac; + sta_priv->supported_rates.vht_rx_mcs_map = + sta->vht_cap.vht_mcs.rx_mcs_map; + sta_priv->supported_rates.vht_tx_mcs_map = + sta->vht_cap.vht_mcs.tx_mcs_map; + } } void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates) { From patchwork Sat Aug 29 03:39: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: 11743963 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 EFD2F109B for ; Sat, 29 Aug 2020 03:39:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D864820872 for ; Sat, 29 Aug 2020 03:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zI1RbSbS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727777AbgH2DjH (ORCPT ); Fri, 28 Aug 2020 23:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbgH2Di3 (ORCPT ); Fri, 28 Aug 2020 23:38:29 -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 C6A82C061239 for ; Fri, 28 Aug 2020 20:38:28 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id w2so887364wmi.1 for ; Fri, 28 Aug 2020 20:38: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=F8NDadMddxQkL9vVY4EL66xho6wVXd/4Nkgt+tvWO/s=; b=zI1RbSbS0/45UpyCgu7DAsld3+IS12Zy14XjROrsdhv7V0UfnWJraO8TBPk+Je1dZF MrdFmE3bp1elt7clnECQQrZvjUwHHpJEd1vCB54dcavHw4AQ0wpedg8EaFyxO0HL5LPg fkasMjIPvmmF6z4IqbXUfrtG3LGi6e/tHavpRqP2AWrc7b1ZpQ7jOM/GCECy8vy1uG58 3hsQN/E2CWf0MtPB/6yF+fxZ9Meu7no4KXPHzBId86XLpaDSXdG7bCMYcvXEue0pQ2/p dsH/KMHq4TVNWVmpbovFGH7sbpOM8EXW9CF+NxFXpjrt8UYYD6ntfv+6CrRWkoq4RiaK wU0w== 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=F8NDadMddxQkL9vVY4EL66xho6wVXd/4Nkgt+tvWO/s=; b=rpRqJlNLAb9uTrrrDxqxeyNV+yPnoXMGfKIiwQq6hklKXh7HGH9xQLZGuRa6SSFKgH C5kTuZq5YpVjbhtMfDyRHtUbapsV/Uuk8i1QYSIiszYgF0SyT7wlE0UV4OA9anzL+O1C Qp12q72AVPQ9letxobjYKijdzLYsubTeZNZrSsT3+URwT9ZT1zgUNWiE/NPMCjHzucJo gVrbRa6USjDDzYn3OrhFxN78sfykVRZ1hkzGvKRw6MvWAHaWDKLBD+aLcwmNqpr4JArz iaMrnQbpC5KIeUIu6yAiC3EzsqShpWWSMPVVQjM45Hwx2ovhtPG5lmkLOuQ4AUUTLjQn +qMw== X-Gm-Message-State: AOAM5303EWIp4Oz5rWBnlaKBJw/wBqPaaOn653trps20JrVUhGHIfeYY peY2WEaYzOyOgvuljAKCkJixMcBvOzrKHdRp X-Google-Smtp-Source: ABdhPJzOIQqETkT5IpauLJl4zCHcOR+Cxf45SSV0o6XDX2rM08bjPw4tpWwIF6RWcIdImd6QsMMeQQ== X-Received: by 2002:a7b:c116:: with SMTP id w22mr1510021wmi.149.1598672307502; Fri, 28 Aug 2020 20:38:27 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:27 -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 v2 05/12] wcn36xx: Add wcn36xx_smd_set_sta_default_vht_params() Date: Sat, 29 Aug 2020 04:39:01 +0100 Message-Id: <20200829033908.2167689-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 8534d36c3ae0..45359e72a877 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; } +static 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 Sat Aug 29 03:39: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: 11743943 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 31416109B for ; Sat, 29 Aug 2020 03:38:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18B1520872 for ; Sat, 29 Aug 2020 03:38:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tFc+jhuO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727058AbgH2Div (ORCPT ); Fri, 28 Aug 2020 23:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbgH2Dia (ORCPT ); Fri, 28 Aug 2020 23:38:30 -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 1A227C06121B for ; Fri, 28 Aug 2020 20:38:30 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id o4so906020wrn.0 for ; Fri, 28 Aug 2020 20:38:30 -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=Nw0ynGFCG+q9mOyMnMyXRqRYzplLQrlsLY+fl+O+R1g=; b=tFc+jhuOvaf/IhUgxEvbzVJtii6FUuS3haW2/YczCBTPs3vneSeda95BNkYMnJ+vrc bxSWG21p1VyM9Ndoj/RQ0pT/2qUS7s6TRtksUqgGMhEuKZd68u064NWakbZynEVjDJ5T TkX3wZINdU48/UKp6JE/pgxTp2ZnT517UliFTJ0JULKeEzhYrm9UJ7LiVdAoTTvJsCSV d4o/26NsTQwHizbxrYEcFw6bK8DFjgJWYDnczjuDMYFeVWyzjPcW4L/MyvYCsb4ylnAl LsllhwmRJUtqdLPqLoWccAwewEyD7wZfPC5MTcn07+f+Oi0RRT7aRM5ZnZXrynBJOx8x TwIQ== 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=Nw0ynGFCG+q9mOyMnMyXRqRYzplLQrlsLY+fl+O+R1g=; b=AUUUo4u+KhXaWjY5uMnGT8pWGcLeuhn8YHB3U/sdh5RvnaOLkrPxQ9cSyzuRMt0Ogf zHDn7dDPjzTrMvlNV5NqKxpwEeGHD3am3X3Fsqn8ZKMg7M/wl/RMNra15DNy7zvUKSTs xtFbjxDXuYTtK3xq1dHlli2GG1+qoyBW29iYpVfRtHTyvz3ytVvg68cb6JPKuinIJ7x6 OhRfqU1eOqUE+oS9Xj/bqAdtt08JqXfVvEuL0mYVDqCiXFZkeWEI+9me4KgHD9hqDi3H Y0c+zZJdjisiVGf+2ov3yie8Vt4kaU+uXgHh/QwDhuCKtL27rcSCXCTa+x/eOKPI88Q5 47xw== X-Gm-Message-State: AOAM533UjI59/wfMVvn3apjo5BWPfPKRBCL8H3t9HPcX5kDzU4VyCGOH ztJ8WvLRxalzDJUxOYfKSpO2CA== X-Google-Smtp-Source: ABdhPJxaiWQ/R0idFEhmB7YXIcENKD3bfog0lZsRJT/Np4W+BPL34uXSEEk/uUAIlE/D0d9h/HdDtA== X-Received: by 2002:a5d:458a:: with SMTP id p10mr1781530wrq.187.1598672308820; Fri, 28 Aug 2020 20:38:28 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:28 -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 v2 06/12] wcn36xx: Add wcn36xx_smd_set_sta_default_ht_ldpc_params() Date: Sat, 29 Aug 2020 04:39:02 +0100 Message-Id: <20200829033908.2167689-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 45359e72a877..cf20a0f63259 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -206,6 +206,15 @@ static void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, sta_params->vht_tx_bf_enabled = 0; } +static 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 Sat Aug 29 03:39: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: 11743945 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 5E32B109B for ; Sat, 29 Aug 2020 03:38:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3EA6220838 for ; Sat, 29 Aug 2020 03:38:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="chkDDSvX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727054AbgH2Diu (ORCPT ); Fri, 28 Aug 2020 23:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbgH2Dib (ORCPT ); Fri, 28 Aug 2020 23:38: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 10C8AC061236 for ; Fri, 28 Aug 2020 20:38:31 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id s13so870802wmh.4 for ; Fri, 28 Aug 2020 20:38:30 -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=TmR05A4AK9OYzFaj9nhkuPpkc17LEC7HRemOYw1ipAM=; b=chkDDSvXyNhrlh1LTOIS4kjVq/z8+YDiHm+mGi0xHbX5Z+p6tVgWEP76vX1T+YdJ7Y fn8BNI1hq98BdC9JnWYMcn00sLk5aNJ3WtcqSw4D3ofaHeekkXR5iqGFEQOxZ4pKjCBC MVNMOc0YCji8md2v0Od7Sw10neR8GBdE9MLHREjWbneYZFZz/xjP87acfiV+wp8hI7SI g+Sr7RYwwG0q0Tof6LiBcOFh5w3IK2g1ehk1cxPfI7UqPia5jGHa7p01rq41dsZ4QnFu VRDki7nJdYuSyL6PP7TTG7iYSAmKuCnSAzpyrDoVLSdjgYun49PkH2uNmA/SasSgsyDw ihHw== 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=TmR05A4AK9OYzFaj9nhkuPpkc17LEC7HRemOYw1ipAM=; b=ifQJOK3I0cuxBKC0nST+SmpJTNZJOD0asIBWxFO0+3GgXk7fNM45VONrPZJA8C+Vzy 2zBq0Jfh93bE+7myTb+Jm5hmT2jxFGUPTR9MuGeRasGvFhF8PR83p/3E9Ry2Z9v+8yYh t3V/wtYP7REm5SSZlE3IA/Dvhx45B0EWxauC9Inom2OJLVN7f62avq8AXRgoFX3/Gz/8 Og+yj3yORwzulI+Tj2XQUVd59oy/qdgtOFAT2Wrg1nMK7FPTM6MxKRQgFOltQTG8SFSH pM7R1hhtcSFg9qLAabCVZW1BIn1CsVBGzRTeGKj2894ETNYu7n0RtR0t+ebpP+9fA2Ur ytog== X-Gm-Message-State: AOAM533S62n/i9XhGVhDieIneuCXgCmQxW2hhtiEPTn6jvyN9S7Px2n8 2uP6bIMZrD0UYgiXFTaQxi/EGg== X-Google-Smtp-Source: ABdhPJx4y9LSGi/OIH6gEh8R7fURUj4ACslBLW327W98NCoJvT1MmLNcZw4pj9ZJTsMIZRCpKe+bDQ== X-Received: by 2002:a1c:2985:: with SMTP id p127mr1431306wmp.166.1598672309743; Fri, 28 Aug 2020 20:38:29 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:29 -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 v2 07/12] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Sat, 29 Aug 2020 04:39:03 +0100 Message-Id: <20200829033908.2167689-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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. The bit-field TX-BF is purposefully left out since wcn3680 is the only wcn36xx that can do VHT/80211.ac and is not TX beamformer capable. TX-BF is a dead bit. Similarly 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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index cf20a0f63259..e44e4a21153e 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,26 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +static 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); + } 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 Sat Aug 29 03:39: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: 11743951 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 191651575 for ; Sat, 29 Aug 2020 03:39:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0144720872 for ; Sat, 29 Aug 2020 03:39:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vfzq8nAR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbgH2Di4 (ORCPT ); Fri, 28 Aug 2020 23:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbgH2Dic (ORCPT ); Fri, 28 Aug 2020 23:38:32 -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 03563C061237 for ; Fri, 28 Aug 2020 20:38:32 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id q9so878010wmj.2 for ; Fri, 28 Aug 2020 20:38:31 -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=YukgF9ny7x7bUouMS+yibqhw3SZTHLceFKqCja3C2JQ=; b=vfzq8nARrDNrxKHgWhybVRWKHk13HdNHCNfoZgcR5bNWd8iN/NfR0vDreMK45Pn6zD +Mc37QIf8lB+ufdVsAOA8vtmUCk3YQMAJEfwyjzugO/ebFzcsWvWEjW+nQnBBTXr3sYB U4ynH7PHySupCczEE/sy1pQhs06Cfxp6nWVu2vo1CXOHfp9VmLggScttxLhpzrLKy3F7 6rAhjkTTVXHS7xLr+id11IcF/WUxSMvuX6WhQAJCMAYLIwzvNSOu99doWER/r1sec501 dLkS7tH8l54/DnN+bKaM2llbk1/DJ0INfMPv6B+NVNc0ocyJdTYshP1QF0mRE2buHDDE cHaQ== 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=YukgF9ny7x7bUouMS+yibqhw3SZTHLceFKqCja3C2JQ=; b=uE3UYURnVRPvz2TNZuyTHeKr846xujE0HbcwD4IUTg5a+/mp7dz4XegjLUse3pee3X zXCg6n++xEiIXoJOJ7MfOUWwNgYLaGgdRxg8ncfcijAkfqUpNbDEVwm7yCKq4cEyvs1h M3/c/HOtSlImLI7QFXc9EmtG+gOJ2PeeWykUv0PwZxgaYCoNn9e1MvjSdCZqQBUUF2QZ JS0dM+3qKcQVBDgpgBvsDEl9T9Utaofn9Ltjv+hcWMcW6wPEjCVoF+eLe+TgrRDv7pn7 mz8cJ5SNF1B3pzWkmCOMOUQm8VZU6EU5NOV4fDyqoCqs+MTmyA1GHX2amdSjFPJqct71 /gaQ== X-Gm-Message-State: AOAM5309+qkdy7hVCGbHJNn+DNsU6qyxVFGIF59nI/LX6QQ6PmINGlZe yq6oI0JQrrFQE8VBtv2V3Reb8Q== X-Google-Smtp-Source: ABdhPJyIqSR9qiGEWiytOGLh5MUVvsW6fZ6DxtRRjH2wJUqvyfmXpDZKTaMgG5IQPuzKoXoOVJB52A== X-Received: by 2002:a1c:56d6:: with SMTP id k205mr1465262wmb.88.1598672310743; Fri, 28 Aug 2020 20:38:30 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:30 -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 v2 08/12] wcn36xx: Add wcn36xx_smd_set_sta_ht_ldpc_params() Date: Sat, 29 Aug 2020 04:39:04 +0100 Message-Id: <20200829033908.2167689-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 e44e4a21153e..a6106ba9cc89 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -194,6 +194,15 @@ static void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, } } +static 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 Sat Aug 29 03:39: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: 11743949 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 94F9E1575 for ; Sat, 29 Aug 2020 03:38:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BAA120838 for ; Sat, 29 Aug 2020 03:38:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="c5csRQit" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727075AbgH2Diz (ORCPT ); Fri, 28 Aug 2020 23:38:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbgH2Die (ORCPT ); Fri, 28 Aug 2020 23:38:34 -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 3E550C06123A for ; Fri, 28 Aug 2020 20:38:33 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id k15so859702wrn.10 for ; Fri, 28 Aug 2020 20:38:33 -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=LAUjl4qBWaw4FcREKzPLcJ67Zc3Yyp+jTDTvGFFFspg=; b=c5csRQitPGDzMhYdd0ShpPj6QcsJdqwWprevOTnXxEApgBLAqjvR4YO5xjoUeQbgNO gl4cENIUNCuxH5z0awvX0dno2adhCrE2KIPB8VwcttmYu6VkfXpr+ic6xdo+lQZELrv/ agbwA6GNL11ftA1z7cx9bPmXj3Ka/Q0Wlr3Uvty7Wv5RIR3easZEIsdRafGWoestijim 0Q00WclE4CiPNCAx7Zo9g9BatU5YeaHHXz/mCiAPwuyo21SsHk9Fp0O28IMQ383Cvafy 0Cit4J2BPivECRtXHLGX+tqLucaBVDSrBPsUWN6HD0ucXTDQB4/3bE7VWhDgW7uTDt8b DVhA== 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=LAUjl4qBWaw4FcREKzPLcJ67Zc3Yyp+jTDTvGFFFspg=; b=TnPkUQ345NzKMnVAdLkbsWFuvwy6N1cO9nloCtkqRHe/sR48T9I+ZpBBoL/6FwDpxd GJxCm4I1eImQAWu4s23pViUUCGC7No59+eGpm3wVQsV/cD6YRuqU1Yek3Cv6+V5k4It4 MrpYFr2sQsJWHBfPT4CJfNQd+x/VGAsecYxu3W6nP4LHIjp0BvpdyCwnKhXf2u2+uRxp bfI59AeyyIAcrjbcO5K34QYwzbl5PqiukzzQXgqcJ62U9hKSggnts7OMcFF4lOiJdbgu 7xzesPX7cH0mPzc6vX0hCBlUVUuM0YKLgLHL6IOwGcaoOBqMLpDm/fxXk3voqnywP8T6 Y3pw== X-Gm-Message-State: AOAM530sIVQrHK+jY40ajaznouu6nJ0qR+50b1qjU+a70kHO+uNji+3m qhMsvNUEc5ciFPUZPX9NrPCxuQ== X-Google-Smtp-Source: ABdhPJzYPyiS6qk/HTNcX/UxRKEFj5SXZDBlYTbSNnBGV/iOAExVeBu6QbTHHI1ETOgbsbF+MKQCFg== X-Received: by 2002:a5d:50c7:: with SMTP id f7mr586054wrt.367.1598672311921; Fri, 28 Aug 2020 20:38:31 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:31 -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 v2 09/12] wcn36xx: Add wcn36xx_smd_set_bss_vht_params() Date: Sat, 29 Aug 2020 04:39:05 +0100 Message-Id: <20200829033908.2167689-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 a6106ba9cc89..b311b170fd36 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, } } +static 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 Sat Aug 29 03:39: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: 11743947 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 37EE0109B for ; Sat, 29 Aug 2020 03:38:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E50420872 for ; Sat, 29 Aug 2020 03:38:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HsD/yBUE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbgH2Diy (ORCPT ); Fri, 28 Aug 2020 23:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727017AbgH2Die (ORCPT ); Fri, 28 Aug 2020 23:38:34 -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 33134C06123B for ; Fri, 28 Aug 2020 20:38:34 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id i7so843420wre.13 for ; Fri, 28 Aug 2020 20:38:34 -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=0RMYH/02M6oKiIjtt+8hGNskxoP4IIcoXrMVBUBG1Lo=; b=HsD/yBUEYbSEtZLLJw3SgUCr9d8/UuJi6LSbknVKix1y7/gVJD17qoniEXrxPxlnjQ NJ+sPqQRkF11QZ/x9YFG+1UOVibOS/ByBFPBqIovhHzEhRFRoKxjSuHVcjrGx5BZ/Vxp rdojZojW6laTHl9WODWrZ5ERS1jWWjX6FwjaCPHRBIVF7bTFJfi3vHhZL3JDTERu/4Jd ZcNygK6e5+7LtF3k+4TdOzuuQXdS6mTtyIjIa2a6/YWKr9+DqUqV+2hCmoyajF9sqt2q wdvadmpLl66SwGmc0kVVp6uRCbzSANiviTO9JgiCcja0wJlKtKAKg84DDsIqkGcbavgz EzyA== 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=0RMYH/02M6oKiIjtt+8hGNskxoP4IIcoXrMVBUBG1Lo=; b=CNkM9nehm+Q885BJDPxb2hIVDzImRwAJj0b9YUeIQdQjLOracbRAhTi7SAB257mAUP SO0c1T1t/zWNpnQJlwoEO3rcdowk8E1kqiAzYQBWQuWBtvc0Pc/OPRk8nSPlIkqIsAWM YwUErpoPfSpjkmoZWdzUbFGtN/R1DZJXWjJy722jUWGzH10hBMPjlWC+lkT0kQEQTgTs 40lUHPsqosGL7YYt/ZAJZqJQEKamCsoHYk0fIC7ETDPfZAnEjqxJgrBi3CbkGERCLyBL bXSTmNUIYqNpNzubAxKnwKUTQhFvjCiityHH3D2a7fHa3itgzEG+fOVToV7DDJ6RGvW8 +MhQ== X-Gm-Message-State: AOAM532ijx4K0AUFVypZM90h6PeoHLkylglcPFghed/VQ1u2A3A0tbTO ZzbYBnOFSHjYT3+10suujeZOxQ== X-Google-Smtp-Source: ABdhPJwD5/ZELK/FrZAqb/37zPkCtpQnbxpyy40fkMgrEBJMXib+zHhznb+eFV7bl2a/obzRdT93ew== X-Received: by 2002:a5d:56c7:: with SMTP id m7mr1695838wrw.322.1598672312952; Fri, 28 Aug 2020 20:38:32 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:32 -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 v2 10/12] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Sat, 29 Aug 2020 04:39:06 +0100 Message-Id: <20200829033908.2167689-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 b311b170fd36..86411f3da79d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1247,6 +1247,31 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } +static 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, From patchwork Sat Aug 29 03:39: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: 11743961 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 6A7F01752 for ; Sat, 29 Aug 2020 03:39:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53E3A20BED for ; Sat, 29 Aug 2020 03:39:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VxBxsDpc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbgH2DjD (ORCPT ); Fri, 28 Aug 2020 23:39:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727022AbgH2Dig (ORCPT ); Fri, 28 Aug 2020 23:38:36 -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 44370C061232 for ; Fri, 28 Aug 2020 20:38:35 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id k15so859743wrn.10 for ; Fri, 28 Aug 2020 20:38:35 -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=dX/lGSQb/+52DNmRF9sJPcKmKqQ1oW2lYx+J5BfuacQ=; b=VxBxsDpc7OYV51xq/MRxalYDJCVagpTLHEVxwzhTPru/wFZQrhX1FF8icUONNKvf/O WO3ByjJhhIE23T2v6kPwmjp4udYoZDIqmyhw5UAkDRbDgrb+FND2rZHFGa2q77Go7eSq Yzqz7ztFZuB0pcCxbmooVa45TxLsDvezKs6QoPbr7+4o2TaqDUI7TY4YwoWkLxcfpONb NPDT+ju6bEkABn0IjBgYcyvOavVvoA+jfuRPmJd70YhZxKG2cBGaX4qkHK55H/oefxSK jOXOOWyk3OkjVT0pgj40YcxDHB64+tQC7LDrOlhOe0ucI1vj0OZMgO1zAd8cI9UMsyTp S/SQ== 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=dX/lGSQb/+52DNmRF9sJPcKmKqQ1oW2lYx+J5BfuacQ=; b=Zfyu//69D2tqXZBtphn7Nh7treOHrhBn//bHQK4mh/UDch+EWxGGY+muvgmKgTyEMK fRC0PSoxG+xzRaSeUEO5XpKHprfI1nlgyJsnBLs9GBdmPcVO7ZRz47yRUM0UWsvd2VX/ 6RWoFbuD3iqIFbcFU35LGZrRlmBeN1XOwx/2/0hI+UBGmlAL7oEaxfZGwnes2DQfetXG 8D9umU/jRp4VOFyBdPFY6Wi+aUvugCfhAxMpp+IAwwITRTBVqNUzMzqxcJTflrnvibDv 0lkRZiry9falMdORUYrTlSau5drpnVOKfjwVyr7j8N+6y69ugLvjZH8peYZxaSgD0wjL 32EA== X-Gm-Message-State: AOAM530f0AxBVfQMMqKQNiLa0bv+oklmHjBrRtYPqx/fnHg8HB4FMmMG lVcOry5Tw4O5eBjH2ryUTj7/hQ== X-Google-Smtp-Source: ABdhPJznSbCSKWbSaBnOf8wB3o6XVedtXSKZnaAbz+m6Nt64CEHb3BxWnAFVtzKqmbYzuZLhpCoEzg== X-Received: by 2002:adf:84c3:: with SMTP id 61mr1661631wrg.131.1598672313984; Fri, 28 Aug 2020 20:38:33 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:33 -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 v2 11/12] wcn36xx: Define INIT_HAL_MSG_V1() Date: Sat, 29 Aug 2020 04:39:07 +0100 Message-Id: <20200829033908.2167689-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 In order to pass 802.11ac VHT parameters from the SoC to wcn36xx we need to use the V1 data structures associated with BSS and STA parameters. The means of identifying a V1 data-structure is via the SMD version field. This patch defines a INIT_HAL_MSG_V1() which operates the same way as INIT_HAL_MSG() with the exception that it defines VERSION1 as opposed to VERSION0. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 86411f3da79d..d9bbbdc8d013 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -355,14 +355,20 @@ static void init_hal_msg(struct wcn36xx_hal_msg_header *hdr, hdr->len = msg_size + sizeof(*hdr); } -#define INIT_HAL_MSG(msg_body, type) \ +#define __INIT_HAL_MSG(msg_body, type, version) \ do { \ memset(&msg_body, 0, sizeof(msg_body)); \ msg_body.header.msg_type = type; \ - msg_body.header.msg_version = WCN36XX_HAL_MSG_VERSION0; \ + msg_body.header.msg_version = version; \ msg_body.header.len = sizeof(msg_body); \ } while (0) \ +#define INIT_HAL_MSG(msg_body, type) \ + __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION0) + +#define INIT_HAL_MSG_V1(msg_body, type) \ + __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION1) + #define INIT_HAL_PTT_MSG(p_msg_body, ppt_msg_len) \ do { \ memset(p_msg_body, 0, sizeof(*p_msg_body) + ppt_msg_len); \ From patchwork Sat Aug 29 03:39:08 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: 11743953 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 51869109B for ; Sat, 29 Aug 2020 03:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3163820872 for ; Sat, 29 Aug 2020 03:39:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yepbCAl1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727084AbgH2Di7 (ORCPT ); Fri, 28 Aug 2020 23:38:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727031AbgH2Dih (ORCPT ); Fri, 28 Aug 2020 23:38:37 -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 732DAC06123C for ; Fri, 28 Aug 2020 20:38:36 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id c18so861046wrm.9 for ; Fri, 28 Aug 2020 20:38:36 -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=N19y8kE9YeS2Ow4HV/sGzCGkQdJHD/4e5dDKui+iRUE=; b=yepbCAl1pABiRrbEhw8HL5Fd8y8urACMv1Icyc6Nod2qle0Svzqp8ruh0DgZ1/cx1H unsYimJT49O92Bipn9tETk0McJHP6HUBH5TZM+v4Puw0zHN0OkZ+z6WlD9JiU4yc4KVq ixlJjKUcCaDffhaPpGWsf/4HD2anBH35FOJJpbhZbaC6BX9NfblR3752aw4KuPY3wLpf bm2woP7iOfVYgb7vMuV/F+vb9HmwUIJjiWImp4zP5dcMCJ9JZQqrHZdqHZChReHQqhOa e9cwJ6o3kSJSCyRegoEBZMURzMd9jz2NNZUfh9ez8sj5/+0tsVOF36ijH0JH+R/82shD r1ow== 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=N19y8kE9YeS2Ow4HV/sGzCGkQdJHD/4e5dDKui+iRUE=; b=U5l/8bYn9YMHkZlMzjh+GWoQNUvAiYw2D1kbyFawCK5M7rcUX7vFVBvXxBs5X5rtm6 0IpIpra5dJixbBbIVvpby/hGVa5nhr4I5TUPXpIsGayuZcJOzjYmx3exzuyz+9bCPvfT GQO+9p98G8FtUnh8x+TVtDH8+CHQQQfwLVWTRqByZkwMwRMIQBlrQVzd261TTiZnwbiD 6AsAj3bqUHNukbc5hFEHsncgV9rik3E5v8s+4F5bhSvGlaVJJg86U6SsbUFeOU2eBE+M zmZ1Mu4h9SIUp6gApUd9nqdu/a5wXnKVXCcSb2dS3tO7knTSC/c+IV7LCjzBfq2A0qc+ fU7g== X-Gm-Message-State: AOAM5332nXjwr+EbhsGeD9eqf7ZdCDNMYQuz5YSgOLAVMz+pVizVqdLm 0XoLYk2pL+pIjYPBr59TI3YG7w== X-Google-Smtp-Source: ABdhPJwDCVid4jB1XBLc/5dRgTznllPWmc7r6Z4RAApTOd+g8Zm3/pJVctNaxXr4/3n0yAJe0Ono/w== X-Received: by 2002:adf:8b8c:: with SMTP id o12mr1661873wra.353.1598672315173; Fri, 28 Aug 2020 20:38:35 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:34 -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 v2 12/12] wcn36xx: Convert to VHT parameter structure on wcn3680 Date: Sat, 29 Aug 2020 04:39:08 +0100 Message-Id: <20200829033908.2167689-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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 In order to send VHT parameters to wcn3680 we need to pass the extended V1 parameter structures to the firmware. These commands need to have the version number set to 1. This patch makes the conversion. The conversion consists of 1. Setting the version number for wcn3680 or leaving it at 0 otherwise 2. Setting the sizeo of the packet header lower for wcn3620 and wcn3660 Once done all three chips can continue to use the same code to pass parameters to their respective firmware. In the case of the wcn3680 the passed structures will be slightly larger to accommodate communication of VHT descriptors. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index d9bbbdc8d013..97fb47a8bc1a 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1317,7 +1317,12 @@ static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_req_msg_v1 msg_body; struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params; - INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + if (wcn->rf_id == RF_IRIS_WCN3680) { + INIT_HAL_MSG_V1(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + } else { + INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; + } wcn36xx_smd_convert_sta_to_v1(wcn, &orig->sta_params, &msg_body.sta_params); @@ -1388,7 +1393,12 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, if (!msg_body) return -ENOMEM; - INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); + if (wcn->rf_id == RF_IRIS_WCN3680) { + INIT_HAL_MSG_V1((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); + } else { + INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); + msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; + } bss = &msg_body->bss_params; sta = &bss->sta;