From patchwork Thu Sep 10 15:08:19 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: 249658 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827705ilk; Thu, 10 Sep 2020 08:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykeIWcugSzmgI6COMkQoYZDCkgJPTKNnTjvH7HKqf+2CH4wDwXbWAKsb102jetI7kFq2xq X-Received: by 2002:a6b:2b07:: with SMTP id r7mr7872295ior.181.1599750463195; Thu, 10 Sep 2020 08:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750463; cv=none; d=google.com; s=arc-20160816; b=mvOmT1RH5eCXDd8uTc0P8ngVEkgpRKgnaaXHnzKUgGxiDjg5Hi+2VY1SG2jhOr8jCD nbQ8E4Ef7IMI8vNgGtXWEaRSUCOsl6y0htSPEr7kJdZT2WNb7LKV0Dbs4DYfNvFczpUW 4g+/En1xJH/2E4t69b2W2wX9V1eXA68jy6l8euQdaSEC2h0nI/S5GoD7bytGw8erD2cV O3Ya5htiOISdF4NkrLH2xW53I2L1pARYCQsDzTcmIeXuy3yVH2mYmraIKbrTcfIvKzYo pESHJxhUKI4piQC7EWAgwQ6B1SdktBZx81f9H8Wz4p83rXJmW7fOOLrt8kASrvHfzlXO nlew== 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=BgH++VdHzu73jDggkuH4qMIrsYJ4dxqmc5RjoEr0Lfo=; b=lBCPqR/bCBZFGPlgEBwl4BekyTGRUt2JpuaRQl2WFoyOJFktAZ990XH6g3XAfDPe4w fE3r15AAWqj2EL9y/x56TFsz3Zf19AEG/2RvmlbrKLydUykHNkqm0ziHHT1paeU5dWmh VDhHqe8W0a47gdQuN4BoeWiwiVmuGG7Bx4NKoH045Ri9j1pU7jFtcVXY5YU6dHFE8y/6 lED/vxk+3/FoSTDdoXjGDn61mHFbFHvMF/NTIczth4iivbVGDTT44zEOB2ggzNsT9A1d Fw7bNkVQ+nM1VHUFqfzL78WtARtWQ9FFMPW+JslWPXs0zB8iu28Tg+jalltxes23N8Nw 7Xzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=A6kDCZ+c; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YwoOafbE; 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 i23si4415878ioa.92.2020.09.10.08.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:43 -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=A6kDCZ+c; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YwoOafbE; 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=BgH++VdHzu73jDggkuH4qMIrsYJ4dxqmc5RjoEr0Lfo=; b=A6kDCZ+cIMZSw+3cpTRigD8Jc WvwodHERfqghMX6oT0PEbHtQMwRLrdsh1NEwHPqe41SvMFRBRXIfHngvDQvgwbe7ouwADs6iBhOjw sR3qeIwghy9Wk2iGagFgajdOB8eRZP5n4nFGCsmUj1UI/K7LNqZ+/lu34ewSTxHOeIMgzv4rcUG5W TxeAkTUsCxry+5yV7TANaMsFr//w3eYzIjywkGlxu9SKqrMk1pNI23yaGp+mHCnvOP9jxILtg5v4v brlxvrmLUT1EbYbP7n1iaUh08TPR71mw/7rRZMfL26CZ5c3f2t0mei6IkpcsqAq0v7R/pDMcBdvj8 /kudO7cDA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAl-0008BG-OD; Thu, 10 Sep 2020 15:07:39 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAi-00088a-0f for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:37 +0000 Received: by mail-wr1-x441.google.com with SMTP id w5so7067517wrp.8 for ; Thu, 10 Sep 2020 08:07: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=/ZDhnYzdyErEPvOsme5Hsukpib5rwiRrGO2nt/vf1eo=; b=YwoOafbEd0HreUrwPkh1owdlBkG4Sxa12QT7PAc8bw7GMj0lqycivp09wabvgKZlMa WrrRDnkYrmcQfp7p9TYJMWd4nTQZvgxocDhIvgkOo0CufTcO9rG2LbXajlLluBG/9z5b EQCrUKWjhNRFEWJgRDTHGxHXVYHts4lKRFqiyPAx4eiBkUqyMtq1s38cVDKPWaQLW9Zb I5aoPgPhAviYHB75ij09wFBA0eWgRTLYPVNEz8y/PayDusYU/SVjOmovv245233U834/ mC6tBvTqpXx45v9+EyWhee4LENdxEXWkksOA1e5FIyQ1I9Uk/FYHM2H4OEYx1pLb9wxZ hAfg== 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=/ZDhnYzdyErEPvOsme5Hsukpib5rwiRrGO2nt/vf1eo=; b=Z1BLiiRuaRbvQ7stZJOW1PM2xmmygPJvR2vcq3mRWfbbrVdY03+23K5yf+sK8l7u8G YatvK5IlpW3UechKT2d/pmb9NlpoBh5q69RAUBCI/0GlQOUnVnFdoeFDokimiJsLy7aY 6tarQ8NOXQ/SqFuJM5B/+oTHVKa2+ePmFyO2Qw3h+F3pexhiBcZ4uZnvwdrLB+BEFFcZ pNJN3ev3e4IAhni4j8N6PqgK5e8UykoxXYy2K27/I0AkncgE78r3s2E9e/aXJfgazD8Y zgIKEZ7PYhgfauw9ZzOprT/iZGwGY1IKIgDcRa9wwBLrHA8mYx/qlyry+2/hXa6FP/Iq KUTw== X-Gm-Message-State: AOAM532bybwYeFqpRj/Xw59AFoYMDdmLL5R/TSFIx7Vvgb8jKL9gsnio 6VgaoJMOK0XiAxkPMIlOuEY1qQ== X-Received: by 2002:adf:e802:: with SMTP id o2mr9271987wrm.309.1599750455136; Thu, 10 Sep 2020 08:07:35 -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 o128sm3895678wmo.39.2020.09.10.08.07.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:34 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 1/4] wcn36xx: Define INIT_HAL_MSG_V1() Date: Thu, 10 Sep 2020 16:08:19 +0100 Message-Id: <20200910150822.2179261-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150822.2179261-1-bryan.odonoghue@linaro.org> References: <20200910150822.2179261-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-20200910_110736_083659_92A2C6AD X-CRM114-Status: GOOD ( 13.38 ) 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:441 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 dde43a2b0d81..0f5952003fff 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -466,14 +466,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); \