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); \ From patchwork Thu Sep 10 15:08:20 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: 249661 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827712ilk; Thu, 10 Sep 2020 08:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCaX+Gg9NZaZhNX4rdBNsuR1Z4ssyZu7CO4n8PyyTWTenzkGqtTTdIZpffracfo58d6Mff X-Received: by 2002:a02:cdcd:: with SMTP id m13mr9146300jap.69.1599750463438; 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=mJis6YZ9G8AJmINt/XtxBAYjVLYPyPRcEFfMwPO/bZOavSoRHmlWPRsSMzhcHOf/2i JRdCTrUxmuPm3ssjhq97WMG+kh0P7UTj2Ng8UwQMlFgnzpiYSGXrBEJpl7Grfj4LmejI q7+iYv2gPmSj45+bdvyuiwKdG6QJCTRTfPIfyKVhRnLS3hm4/UBifhtK6/XBHE7aacvG t+gUqlwUm5uYLcVGRO1fj1+WTAYd0o/VGxKDuIxM1G4e+bC//4xwEVTAYRDnGGV9HziH 81faQwsUsPNNUa8yQ+VPd8yRUxEu3mkTjwVH/40HZw9OtwhkxfvjfnNgdUMgorns0SM5 wa9g== 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=93WCedrZqVe9lPNMowtHbqy+aXVteclcGeIjLy1mOI0=; b=qJdIIcD+IPS22oB0JtRaDzMuiMSjuxO+tumrekLhFLYSSH5bR6GabVhO+H8k6OsjFr nnZMgplU4zEdn3mCeO8Uf0u6Iu72MWAbiLFCEtVH2gaMzCgzfAFGiNSzFEl37gPZ89Q4 8fwpylgVJCPuCaIb5V5lKiRpvDcLjwuh4JSwN7MSbBkITvhOyOvmXEwb/WYCsnDkeARn 33onxdXa4r9DvRf46VSoVlQ9WEytdgARyGDB0jd5Ii39RkpAzayUTdLI34J+0oz29SLZ tuV6FeBzPNLXcALBq/PQM0kVBN65tW8k/ytxeB2Kyh9KZ0KdFrsgmShfg4Sr75tcHmQ+ rgsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=viWBJ2Cp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T8ULLRfh; 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 u1si4302514iln.148.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=viWBJ2Cp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T8ULLRfh; 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=93WCedrZqVe9lPNMowtHbqy+aXVteclcGeIjLy1mOI0=; b=viWBJ2CpTEkmekcyuZY9rhsj6 81tVdhA5RSy9aX75Sbw0rhTZigfNkU27E0z74Ow+3hYxd61zzTITq0z8TEmpiA79rCA6J07HyjtXn QtXo8FOFv57PSHJ+aQAo4JSkxWkalyCj3S1PYCkiC/KgYKoeoyJ30kChvlL69K99mBDce08IcJd3X xygGsI+jYfGQWSRtZL/4WPc+tQqeE8mElRpN4sWCiZxw0SNU5RY7im2EaLeVEi/+hFrvUuk2g9aiM TKuwFhZbhhu2DJTo4dyeOB6CGjScMwgenAqGsoc3bWlrqbA9WPNhMe5+mBd5b6tfzb9pWbPMVEEWm 6HHxjmAwQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAm-0008BX-9q; Thu, 10 Sep 2020 15:07:40 +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 1kGOAi-00089R-Vd for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:37 +0000 Received: by mail-wm1-x344.google.com with SMTP id s13so372289wmh.4 for ; Thu, 10 Sep 2020 08:07:36 -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=47YTP3hiYkA8vkH+lzBNX2aS1DpgYw/pF0C+zzRdrmk=; b=T8ULLRfhHaaMLBkLNhFX2NT9iPeqyReXcGhPzz4nEnpuRXHkqk02HObL09XPP9CDW/ oP2tP3txY0B73E+E/JIvGXlvDH1UL9mYkAUahQEu3KNoz4adbg1F++gQiDKH6Scu4h0w PVmn2uUhroMKitN+0u1DPK9KgnVWGqdtd1jKp2LQVWHGk3wHJH54X8M3nA0Ld0bxmL2L m/JoKqGPikkdEAcvKJutj4jTLmMlRrM6uDBqbnyTBK5Jw8lT1A3aBxO4r4ityJDlAmEG O1x55g0FgqSd7UEWTlST8cFIHlY4naPchJ5uyGoOXHAITB3S1NgY5QXMBu7IbFwVTXUB Qv8Q== 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=47YTP3hiYkA8vkH+lzBNX2aS1DpgYw/pF0C+zzRdrmk=; b=UspN+Qy23on1CQvZ+QyUKTp9VN7U3mx3WJdL4A7pODg3OdhNpWpRhCYRkM3qsWU0rK wRIf/R+DxEYRFhaMzDMDOZlOCy/InBisYCCboPpZW2mFmJv0QA+cd9YrBSQNK+g7GcwH Ltpya6aV7IuxdiWA3XRI8ruumPSJIAIBhSbd61o0RrfcwebtmfW02jOvd+7KPthaggkP 67ovFtrHDDQDIrzBJYK99CTiExe41uqgMyH7ABbxXGeMRXPSoJ+qQR5HCBHWSUvIiczO 7Sot34QRJ1EDj4NIuNdPwXbPWXfv4UV+j8KYaiMoBn+sYn+cnDxv8Giw9P0KRLf47MWa ppnQ== X-Gm-Message-State: AOAM532Ykyrm75aPe8VwB0CO2+//RFBFFpYSor5B0iHs6IfnMXYcQfi6 k7G6wvA1Ti/7WfeKXXuL/r1/rQ== X-Received: by 2002:a1c:9883:: with SMTP id a125mr442728wme.133.1599750456072; Thu, 10 Sep 2020 08:07:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:35 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 2/4] wcn36xx: Convert to VHT parameter structure on wcn3680 Date: Thu, 10 Sep 2020 16:08:20 +0100 Message-Id: <20200910150822.2179261-3-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_110737_058330_D46622CF X-CRM114-Status: GOOD ( 14.13 ) 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 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 0f5952003fff..e74abc153153 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1446,8 +1446,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; @@ -1627,8 +1631,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 Thu Sep 10 15:08:21 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: 249659 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827730ilk; Thu, 10 Sep 2020 08:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6DSdbZerHuNiVWsXBsDpm0G7qOn7zuJ4dTOWXEI2xL04OvFsFKuT8FfqIi0jkgMyO9Joc X-Received: by 2002:a6b:8e8d:: with SMTP id q135mr7991551iod.52.1599750464603; Thu, 10 Sep 2020 08:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750464; cv=none; d=google.com; s=arc-20160816; b=L0jzXhnHAN5X/WbIirt+hFI8i/yIvo23nwbcaNZpHlIeU+I324cr+5LuxFItDApCAo XGI57czV+l/zNHO6aFlXk/VOsRTkGWOdiPAddT9atyDRquSJTqWW6OuVYyViGM6C7yLp nt98XKw2b0fJS8QBJCXlt/MKqwx/a3l2lx90rCMeukojZrnlp/BzzY5nl9TdZFVm7ZEv inbuaf+nCOP+cbMEJ6Cp2BwaeIJMuQNCWDSPVxLBD4vCHFb2UWUPu0gny+AdmbsqvAN5 jfd1YLOHYad5Xo7YLMGpVau+2O271bEBCj7FuUNRRRRR0Rk1pfnm/cWTMkNyo728Epme d4DQ== 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=w1AWFagymGnLJLr0R4asyocoQN2MHmpJjKSX8OA/W18TvEPSx1+WHQksoK9WqeRDF0 BRpR4rfKpMNzxlYzXHJNjzK6SvkNLlcUB5I57h+1T99xsMhdJhrHmjWq3ruM7pvrrFnn v9fxJXqVksyLrf0O8+ikTXQmqKYIwpg45z1fgSt+4pHfKC+NMNYyRW0vsIGt4xgKj53G gjKHfkmmot/SQoX85fbJBl2Vu6F+cjAAnu83be8QidAxnrUja739k54L5c267ekUtM2/ j+0dDSvq3pp+8eoHCieS5FN3SZPv4uxm2vQAUOA8sfqc6IBHK7POTMxePga5Ecbjdxpe HaMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=OwiqC8yp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Udk9i/A3"; 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 y3si4236067ilb.37.2020.09.10.08.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:44 -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=OwiqC8yp; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Udk9i/A3"; 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=OwiqC8yphtFSxkRhmARfC2bAR QwbOzP6+fbeEzBMagpHNOuioEf7+6N8vTpJ4lBkOIawyOB1EpoR5b9R/Ky1s7NPghX9lVt8kiUbWp /jdsnENOaKtj48TE491L77e4Q31l147LNOqYhe6vWeg96HID1weDzUOQKBiQRotKmd+MkEqTIF0Vf Akr7yngz1lhuagU3sOcSMxBUrbjz4ixcFjbfZraddlzlk7xFfMa3QUGyFWpv/intcc88OAufAvFDA JoKBhA3IETqxxMkujn1TwmWIRUcZkEE7B10IqsmyKr6l6Vv7AlT2sq3UpuzS3oe8p9U51WgsINhtu yIkAZNrPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAm-0008Bt-Qb; Thu, 10 Sep 2020 15:07:40 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAk-00089u-6L for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:39 +0000 Received: by mail-wm1-x341.google.com with SMTP id x23so378912wmi.3 for ; Thu, 10 Sep 2020 08:07:37 -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=Udk9i/A3q4l8EyDrosQNtzW5i1Tl7gMR62Dmd1N6E/F+bH6NAhG/bTLZo6/7hbjBu7 tZrRbOI8Om1pjmZvRVsIf7QW0Hkrafu7QKJIrjAM4nniBClNnmgb0LNm2WnvQtSlyNuh lwEjeJncEjtFuo12YjDw63l2n53N402POxvBVE+m79SdOZpWh2vzlSq3GA8H9nX3o63K O/ejxXkp1ES/NFRK9QqS2Df7M/h2RBGI4jdcSvvPnTo4LBy2EeyI8AvEkw+zau5AiOIK qaDvJ+QmskmzZ5Lv523afDWfvrg1AtYnI/2ZuAXxWUk1mIM0ZylOnHEBaWzOAkAytjQb V+xw== 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=aiGZcR04mjX5sXpSruSrWCRAb8uPr1op8/jKCc8xsGJhOUihFZ013jAsbyDNQgP5mT lqK7E76Ea9E3tCopMnr8dd/1tzsdtxJPzzoITkLdQ6FVjmvjxieOhlbkmhZQKHdvUDfS nVcqOAYbYLDC//Ok9dflJFVqoljhcm3y9I7TJJrpsptWsi/jBy1MOLWHxRaFUFso1ff/ PutuKs7eA9XluQUCSlhwjeEPd6epkEjP+oO3wl7zTOj59KuL3Nq4+XD01xdKItIUqci6 zoY4xTtUSlxn4xkI7+dXX+WkGnSCA99DsYlHLKmq6XsC5JYU2NTwJzJH2EloKrr4UWjQ yoaQ== X-Gm-Message-State: AOAM530xjNbSN5GozC1ffmj5KJTtHJ7iOUPrprwotvEJ3sVJHHrv2TRc F83oxeShh8JBI9Nf7W6YCrfpmA== X-Received: by 2002:a1c:dec2:: with SMTP id v185mr440365wmg.1.1599750457145; Thu, 10 Sep 2020 08:07:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:36 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 3/4] wcn36xx: Add VHT rates to wcn36xx_update_allowed_rates() Date: Thu, 10 Sep 2020 16:08:21 +0100 Message-Id: <20200910150822.2179261-4-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_110738_268435_FAD97D49 X-CRM114-Status: GOOD ( 12.52 ) 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:341 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 Thu Sep 10 15:08:22 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: 249660 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp827736ilk; Thu, 10 Sep 2020 08:07:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4aKhby8nF2XpkkNArFOxY0lcdPc6S8bNBA5IyXHcsKrBsWw/T+4dZR+phxscd9SNP7X8F X-Received: by 2002:a05:6e02:111:: with SMTP id t17mr6174113ilm.96.1599750465165; Thu, 10 Sep 2020 08:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750465; cv=none; d=google.com; s=arc-20160816; b=ErQ6TtVbFKtVeWuZYHQzvl9oes+bmAt4uk6UE1bwYfdDlo/0sl5TQzQtK00M1G6nQA r6CkUxLvbdOCLMynY5rjf56X30YOr1H/rfwvf+0+8q8v60X/n31Uvvgm6oqjsKp5Bi3W qLstE14pCSmeOUCdBMxyvnLTGNbS+gxmcPJxaxpF1xD80neNR4TPhOgvGpUIdoLryvGJ 3B/XanQQQc2isi0Jb1sxq4pVGtDkSbZM0dwTQuWUJPqD4+++roeFoEJtBg26a8dvr25X 9p5a10opqsTs6LN4/kpxg6RBEe18pTUeKz3i+l/MjmgJx5gM9XFhNrLvpo/GzVUMT9nu jL+Q== 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=ne1/XN+yMdxoeIWGiwo/uvhVm3LSA3ITIcKzZr/LYkat5Qyeb/CFErnj/Whepj2aaE k0xpsfS52HQMzclME0O4F1f4/P3WRn1USPSXiGHXdxoxKsLIbAZL2BGq2DgOynKHdBd+ YxaEbR9DXPPqhJTqzHM7FZaEQ6wFKaDL54frWmTCIEWUyEDOvhcHmlygkUjPwJZ+QJbp QoC+eqV9t4mwxj3UYnn7ljtPlplMu6CT73Nnq1hhEWRJLdbhYbbcki5PUI4GX8QJdNni ItOencbg0Ew4DKHMBz/4BvbhpdKHhMP0AJCbyhcOW0ZVqpjwdTYu2yQcXlfJRQ7rJYVV n72g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=prEMkZiu; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j+lXJDHc; 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 l20si4542371jad.122.2020.09.10.08.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:45 -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=prEMkZiu; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j+lXJDHc; 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=prEMkZiusGKf4i9rdNbXFHNg9 BdT3yVLzz3RdFdClXPhSfkWhBW70F7eZKbB39/Dq18GDNcGF45VFlGyQZHULhASzUyr0TADfRW8PF s+Ek7ZB1EuVjBXCf/qlwT9jjV+uhj104IqobGVxHzkZwiqAzEi5a92kL1dPG0oZH/6QG3kD6JPEq9 0oi3r3F411LxqwnDF3V8GGgLmepph79JU9evnk88Rx3fJzbKj/Dnvy38mWncfyPNk/4OPIKr2Tq7P Ual0r9oA7kIA0MwlBXKcy/240TIGxNUtTmqk9H8QXkaBajw+9VcKQCLybMOaTaHqJW563alv0HD0U DNCy0kGEw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAn-0008CA-9T; Thu, 10 Sep 2020 15:07:41 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGOAl-0008Aa-1J for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:07:40 +0000 Received: by mail-wm1-x343.google.com with SMTP id w2so393899wmi.1 for ; Thu, 10 Sep 2020 08:07:38 -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=j+lXJDHcwYuWzsQJt55oO7RJWUviQm/csrE/GGlCgz0iVjB2Pc9M5AegwHyVEtzbrS YOg8tnqBK5NvjYPhESZ44xSxniIan0taVSJEDNuzxs+f4G8pcxBD3KlcnXWMLdn7H2/i Emj26zznQrDrmvaVLRndoiWxTZzFGfSIqIhgIbYLkEsVxl2ETuIaDfyImRv/Mal2lkbG 2kEsym85WL+MNI3TXCmw2jB4KmS6i1GZZomoDBmiaHUPe2dRmchWVdRY7/k0EW/gU4lh P8EwRwSDALqyPwDbz0qwdGzDpsLC9ggD66t2nsJI+9gcTm8t4pkb8WFHYWOt2zaJVUVi /g2Q== 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=cf0WgIDxjKnFcO27WFL5SlGmzIGl/e1DPzhSTLIKcr7k54xZovM6wPT6GTTjDOFfy/ MTAbeJAt66U4S5J1KfKss+I0ly+3Tag3czwF3M5JE6jXJt0cfdvFwEud3JFR2owEppOl u1HgoKrn5pPtCjkMr/MwY1+A3fwRJqiI7I3W+HOhrwPCj0602BGuG3BZUJ68kLEGbugb WIAquu7c5pxGur7OY0B2yFSdSFCYlGuFjAawDQTsUchCRY4iR6hnPIr7Fug8Dig8GGmi LX13enOi3bkzsljjzZ7zMz62d0vzs7zXjvJ1TOjP2MyIWukHxJ7kSYUD5L7Zqs2oEnqT zzVQ== X-Gm-Message-State: AOAM533k9m0trIVLpMdobbMpVuTNd/FUegsvtTQpbcBsN7iJuwGerLMC aNZVAD5Cy/zbnnG+Vj/jF58otyGvZ2XEXQ== X-Received: by 2002:a1c:2ed0:: with SMTP id u199mr405417wmu.125.1599750458078; Thu, 10 Sep 2020 08:07:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:07:37 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 4/4] wcn36xx: Advertise ieee802.11 VHT flags Date: Thu, 10 Sep 2020 16:08:22 +0100 Message-Id: <20200910150822.2179261-5-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_110739_101224_6BAF2355 X-CRM114-Status: GOOD ( 14.10 ) 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:343 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;