From patchwork Mon Aug 3 03:11:15 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: 247340 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861493ilo; Sun, 2 Aug 2020 20:12:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjd3z6QMf3spjwlduwzO9arJMIMP1JlyGpYVs4spoTJYmoSY9KgBTSe036hTjbYUp8nlAw X-Received: by 2002:aed:238d:: with SMTP id j13mr15110531qtc.220.1596424274766; Sun, 02 Aug 2020 20:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424274; cv=none; d=google.com; s=arc-20160816; b=ezXaxT4wR9pkf+3l3p2vOpLZD03PrrZTK3VsjqEHRTf910+aRqaHhigCDvLd0t7izt XOhFNHZqgCRzrfUtknBkCfg5YSnZjvlStnPZrwf5x8K1YfMeQcDvW10LEQi1od3AQb8R usVgJxQL2vasNS/v9lB+JRYsFtBbZnc+lL546D2eTtzc0TtHh8vsHmaeOwqIRFamoFQ9 ueBZT9wLNSUmOejIV2mGNFKWGsvBukB2aOmnoQbDJsu7bfYesSeIUWLUwjoee19Nq+Ev 4WgO27CWrH3kQw32u4tNABZ93VtgN2O5ptEZe8Pt7lAl9g3PqRpk1VQna6pDVv9JYspe k8oQ== 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=+3FndZgg7v4+NCNTZhPNZqpYaxUzdyQP8aKBFbpTXQY=; b=gQY/oDI4ti7hK+2I7LwJWrs/CW4AO+rIXTywNWhX0lHImT19jKtSUhcFY7Y/WZ5tW/ H+hjA3+sVPudNmGDH5gR1XtFnVd9/dudK7XS3zIyM0YUsr070T2YHXsZz1S82HF3INnC G2ubKnmMJoZ1aA90vc4whPxHA5mJv1RO5Q/yjuAWEpLGNMrq+HOtkydCEsSoYKghHZG0 CzYcFN4W9mUKAlneMXexnm9TtpI7mpH9mREJ8pah2KMmxWUww1oPMNVC5QhSNITT6R8v K0vHQsdrKIbQd4gyuSzQh2ylvw5oofGem2aYmzBV55RWBg4vKqXlXav8hYQwchwiwr3G nxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Vb7kZFV1; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=I9ASwBhw; 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 i13si4924455qkg.317.2020.08.02.20.11.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:14 -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=Vb7kZFV1; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=I9ASwBhw; 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=+3FndZgg7v4+NCNTZhPNZqpYaxUzdyQP8aKBFbpTXQY=; b=Vb7kZFV1kWwFPxYVaIBjq7mIp ycZOL4Uj4neGIWkzzKY6J38Kkg+CQFDVEfHJkBRpcTOdqqiJuOr511B7cEZGjydCFqafi3PL4kvWm FcnnwXR2vekXwgDzSuxZD//nZ86kP06bMDrw2zd0/DlXbMr+MWAUHjwSu7N9TRc8ZQp7QK9QMYGUw jAYw/Rfn4IJyvX/YsMU0YSCiOrLYauH4TnwYDinZiyhUfhkAMN2TYfXPlx9obSN+jvhAOR/SnKf9U asn0xuYrK0EPcpJUXSYAeCsNnnJEgddl7O3mNAqXU+3Z06l2KusTUwdf82b3H673NsAoy0pom5Hjf UiMmK8+7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsZ-0002bH-Dj; Mon, 03 Aug 2020 03:11:11 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2QsW-0002YG-Ef for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:09 +0000 Received: by mail-wr1-x444.google.com with SMTP id r4so29813998wrx.9 for ; Sun, 02 Aug 2020 20:11:08 -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=tYD10FZO8KhccbIhk1uqysdR2q5fPg1Yg+7P+eySpwo=; b=I9ASwBhwfZb3DoiFraFPtPwchqSItIhD79zECvHvQTdoVCkO8EwPvAXUmK9/KGGAtg jTXHThmWJXorf/ar5noQYN2/L5bvzKq/pXQqiDMZ+1hbzHA5+ZCU5kpEPR7gInQEuB5i JzFbcxOCpuNsUi6cQa8ABQYM/5Qc8Po9ntduUTg7kveLycm9eC+lbeFbv1hxZcDAhl1a mB2SyDxYBibgjEPofx/lcaVRG4SIN4zgm8xnH9GTIN4qVbRprhNcqb4pxrYgOjPHWSjM jJre9aZF2ldPMFbMUStMGv1n/RFFr5OXLd4+mcJxaiRcXSRL5g6VfYBXeH6kf9acBpCU Kmxw== 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=tYD10FZO8KhccbIhk1uqysdR2q5fPg1Yg+7P+eySpwo=; b=ZUfuxFPMU/8kjRYipbD0BAnpyMkI9dux8+fBSxm1jqAetQzFaEYPgkhhtVN8erE7Y1 u9FtwdK0yuBV0mefRqW7MVlQ0oECiORh7ncwYd19E/uCliw6jz1Vt/aSZ24QNwYarDkt tKFk7ywFS7eXQqX5CrwDackAOr1u7AsY8Hm6+hZ1PXdAykcHaDFgr0VGcyZwR9EqMWpU nJc7qi6ysBHv3BTnBPJOea33/ThAFyadBwX9DRZs2RiiuNeft69QnYSKd3A5HQR8IScF 5NaxCk/lROHVzxBNeVe3A9TM9ujLOwAxw57DxeQOSrKBpavfO8yTHQh4nEaD3amoV3VW T8ng== X-Gm-Message-State: AOAM532sTy66jqjpAdwWzeJx5mx57VQkiJctlmfR+HCn3fE+AideXhrI 4f/OfNwDS82hUK/6oTHhH1Ogsg== X-Received: by 2002:adf:fe0a:: with SMTP id n10mr12660332wrr.125.1596424267660; Sun, 02 Aug 2020 20:11:07 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:06 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 19/36] wcn36xx: Define INIT_HAL_MSG_V1() Date: Mon, 3 Aug 2020 04:11:15 +0100 Message-Id: <20200803031132.1427063-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-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-20200802_231108_594225_F6FDB292 X-CRM114-Status: GOOD ( 13.19 ) 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:444 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@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 f61516988953..6a03d5956fc2 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -349,14 +349,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); \