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); \ From patchwork Wed Sep 9 15:37:34 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: 249500 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524915ilg; Wed, 9 Sep 2020 08:36:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrAldWL6LOlSsDaLyct4QRnHIEAsuByQhN+cUfQSfPVJ1YtQqe3INkNwL3tIL/tH5fMTFR X-Received: by 2002:a5e:9613:: with SMTP id a19mr3761329ioq.116.1599665817338; Wed, 09 Sep 2020 08:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665817; cv=none; d=google.com; s=arc-20160816; b=bINnG5l7sSLnJ9WfSXUgRs3NoXXeCNr7PF2A3Nhlbl6cu8o1MH1l/v0Pd+ZaX39uUx xDPBNpKCCKPQYKTjOq/BpEczlacnqsG4vvJsXH3wWoa4K6QOhX/6A7wJfUm4oUF7fLj/ 1QBgkWW724Gvd/1rEgLRmOow0Gu0hhQgj1t/X57r0tiww7d2cHY2evJKhvAQjOywMLNM L4cYDxd5Is7SPWxiqkQMOI/8QH5WyGjB1Pvolm1kCemHdYpzbr5JPIkjUOYE6Zlmw+7q Zjoz/DEZb2GIkKyEe8BSdht59tKeCSxY0BT2xIkIuaAOeamqdY26A7l4mkYt2J+mmqYt L6zg== 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=rv0VI/+BDQkFmNe27ocJmnqraNvMVVjlBHkRa6qaB68=; b=osGgeHMLhgoL77P8F9DiUmpbmQsBDMKMt4ZVhYEVjK12a0FQYBzNWox3ygVoXTYjnK wKDCP/XObgAZxaI9vUfkcmJA1q45blIo+Mn5TS7lYh0jfBk+fQ/qtqTwrn846/AtGJF8 Ei9HyXyiGHH+3VxmJ85K7lEUWE4JibhzkNkJ8x7R10eKW7uzc1ViVn+yTJf6SG1s+yPu laHNAEX2KpuQPu1jXCNI9tFTIPuGIlwW2raRgcVUyloGP6H/vU4H9JUbhsXRRPxaBlKL HnqLx8/39zqdrAkeYkio4keSo+3+OjwP4O4FF1KEM8DA4VR27VAFabhuG5orsL/GC1h5 kpaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=j8LaKcL2; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=eelOjz49; 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 k15si2390072ilc.101.2020.09.09.08.36.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:57 -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=j8LaKcL2; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=eelOjz49; 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=rv0VI/+BDQkFmNe27ocJmnqraNvMVVjlBHkRa6qaB68=; b=j8LaKcL2EBeTVfAEIfdC9Uyez XZUCBeZBnduNmlTst6xUHG95E6jt8eVyVz5dJ6NNqTBl7VGiRdJwru2DPjDCGzACI4r2UQpA5SLoa c3ve9vguc0PXGedNBTc9ZFaXSJKRAPr5OCgqQtqCinX52gI0eEO8JYtLR6772o+e1C5OBqBHxo16c wt5ID1W/6Rl79ELPZv7qkCJ1E0fXj3G72eckiL7PrIR4ZPwBLxcsHXmmEGu8eS+Zhk1/ow/nV0vPU woMyaQJMajgnnRUGe+llaavqAYBCDvRjmFc+rgoLM8eeuVJeItgChvQu+0Ty47D/rq/+rELXU13Hc jAtxiN3jQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29W-0006ll-3H; Wed, 09 Sep 2020 15:36:54 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29S-0006k7-VD for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:52 +0000 Received: by mail-wm1-x342.google.com with SMTP id q9so2735616wmj.2 for ; Wed, 09 Sep 2020 08:36:50 -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=AjQwO8wviPzTyqnqo9pD+Eau9aX3yRTC3bFkrO7cETg=; b=eelOjz49ycNtuy76Di5/qOZNhOmSPzkl6XdJwnLN+FwtTVRLmbrS/i5zY8wAcoqpB7 hTxl+lJ2Hv/bs5sTcaNvQtov9SyI74XJ5juD1KnHPT/2bK45OjF3+DhmL9G0jXjKS7tO k30YyB2pI6e4LUDrtVar5l6937e9GPozftNeRlebJm91im6xsjsMENlb0riTaDzBbCCY faxoLoVk3ucTuGoX/2lxySoJg+rsXvDuIzV7qa7VnmINErq0uAh3iG/EUwFCiUOu51/M Nd0uUnrMm+cGonpoRH2NLXfnLx78yJ1bVVw0mlV76S3Sze7LkBDbb9ic/tqVDcy35noY wkOw== 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=AjQwO8wviPzTyqnqo9pD+Eau9aX3yRTC3bFkrO7cETg=; b=aRw43VpTCB0VsHQ5YixnRsVUEMr88Tq0aCe7Jt9ZAxKgwOlLujbf/yfR6WYnan5oxB uHxy1A45t4dN7fLGW96LFHJsPtZrsMWUUdjxzqRYWirBkGzCDYSyHS/ri+hnpf9VcuDY ipIK8BkxNhzK/qBUHcDc7ryxLH0QcNsLVzCh+f+bM+xZXyFYpFjsXfGXYMb2kc7SpWaT CHC4leFRQ8zY7gFaZK9h/b0/j8lc6vdjDjTUNdhH5fYe/vKlnozkxozYhY9zX5jupEw+ +f5uKuWVW4PUi18WZLjeitp40c7xtBOtyflSgvZUvz4BotxbdQ/ONja9FYbltnntnN6y vrDA== X-Gm-Message-State: AOAM530MphMMLm9wDguaN7PEhVyb49kJA3kI6F0OE22bSNeAGAzHlyT2 gEZqRLOyOVmrrAP5n9RYXb10Aw== X-Received: by 2002:a1c:66c4:: with SMTP id a187mr3996033wmc.148.1599665810107; Wed, 09 Sep 2020 08:36:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:49 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 2/4] wcn36xx: Convert to VHT parameter structure on wcn3680 Date: Wed, 9 Sep 2020 16:37:34 +0100 Message-Id: <20200909153736.2905114-3-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_113651_033376_7F038E61 X-CRM114-Status: GOOD ( 13.89 ) 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:342 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 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 size 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 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 3adb744b093d..18507b4d3681 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1428,8 +1428,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_params; - INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); - msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; + 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; + } sta_params = &msg_body.sta_params; @@ -1606,8 +1610,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); - msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; + 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; From patchwork Wed Sep 9 15:37:35 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: 249501 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524929ilg; Wed, 9 Sep 2020 08:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpJq0rBAjIfgZkcIvzGjAmJoubgA4cDFwy5rbAfkvFLsoddPNVJA7tQiThckvH24uj83PO X-Received: by 2002:a92:217:: with SMTP id 23mr4373251ilc.118.1599665818886; Wed, 09 Sep 2020 08:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665818; cv=none; d=google.com; s=arc-20160816; b=sgZcIZT/M23dXlxPBresIIC+cRbyXotvJ5OmCjVxFbM4gdXh/UgO7L7IKup5Yil50X ZAQHH8fs1nLUFwo5iMoBNoSbSUz/nlVQV+6HqvTMQ0+bWp/dvESGTMhtb/XfdjYhHAld +cjPKwIywHNL/eE4fUySmB9rhBNJFcGWhuHl72JexptJH7T9m8sW1zLx9pu61TYxmikU s/05nJ5h0lucwMOP9tCikVH5BOXZncOlNdNzxCQofM7OMwdQiAr2j7P5Lp9co7upbl98 08dg/0dRdIRgD0GVwO9e8AlBQaZ4fbfWnxqotTWHJmLc/802ShJNlP/HYMa2tKAv0x2+ d/rg== 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=OGUcK4vvt0+veuw+SRWIwqt5mpeR5wM/OfqsXUl69io=; b=EC/MdPvijZkM5AL2Kh7pPFyR5gTIrfTgZOQQ3p1qIRadlUEVY6LKXUBFpz8vAQfr5Z BHVPfBGJzEySrEmtCviI73ggKEiaI7qEzeJNrUu74i5p0CBXUIHMLbz/FzbHbthrrZzJ ayYm2xCBlgzHLnVbLNRZeZfhhdUTyYGU210ur+e5hK45EKQwelclIYqa3MU7Vefyd20r YfraRDyKH8+4hxQUMgs4LgQfoAlkX/KgtxXMKE8XzJQG86ZNJ0MVab8A5UBKu1QgB5zX kEwfrYdMLYMt6DSnML8Wi5U8WzPUVpcmAL0U9Y3bsPBiaykZiAQIzeh/kZxoNO40eBT4 yszA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="C/NmWEZ5"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=AoomR6vF; 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 y12si1868009jao.41.2020.09.09.08.36.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:58 -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="C/NmWEZ5"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=AoomR6vF; 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=OGUcK4vvt0+veuw+SRWIwqt5mpeR5wM/OfqsXUl69io=; b=C/NmWEZ5uvEbG81GMKnU1pb1S qn+GnEteSKRRPTGJnKwHLstSQbef3K3z3iC73hm1XfgsbPbNzB56qCcjJffss8CFT7FHtjQfLAqh+ 8/6lJf32b+iOfHJQWQ2e+5y2sXPUlyS3iBMain/EyyVuXl+oOwr0qWCnOFGGmAbS/nuMIx7mfM5Z9 /yXOenZPbp5nnMZMCUN2XG1chvsOa0nJtrJWwqzshtvomC6FHFYQN7gjWS5exZDcrog4FULRKsFgV GJ60DgqbYBRrwbcPT/qwOnbvTySL/sYFA0f/O+ZmGVnLT1EUtOj0Bw5TOTATvLWY28ZoZgLgTefmc FlK+XhFhA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29X-0006mH-Pj; Wed, 09 Sep 2020 15:36:55 +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 1kG29U-0006kZ-3f for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:53 +0000 Received: by mail-wr1-x444.google.com with SMTP id w5so3441790wrp.8 for ; Wed, 09 Sep 2020 08:36:51 -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=2HTnn0cKnVp0OVhPjKOxy9H7Cqlzp1+vwQDeRnijNCk=; b=AoomR6vFTgtmQMXBS5//PJ24M/3ZKmKyQPEjcQiFNBtDbR2FCjrTLmHELuiAzxBNvg wOjBFmMT0VYpRSNrY38zWzDCL6bCAtw10+11hmxCf6uihKbzbli7dGnT7J3jK45y4qp4 A1Ph9QbYl3ylfpA9qcgWVBfig2lbJ4j3egKlWeDVlqdQrhjNqSOQKAD9AGrNMZlKnDTW +9YoDga5fId2bet7VwXVpezKEcMawr5z+5ZiqCcbyuXzX9iUJfmmB1WNWWftvzR7q/fY +yWX1BgSCAUg3bEfeVbuVF0g+0hD4TUIOAypIqLns/TTghkfKaWhYBh8rLS3Breo1n20 gxyg== 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=2HTnn0cKnVp0OVhPjKOxy9H7Cqlzp1+vwQDeRnijNCk=; b=lDhXlneI6KEFqCY5wCgPZQGo4KBTI+wB/jKyOKL+3IUZ6m/pXQplJ+rvNKJ32eA9hw BPjAhCgaEn2feuyHwEMP7DyYzpOWe2GBEaWNLs18IcP/qVa3xfTlnE9wj6iIBz7kQSyP zz3eCETf1XXwMRQr/Ktw5wwgCAka8bXTjSRre4g62YVud/9W1nSZq0xOEJpj8HY7j+Np tnD+/rVwymuFUrCytBKvIeuwrRQKHIfPe++6LYf9sJfxxXB0xZsHPzNuxytU610/RZ4q T4fnG01Ua3nulLU2RDErpXRzMevljwHu5a6gNy92vivJQeAnRn+ZhkHKc06tNoWB7tQr XR9w== X-Gm-Message-State: AOAM531LHFSO+skiRwtDwIZL1XR0TSvKjpjtbfGZbGDKALZa1d1fqjFx fxaATaEolX2stoEqTuUkCZFivQ== X-Received: by 2002:a05:6000:1083:: with SMTP id y3mr4366638wrw.405.1599665811176; Wed, 09 Sep 2020 08:36:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:50 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 3/4] wcn36xx: Add VHT rates to wcn36xx_update_allowed_rates() Date: Wed, 9 Sep 2020 16:37:35 +0100 Message-Id: <20200909153736.2905114-4-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_113652_209277_3C486395 X-CRM114-Status: GOOD ( 11.99 ) 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_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 This commit adds VHT rates to the wcn36xx_update_allowed_rates() routine. Thus allowing the driver to latch the declared rates and transmit them to the firmware in the same way as other 80211.n rates are. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 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/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 36cfa7043bc3..720d3fa8ddcb 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -766,6 +766,14 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, sta->ht_cap.mcs.rx_mask, sizeof(sta->ht_cap.mcs.rx_mask)); } + + if (sta->vht_cap.vht_supported) { + sta_priv->supported_rates.op_rate_mode = STA_11ac; + sta_priv->supported_rates.vht_rx_mcs_map = + sta->vht_cap.vht_mcs.rx_mcs_map; + sta_priv->supported_rates.vht_tx_mcs_map = + sta->vht_cap.vht_mcs.tx_mcs_map; + } } void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates) { From patchwork Wed Sep 9 15:37:36 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: 249502 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524942ilg; Wed, 9 Sep 2020 08:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8qHuGRXGr/pCRFPYXMZb7+RVm7rMyGCp0K7Tir3S+7LExXWtLLyjAutemJvJW/qVCKQTr X-Received: by 2002:a5d:9b91:: with SMTP id r17mr1458345iom.183.1599665819719; Wed, 09 Sep 2020 08:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665819; cv=none; d=google.com; s=arc-20160816; b=ffjeCdIC7+003bgdGqRTXDgf8H3yZ9pntQ9NFbRUUzz49BrpjnILF279oV8Znu2wO+ Woe4FBfr/XgJnFCXg+Rsc4TxlbyKLclNhJ8hA1B5pUynX7gk6XB2iIgjk63gzhhchsJt eA1NnmETynIokApy0R7LMvTbYllCFJHlhvBWvsoAIh3FpK2x2Z7z8+8DfUMIe9BbnoAS 0QdDDVf2BnWcEAjtE/eRtZNeDqWzLXCGJit9lr3eMUaK8uaGCEckdlz3lm0Qd+8r7eFA vkvpagxdkifQSG+kHoRPn+5A2j5guqycNoxxkjORu0rk8iHwjkG/ORDuWKp0WXvX3SIW H+0w== 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=J1Cm8f3NM9ljGAVKUphDF1N5ATZn0c8RXFDJlm1OSc0=; b=soALuC8HZTPewrYbbvkjnsCF5uqvt6drk4Q2qrvKUjZQT3vTqn1dkgc1E82v5QbueN LkEBTHfZy8KB1xGwqr+kc10/6d1Gejgv/qC+gBuXLB6QCNBzTiMQQJd5054ZZedLmTAF ptjBHrh3iK9tuIObc0G7oOdkvDDDdh59ZoX9yabZrU7G4ANuB73CnnEKjTORA9OSBV0W UVRtBQ8d+Tc2QSU41g6Lk3UvvgHmxfntJYn1RLdIAQWV0W0of1VFbC2oxoJl/e23Fup0 tebXp55mQY3X0bs0DiW/+cMJnlX5s7DjV7O08K8pVQhH9zkJCbt/yE7FXSUp9pRZdj+l B7Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=rfTlOFLs; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hIBDIvRY; 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 o2si2222832ilg.70.2020.09.09.08.36.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:59 -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=rfTlOFLs; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hIBDIvRY; 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=J1Cm8f3NM9ljGAVKUphDF1N5ATZn0c8RXFDJlm1OSc0=; b=rfTlOFLsoaAeVecWpgk4r1tIT yjV9FUSDQ6yS0Q7zzLvWZMkdrLZTWFukRN0Nw/xhDUzrCa8duTUHcNPhAQHYYxNFTcQSQV1XWlbwl bi7dDmYBiGuyS3U0VUXmcTjZYisTgKqm4EmDUg9L0SSm29oP066P1h5vrvAwD1xs+kARAiGuCTpzr Yg5d/eicxhipWVAgtb+a8Rtm3Pw/4EEk7epgp0tuGG9n7RCTZHNVCCrJtZmzSwgJxDSV6yYczBea6 LDhjAU6o24xEuo5pcoxHazT8jYkyrqyg1AWUBccSp7StKVrV6StTbhNQ5LxXcdBFVJk6wnhIgefp8 RbfxP/kOg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29Y-0006mV-8V; Wed, 09 Sep 2020 15:36:56 +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 1kG29V-0006lD-5S for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:54 +0000 Received: by mail-wr1-x444.google.com with SMTP id x14so3424118wrl.12 for ; Wed, 09 Sep 2020 08:36:53 -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=Rwo9ulFXffmBiUSboQ3Oj3Dcuj3Fgxbrid758yS0THY=; b=hIBDIvRY+yy78TmSS6OMPk57iLQDR/lyZQKzboua/CkqLlWySC7531fPNftguLjeso qNwfZdYXymY1BYADXVYkAs+7MUCIlVyirrr0RjO9mgIzlP1/gdafUJAB9f4bE++Ntd/F +WfTkLfSvV3CfqJGs4YNw9cld/ys6wTSSpHOK125k4Ekcxu5e51uh/NXmEhxsQHG1tsg KxCvkZ5ASpPdFcGi9yollNSqbMGmDNGwZXLocIZgV74rZIRWehE8DBAFfvF8qobYEDv3 jnHbYau9bGO0P1RzXuCp/fX0axid+Ddp3V2wleboTPHgv0qEhBFpvCIGqUAASGdxmALK DxQQ== 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=Rwo9ulFXffmBiUSboQ3Oj3Dcuj3Fgxbrid758yS0THY=; b=CZtlMi6/dhYD1vxPmx30CAH1k9EnmTZ5faKEt84ykA2NQlh7c3TspjPlAguka/Q5ZT Vr8jgFrzy5QKysjq6LYT+XQCGmr1bXHNgLzWml7A/qqtMWHVqhZv1mSC/LLdsmJmOAKv vIqYrE4AC2ShjKGh9v/u1AICdH7sNqSB18S5LBrRLfho7puqXk7h2lYDxIBqePzej2va 2LPOB4448+3W8y43EdDJATlxVnDQqmeoO+LOQmzvs4V+9Sd49MOIK+3yNOQCh3zNB0Ko Bn9q+owdf+LYWjn63ErHS2bL65QiQD8yMqnswQ1vc9evfg/kKKlhFJ+GwxNiFWsjKfAG xXYA== X-Gm-Message-State: AOAM531CjTwicJBReSxtUhGdrU8bg8syzOvY5067AjpWrTITVMDgwzWB XOMUo73fM2VNsqnjVtRzkaF4NA== X-Received: by 2002:a5d:4486:: with SMTP id j6mr4410725wrq.278.1599665812216; Wed, 09 Sep 2020 08:36:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:51 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 4/4] wcn36xx: Advertise ieee802.11 VHT flags Date: Wed, 9 Sep 2020 16:37:36 +0100 Message-Id: <20200909153736.2905114-5-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_113653_228041_4648A8CF X-CRM114-Status: GOOD ( 13.74 ) 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_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 This patch adds ieee802.11 VHT flags for the wcn3680b. - RX_STBC1 - SU Beamformee - MU Beamformee - VHT80 SGI - Single spatial stream RX LDPC is declared as supported in the datasheet but not enabled at this time. After this patch is applied an AP should see the wcn3680 as an 802.11ac capable device. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) -- 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/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 720d3fa8ddcb..43596b919ed7 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1200,6 +1200,35 @@ static const struct ieee80211_ops wcn36xx_ops = { CFG80211_TESTMODE_CMD(wcn36xx_tm_cmd) }; +static void +wcn36xx_set_ieee80211_vht_caps(struct ieee80211_sta_vht_cap *vht_cap) +{ + vht_cap->vht_supported = true; + + vht_cap->cap = (IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 | + IEEE80211_VHT_CAP_SHORT_GI_80 | + IEEE80211_VHT_CAP_RXSTBC_1 | + IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | + IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | + 3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT | + 7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT); + + vht_cap->vht_mcs.rx_mcs_map = + cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_9 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 2 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 14); + + vht_cap->vht_mcs.rx_highest = cpu_to_le16(433); + vht_cap->vht_mcs.tx_highest = vht_cap->vht_mcs.rx_highest; + + vht_cap->vht_mcs.tx_mcs_map = vht_cap->vht_mcs.rx_mcs_map; +} + static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) { static const u32 cipher_suites[] = { @@ -1226,6 +1255,9 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) if (wcn->rf_id != RF_IRIS_WCN3620) wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz; + if (wcn->rf_id == RF_IRIS_WCN3680) + wcn36xx_set_ieee80211_vht_caps(&wcn_band_5ghz.vht_cap); + wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS; wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN;