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: 248686 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602608ilg; Fri, 28 Aug 2020 20:38:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvsiwsGspPX9Q3yewn9AYimo3j0EHiRT3fy0/ieJN059pDSCYmlB7DGQB760hT83I670lD X-Received: by 2002:a02:95ae:: with SMTP id b43mr3755640jai.19.1598672321249; Fri, 28 Aug 2020 20:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672321; cv=none; d=google.com; s=arc-20160816; b=ji6nIwplRx+shDTrAeoSNmAUKBkZF4eCELBgU7e/aGvhKWtaGa07+zyzRXodWVwZ3Y LJJrPn2DNDYnOeo7a4QfcC2bwO5jnWaBn7/Kfyqd2gj6mRUqr5cR8Ai+uZckFDSHk6tK rLwFAX2wa/XUy6lFdzUlDscEXle5hCLN/t4W4qQYdoW+iF/Vev5WmB2GTKeScbEfEKCE I2dpRMJA/7rkWz0cWZlqnWuQ4iyaJ1ndjUUclnUVcatEmGReXl/AjkbNQn3hCAAik0WJ DQq1diRLMYJ9Ia6rgmuj7QQJmIjvs4IB2VJkO+h24JjxeFjOoNc2AIiaaSZUbNSp83qu D1mQ== 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=LcoSWOO+R1doPJWMU10bSv7+P0+wHcDmYuWtXPNayws=; b=JxHhVwFqqRTvcWR0fWPWi+trI7cYwzkuevVC5F5vj/6ioXi4HU3jdA+x+PwBoq4Hjj vBQjkNirLwpyjT1fJw1MkdyWkwV6VqputOb/PTXCEKXvntBH7jLCghqUMMYbe0OtiafC 1PUc7+XToHH4J3+sKFyp1kDNAIPLcSCpT/hlPemkWM2kQZynajCRYrh5119N5hR23qkt nglOfPafIiwcR/pWj5p1zUpAYtAQHxoTuiIYH9QT5y+RFWvc63of4rwMrbsOdWsVwy0q 3S4j5OnQ5+HymbeSqWMSGa8FX8NThglAIFt2lbucASTL6uqh3Vp4cJV33kO3hyn7LtBX +VGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=SG968NC3; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yepbCAl1; 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 r19si1125780ilj.46.2020.08.28.20.38.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:41 -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=SG968NC3; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yepbCAl1; 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=LcoSWOO+R1doPJWMU10bSv7+P0+wHcDmYuWtXPNayws=; b=SG968NC3jjGQ1fedC1izTEX3U ES9YraU2Pz/r2DR051rArboxk4OfWwvLKW83LkKExmkcfW9afjA8riofOnlpVCDiBO9uVYox2Lbu+ 1e8peQL+8TUaubaSrpQXNqVBaWSg18C7LZUNYbIvT6u0h6SeluquseEyz0ANVBBSr5nzMAzvBS/B9 AKC1KTMY5MpBakAXY5xXvRNKOQ/4lFoY3Wt1SX4nuT3mP8AfCiABZi/tLzMK+Y4OdlAG6AoX/jspT NBre4pVKS0qL+EWYLIzQGlImJqmG5f3y7JbO2e6XQ+7p759j9WxE2u9V12m+qRYzs/dy2+HITwp9c kR++k8PCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhO-0002OS-CY; Sat, 29 Aug 2020 03:38:38 +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 1kBrhM-0002MV-0o for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:38:36 +0000 Received: by mail-wr1-x443.google.com with SMTP id o4so906106wrn.0 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=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=q9AuvxSnT6w4MnuZEvUXgsXq94CycrkJ4qqZToBoJ1zSJqvrbfzS/H8O3TGbYSksUL 9sHY9VqvaagCVacsz/lRsdRzlYb/8azJ0NgUvhI6CoMuPdM/qvIp+lxdWvYbS55+rIZC 5XqnB5c/2Z0KiW6ci54iuTBdAMUeKmS6W1DncsJl7TcuDaVzxogIBBQju83qw7A1SPHE 1kWVdhTstg9vGcv0Hu3J8BlMPc5nmrEEdsj8cTwdhyUQ9XD/LB7fiucnnQtGUefnSure gwBrjwP/1m0OMLtg/6KQMmT1xoSYegDuXlQMsyh+L/cF9ahoSExyea7VffQCRZWsYyQR KlDw== X-Gm-Message-State: AOAM533tZgVHhIDtIAWgai9HFzWaMTF5wVS6d47oytbaZyhmugsjjgtK ITt6KQ98DdjyfrJAlD0kmSoQ7g== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200828_233836_114348_1A868AC6 X-CRM114-Status: GOOD ( 15.30 ) 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_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 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(-) -- 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 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;