From patchwork Wed Sep 9 15:37:33 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: 249499 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524908ilg; Wed, 9 Sep 2020 08:36:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBNgb9Z83ZfRLtlCq3HQF3A0inEUee422WMXQpUcdA/K8cQTJkNxNeJimet/XBQXpgQJ28 X-Received: by 2002:a92:360d:: with SMTP id d13mr3771839ila.68.1599665816642; Wed, 09 Sep 2020 08:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665816; cv=none; d=google.com; s=arc-20160816; b=oOZI5EXQLWrsCkyFG77mKzU6SrHIrbiahmUx5V4X36FF1VHRPvp0Fx6G/u6tlBqtEn g/r6lQBb1kpPITRuBtLDwLc6R7sitmAzjap8J1Vg9XZlAIC0sEhTlkFE7wZLu6yFGH/C MVj1stid5mcijGLSoCKvmvouVynKQlZ3XbsPHeR0428U1sKmEIJg3NwnMAQhxIDix0Kz ciaAoPLw/FAts+L6UOKcr++JAbseoR1GRpBzoT/Sc4o9nt0lKqK9bV862JS2nxK785KR 8JcYcA86VjklajSjsaMT7k3IQAH6klbf2/y0US2m5Rxobnbf6vItKYJuELhYfyhOeD+Y 1MzQ== 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=EQdy9rjjUSyPhPwmTno6kVDX1oDzcOtpMkv1WSBlH+k=; b=pkFhTl927qlqzYqqfJhn+2iZV/dUHZOcafAn6SBSOsg7Di4OLBX8QbtdE0C3rCsk30 TsMV0iHsK45shjFOb1yOY2aqRtk/Yt7Lu8PZ37+HZyyGgvIUppIxt91AtsxDxI8pDddd MZz5SIq1Gu1WfX0PNTcm8FFGLBi6EOKIaOIS4RC3/i4bn24SUBsTRe07rvlNoz9G1lct cTEBDoDjC05m6dYFShctBJL0R1YFE2mSUBqn6EjphgxiI/4VIc2oScGiQX6bEqyWa0GT 0OYklRbW/4nyk/akVQGUyhzuIVZXSUZgPlQm0tn6r1aDBYzB8vQTv94mtSnvM4sbKKu1 zaDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=L9Ynwjjp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="T/XA15q3"; 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 g18si1953357jaj.93.2020.09.09.08.36.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:56 -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=L9Ynwjjp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="T/XA15q3"; 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=EQdy9rjjUSyPhPwmTno6kVDX1oDzcOtpMkv1WSBlH+k=; b=L9YnwjjpB9zKWUp2fnrOviq13 Rb9/A6lFu7HPL3e9PZWscRAK6FYKYllVyP/HnsCe1mSFVb3U2J5WKKlmGqNF4uFOT/nwRiwFt+q1Q szTWgHfteRa/fptNaHl9b7uiPI5gcAEu1ZDUxyQGUR0hKa6bb8XTtPkb7Za/UGFPyPvibzyaK35Jo YSUB9DXDAf/4Gs8MPKkOrUsj0PwPDU9al3DjgkhAb831rmRtV/tBnHAnAUKGoMQ6UQsMT0398ogb8 dBBOH3ZKC2UEjLd07WBooLP+GJIvvX0QKUFQyN/9Oujq8x4+bxK7I6LLfnTQhyii7aM9SbIJIzUlZ DUmoQ9y/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29V-0006lV-K2; Wed, 09 Sep 2020 15:36:53 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29R-0006js-TG for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:52 +0000 Received: by mail-wm1-x344.google.com with SMTP id q9so2735537wmj.2 for ; Wed, 09 Sep 2020 08:36:49 -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=x+yPlB3SpPWTohvuvahTspwiXrquAXLGYj1ufX7tRac=; b=T/XA15q3JEw64vle/SJDqe2cwhx5Ytuoy9tyFKBx6FYJOXSiQlk43e+9oTrc7yBX9R UD9ZbP7voxpFd0QAH2NXBx5kOEodqH1tyt/kxtKDmIRE2Gq5GoYyoX+LpE/0V9H80nGP dsSTRSUbWchmawOSL9PwcvMCtMkq6jJjedmtW2Hhrb7f7kOEdUgfk4ljYxxiW4Sfsr59 Kp1ZJHrrhMQ8q0aMfTCDs2w2reeU1h2r45Uh9/Cw0wN2t37YqnVtId6LXtSxncFNXEE5 jQolc1vhsTpFb32XbtIjieUZtcovZ1M7UU2PHNqDMArCLW99paU3XRDsJ9xnq3CpbkV3 KB8A== 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=x+yPlB3SpPWTohvuvahTspwiXrquAXLGYj1ufX7tRac=; b=hwNYqRm0pFeGkTxvuhmcijEmkv/7VkGMFNeEmpCKoYlqFrPGnIWWL3vFsgVMEA3t3k n3sT34EhMYF9sUTYUBDVEdE8x54vEcPxYX3dWrVR3S8qLv2Gs4rR3PjiUJ/vgqnXt8Jv LSjCWEECoasQKNAs59mfdF2Kd+96zoBKbTwqOJJIuMrH1r8mquyUVQXeoyq9YUD+LXO2 Um5xx9pdMIK/s0hK/ONRkAT1ggcIgTo83K8n+JT9yfHgbSVH7uqB+DsVIXYG5X21f9nl g8Ddc3l20E+PXwXn/MG+psYq/a0q36JnSJ68MArJIAOMWtu3U0MP7h4of16CQuL4UKJL Kikg== X-Gm-Message-State: AOAM533rG8KxYCZbbKoZkLUAmKbgDjyFwAwklYYtLHQBhsUTYkKiSd8S mI5Tbyw6f/BLFtt8y/rcqoaNGw== X-Received: by 2002:a1c:ed16:: with SMTP id l22mr3912572wmh.80.1599665809048; Wed, 09 Sep 2020 08:36:49 -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 128sm4470602wmz.43.2020.09.09.08.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:48 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 1/4] wcn36xx: Define INIT_HAL_MSG_V1() Date: Wed, 9 Sep 2020 16:37:33 +0100 Message-Id: <20200909153736.2905114-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153736.2905114-1-bryan.odonoghue@linaro.org> References: <20200909153736.2905114-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-20200909_113649_983587_B1203147 X-CRM114-Status: GOOD ( 13.02 ) 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:344 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 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(-) -- 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/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index ad36d6e744a6..3adb744b093d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -453,14 +453,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); \