From patchwork Tue Sep 8 18:24:27 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: 249314 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791274ilg; Tue, 8 Sep 2020 11:23:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR4HdZWlojKdwywjhjs4fSm+fklfrvwp56aRZzXYncLRMH8cK3XNLaWx0PhPMtBd/6tjjU X-Received: by 2002:a92:dcc3:: with SMTP id b3mr6604ilr.285.1599589431896; Tue, 08 Sep 2020 11:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589431; cv=none; d=google.com; s=arc-20160816; b=XrrUqPnlYN3bBD8DFkXkmaS8F9yBFPKPXxLFsi1Tzz63n1VnUrCW/KQRBVJaH6XRzx rNWECRXRxjKgBseO3irfFa1Ska7cmoa4VYmbKb8jqQrwCHsMpbBXBVjhORmwq06MlWdb AUYysvC/hJd0Ia3E+pVMVUAWShk//8qP3U8M4kq1iNvDcz8BzQtRrgPqsq/6ExjliZ0b yOWW02J5nfHkgrZJ2q1N2behmmzKBmXL/CN30BP8DL3TPvMQgr3mK7fTqwzt0Jvsunhw dhxERgssLmxEcMrgMP7gza+HcLsRhlW/nQnzH8W++ZRRqS0N3oBlE2GbKdBPgSIpip1O umFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=mrHQXYgOzGrE5OAhUl3GjkI12DsuBI9GCRW5xszef4U=; b=Jkl0dBFxX7v+OZRZnAY2qs5+O2Ox/tjTyIywG5z3oaeSm4EJmWuzxA7o2h1Rkgfqak 6CHSU41V/Tf4iPHgoNV27Lxv/Rvyq8oIbth1ZgUdx1LvRPr0V9zj39/kuQaRTBOM7eOI TPdQ1fP4vjY3w0+VSeL0e37bZxeoQg9hEfX5liHc+rK6T+pg6dGwvY7fwJj3XZDH5ddt uIxyUQ/yistpF3l/4O16Sl6X1HTFC/8si/JXHjzHO5rFWAwZazelWssuMMN58wdpjHcH YOxVctleRhKaEhkWjKRA0th/lxGVC/UdZcOAGo+dHukyhbU3i3cGc28pTnpu3OlXjMov Sgsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DqVbfwIx; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jYsnz1N+; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id o1si250417ilc.17.2020.09.08.11.23.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DqVbfwIx; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jYsnz1N+; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mrHQXYgOzGrE5OAhUl3GjkI12DsuBI9GCRW5xszef4U=; b=DqVbfwIx/2ihiL5jvxrmN9oXE 8vYWJVXUyn/LSw5T5MfoSM+NkkvaYafCAIL08ToktNzVvTqo5xBXdesvbHlZj4fT8aTyxXco4dRgk oDCKLPHe6+lggmvEBfYrBLmJr9Qwkhyg63XEEkZd6ZhcUe0FDrq/+pyoVh+6eJIGRZh5sZxjRgSVt KNzb3UfPMA3XugRawueRxYnK5qXDcOMr3J3DfTh5WJBgkYQBu0R0mn89MMV8Y9WKv7XGfVm7l5LJz nFR3Zd6+lDlaX9gJNkgCNqVVQ2CTmPHtr8HQtk9ZqqXhZ6202swp5a/byBLV/D/omG7JBkhMbYcpN qY6DL2YeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHU-0004vu-Fu; Tue, 08 Sep 2020 18:23:48 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHQ-0004t9-5K for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:23:45 +0000 Received: by mail-wr1-x443.google.com with SMTP id s12so192416wrw.11 for ; Tue, 08 Sep 2020 11:23:42 -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=RqOhclRRIqI97WuGHZsdvXxzhC2mxsIcVlTbaDy3Bdg=; b=jYsnz1N+uO4dYYMsKSTzubbakPP6rYThv4JWdxQV2on9LKeIj+seQRMpI7FhmRDLtN fW8zAAE7y7qvxLXB6Mfg1igrhFKG9qcgF0+czwCAefI+3WjBfpQ+9ZUn0veA8i08kRE2 p+4POPP/zphxM42LKqwlXtIxtI/QSMb4e2tTeUcQEHvOyG1R+FzP9Un3EZZ9bgC0l0+O gtsBKi8CHkT2Ow6TiYT/CCzzF3xLEfM3as5xRpcLnxuO+NpXYu9szApAVkpngCRHMJwe CDhcTq0sTXuuht1Joj1tuUXzGXf63arkBiJ1qKqCcqze01CV2+TVlNPq5foHIH1H/Cjd vURQ== 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=RqOhclRRIqI97WuGHZsdvXxzhC2mxsIcVlTbaDy3Bdg=; b=SxmnFWIHOr3JGTLvoGlFvr/JppiCh1r22gy0kCaeHZL1lask/JL9m8CKSDw1oqLkJg u/QnwW8AFjKwd+M9SVOQN+l9Gh5YfDO45cyaajycOw1SWePdsp0eyQWMn/7CwjCNcTgL W/l0bkKCjvcMguOznmZDc71N40QFvezYObVjbG/Fk5ctqUPLBuQ5rS+Nkm+vEVk0GV72 nyuzh1Rl9VGWab3azP55qM/aFGPF1pjNMuS3gQJohYnNpgBZogFJLJcOXBlY7C3Kld3m a0UC6/nOlGgi9xcU9+JgG+zzKRmc5V05oMq90wrzb0DtKKdvbji1eIuvns40x0/+5xBk WrYw== X-Gm-Message-State: AOAM533D4jgd21T6TVwGRPMX5dhbAFjnpqe1/1YjgCCfY9APnPlGlxK7 VUKszUsyu8rNRCjHOt3DxwvP+g== X-Received: by 2002:adf:8342:: with SMTP id 60mr1017310wrd.158.1599589421598; Tue, 08 Sep 2020 11:23:41 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id g186sm286202wmg.25.2020.09.08.11.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:41 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 1/2] wcn36xx: Add VHT fields to parameter data structures Date: Tue, 8 Sep 2020 19:24:27 +0100 Message-Id: <20200908182428.2870226-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182428.2870226-1-bryan.odonoghue@linaro.org> References: <20200908182428.2870226-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200908_142344_217315_3C11906C X-CRM114-Status: GOOD ( 15.96 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.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. Since neither wcn3620 nor wcn3660 support VHT the size of the passed message is fixed to the previous message length. Subsequent changes will differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger message size. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 14 +++++++++++++- drivers/net/wireless/ath/wcn36xx/smd.c | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx 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; diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 4c30036e2e56..55aaaeb78b14 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1223,6 +1223,7 @@ static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params; 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); @@ -1294,6 +1295,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, return -ENOMEM; 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;