From patchwork Thu Sep 10 15:04:49 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: 249629 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp824384ilk; Thu, 10 Sep 2020 08:04:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEOBefsKaIIAVK+RyOlpr/ZEosIgTvl8uFKv11KuNe/6IYa48GU2CLrdQBWwiIq7kQJQz6 X-Received: by 2002:a9d:7489:: with SMTP id t9mr4248719otk.277.1599750258742; Thu, 10 Sep 2020 08:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750258; cv=none; d=google.com; s=arc-20160816; b=m4ABDokOtkDUsTRZbE2wkfVOvokCeWfa1WiueYAeg2hDgpv2VuYN+XCgyTnWDmxgIW /OQdGbMcZJKA2zphRc4x/s0sdqeP7ugrBAj4oqjG562xJpdb6LOi7EbUfulnw9cT0CQL qZH52EKqMxGMRLUNS3EE33pepu67/DFxtiWPVeokjfAjHWPbL1IFPDM3+x3J0F9EzJ+Z aGSESjh8JpASqbpMFJSqyGpm2ss0z8k7ENUbB7ysb0AtSs0VHgyxF+2b2R2wpxn7hVJ4 wzpN8QZF9tEkGio6Qi3C95mLHc25X45g6vyBjOuVIIgWBN5kD3yX1VVzMn1H9N/fWwoA Tkkg== 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=mrHQXYgOzGrE5OAhUl3GjkI12DsuBI9GCRW5xszef4U=; b=afimrze/AoOtBYK5nPoiO62ziWzBFN94akikIxwDdooOey1wAoJGhIrnX/UckK3u3J Su6JKm8mPWHRwaPOFO2fJvlO3+0addp2akV6W50b0N/qFqmLmi+FX6P4/Pz1yTpq7J/i VieOt7VxenMj/DuO1DxCNKkoqgRM4djfWlVp/dwPk/mF/yl76xTBjg9hcEyPp2qYiR+m fbjEoViaDOxs0dDq+6t8fUTIEjkFE3M781BwEIpYjGU323XVOOnb24P5rHrJNBNEfL7x 4UfVaf3WESaqGjeR0T6bScai6pDan5AWUy4B4DX7JuT15xAoJvgM0ehG9tZ26iKDbchr kKrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=akfEJ+os; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=inDBJR68; 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 m6si3079823otq.57.2020.09.10.08.04.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:04:18 -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=akfEJ+os; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=inDBJR68; 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=mrHQXYgOzGrE5OAhUl3GjkI12DsuBI9GCRW5xszef4U=; b=akfEJ+os0gCPZhZ8JFz4yVSF7 A0TYn8NeNtxLcyXZ1habYCJmJIxeKNkE6eOJ5zaYvbbO/UC0Cig0NvJQ9w3tq5wRdalZCsAyKr76n p1LapiOVIFehwJ+Ozz/NC3iX5DO4LYk4drQ36Gy/uMQtlefJLNHjpJ3SZrIK1u3j9o7PLtbsVw8wV VR5hxY3UA05M+O9QxPq2KXk2YSc0KDK4PkWx5SA0DpXVxXxbEB0EYLlcLSZo1iz8/NLDjTkBmQTDv PFUCT3+UHlwm6Y8GlMCzrNCWZDaWUTTKObK+0watU9+C17IS4bkCZQP5+/1uBClxvu9p5AvY/TIb4 5h+gZP8kg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO7S-0007JO-Tf; Thu, 10 Sep 2020 15:04:15 +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 1kGO7O-0007HH-NL for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:04:11 +0000 Received: by mail-wm1-x343.google.com with SMTP id a65so352452wme.5 for ; Thu, 10 Sep 2020 08:04:09 -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=RqOhclRRIqI97WuGHZsdvXxzhC2mxsIcVlTbaDy3Bdg=; b=inDBJR68WYJdwpPmY616QNwaCxGJEHgdaL3t93f7/bywUN6ytLC2hWLHssLIhl6GPb uCm9JZi9LYz4y2rzkRo/E14Al60Du8sJcgYo/FqT9BW4qPvD6TdHm2Hzinb/0gsKfry5 EiKo6pQhmwX1Zyy4pSbSt9A3SZShluCBIU/bOqOb4Ns3tbE+yzjQCgNaBFgtfpv6OsQ6 VIX21FYZENu/5ZEI6IfIFrfjhB3xnWmTqmo5x090VvnTnNnsL0HhR/IImt3L0OUt8lzK 76pVADwhhyG8s9j2f1s9cpjVkZLB6BEMHbPkFyEVpW6VSQHVlJ3SOOYUGs4s5sY3n//L 32Ag== 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=RqOhclRRIqI97WuGHZsdvXxzhC2mxsIcVlTbaDy3Bdg=; b=F/tWdkcnamNmggJxI7bxAeOWR4yrRhV9nEN1mb+iZlc+B+95kfF/vJQG60b60E8eMZ ExFfIRAnNw5VdhRp3USfP8BQyHqeNr+OABJhsV6lrq5DmU+QbtCT5HcMxRf+cJpXYCeP wU2bliR07a6wAMEx9/8vNdvUYt7ra8r3/6LtZU6QIxd4PO7Bf0M+ZNK9Q/Swiok5XZD0 hJxxBamNfXDaZpeKHJy4/pfo9zYkvdwWfXXX026V5qVbWLPDcFenWXAdDZFYs+2GJtlp yjONtPVjwUQHe/toPbJqRS135GUVLDl97+80hxamQCvaqSUtbvR+yOTO75Wh8o593RD/ qR3A== X-Gm-Message-State: AOAM533KbffTFI6+stBUwmBFvrtleUvx8Cu3Ii4xODUOI1VoAAxe9932 ZE4N4ebKG/4y/PvQGbA6tg08aMwd7Dyybg== X-Received: by 2002:a1c:f612:: with SMTP id w18mr405111wmc.47.1599750248298; Thu, 10 Sep 2020 08:04:08 -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 q186sm4075754wma.45.2020.09.10.08.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:04:07 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 1/2] wcn36xx: Add VHT fields to parameter data structures Date: Thu, 10 Sep 2020 16:04:49 +0100 Message-Id: <20200910150450.2178784-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150450.2178784-1-bryan.odonoghue@linaro.org> References: <20200910150450.2178784-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_110410_783430_D5E16196 X-CRM114-Status: GOOD ( 15.15 ) 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 In order to pass VHT parameters to wcn3680 we need to use a super-set of the V1 data-structures with additional VHT parameters tacked on. This patch adds the additional fields to the STA and BSS parameter structures. Since neither wcn3620 nor wcn3660 support VHT the size of the passed message is fixed to the previous message length. Subsequent changes will differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger message size. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 14 +++++++++++++- drivers/net/wireless/ath/wcn36xx/smd.c | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) -- 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/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 573799274a02..3cceeaf0136f 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -1592,9 +1592,15 @@ struct wcn36xx_hal_config_sta_params_v1 { u8 reserved:4; /* These rates are the intersection of peer and self capabilities. */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10 + struct wcn36xx_hal_config_sta_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_sta_params_v1 sta_params; @@ -2015,8 +2021,14 @@ struct wcn36xx_hal_config_bss_params_v1 { * "STA context" */ struct wcn36xx_hal_config_sta_params_v1 sta; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2) + struct wcn36xx_hal_config_bss_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_bss_params_v1 bss_params; diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 4c30036e2e56..55aaaeb78b14 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1223,6 +1223,7 @@ static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params; 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); @@ -1294,6 +1295,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, return -ENOMEM; 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:04:50 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: 249628 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp824358ilk; Thu, 10 Sep 2020 08:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrTmn+GF/UNWHJwSYk3Nt0KlEZsRa+vEUOI8nQLdqE13GWgjvjBb2CrUUBSFFsophQxacR X-Received: by 2002:aca:6c6:: with SMTP id 189mr278441oig.134.1599750257390; Thu, 10 Sep 2020 08:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750257; cv=none; d=google.com; s=arc-20160816; b=wbFhR+OFFLvh+vae9ywwXR40lqD4E5IKO0I77JUbFfD24IC/7AsG09Qg1yQD4/sKvF 8VbnFupS3oq8U+m4rBwnAJYtZGXoSeR+ZAFeTIx+06BFCYLFZq2mGNIkbaOTjzLNlvWu o9WdXVlu3DFZRXhX+H8PevRj0Lw89ECK5P1FUqRdarg1EyWU9jN+LztCjNkwiPDOj8sG G2AJ1BQwLB0eMUzTNq+n6RJW9GZ2Ydl53nf2xubL6WoS9wJU/3Wp14UB3ockOZimoatf G1BB4tNB4uHgIiSB29SFmihZWuJfT+CpXd0bZq5eM9BNYtRwTrQnz/Ifa3iGJWzHdLXt 8oag== 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=WPX/raHK3PZn7zGmCoReNfg6IqomfvdKqSX2zIKfvE8=; b=L81EufCLGcNzW4kZ0i1emzUy++g7/e1q0wY+ROOLo7ChezcPXaiWsmLdHuwm1GesoX u7vNYqsrDT8FmPHWBLrLEnNdGUW7/BF1IJ4VvWiCnnwwpG1P+6o+um0JO6K8Sy3HdYfm Vy6S580sxyQHs7hcNAJ4FNK+Ip36kygJDNsLwsUlZ+mGZIDS1ufMHoFniNdHBQ75gezQ bprRKwsNdI5cx79i404ZfZfYOw1o5PJreaxqKmta7a2VYn9dazkAeO0981a7Vjg06QuD vXGHIbQvVJerlz5QobenthU14wulizCDbCmyzNuMHbKi2bO0j6L31jeDRA0bMeBFk3t4 J9Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=jPDMs3qG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vSDGDst8; 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 e26si2963909oig.21.2020.09.10.08.04.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:04:17 -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=jPDMs3qG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vSDGDst8; 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=WPX/raHK3PZn7zGmCoReNfg6IqomfvdKqSX2zIKfvE8=; b=jPDMs3qGEFGHozbTuQAowjCEV gzPx+/UZ8JkSaWoWPndMLEqyXdO7PIjW0+mocXjquYVwVjPRAy3F3pcnypbtdftjed0+iqB5Y/Hnc 6vcf+pkMAXwo/6mEQm0PJoOcGI01kcVkIkqC+CAD6ljOc78qvmtBFMK7Jpu3EbroeNJUIG3s9grXM sw0JJ02FtDAH2EITr79DW2Y12wpxUaxFiOeBgtXbPe0LPm7Qtzd2gcvjIWFXNwCLdrAN8G+dO68aE 2PsxKkSwrB/g5PlTLcYprQEAdeTG56bOER1Qddu7xNDEYugn2B5DLq+KSGKN7yDOMVnhiLkcb6jxU ypTczU6DQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO7S-0007JB-E8; Thu, 10 Sep 2020 15:04:14 +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 1kGO7O-0007Hi-I7 for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:04:11 +0000 Received: by mail-wm1-x344.google.com with SMTP id b79so359832wmb.4 for ; Thu, 10 Sep 2020 08:04:10 -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=tfNF9Nm72/GLHvVDln+H8GXexy5WDv58YkhHrtQxFnI=; b=vSDGDst8DcY4fX3LcPTgzEiZyU07n0y66ZY8g3HrAnCmDBT/VdRdCCrdsFh4jhQNzT jf5hndZuiHGe0yQnWKCjYq4+wyEG8I0Fm48uvm/N1ul6WMZzBdZjDAjhUHaKD3spbmRz ZwGaE3FfejvkewLaKKjyZsdeZgiAclreWQwp/dmJwpIV6RnMWRbyH/ykDdB4IjVN0K/h Yx/AWWH5MKPirp2UqUrQH15DH4Uws9RtE3MWlChTtIiQQe1aLCL4S4qZytCYqOmNENL3 Ma0ANLF+R3bY9RToAXIR84dGSiMejKpiXsy60V9HSsFqUAIUxem37wmqGvvSeFB3pZnD 88HA== 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=tfNF9Nm72/GLHvVDln+H8GXexy5WDv58YkhHrtQxFnI=; b=BrnPGny4hD59N+9re9iHpa7+gps/3+7gzLmdIF08fRLIWu2L19a9wZYaUXIskVdkBt u/3cFLTXQWMguAaFj/urgGCaZZLVzWB4xQ8OBfFG4mRhi6ekBNcoKPUCZIvIBqSPTsaO yN0dzg6j4pALIwrrnGzghcbdPbf4iNpjExljop5X9BeJkGD2YH3J9vhba2EenFmo1e13 GWeciivJ5PttYuhTfRSJRs+VtbqWMzv2AAT9ifvPe7WjU804wKSYFDSqIxkkaxMQ0fPh ZuZhx06+MzRgJGEDsuefi0lP/URK2q6+O5fQBWFwPlGoSoJNE3MiYKtn4w4kMoakyKMk 06xw== X-Gm-Message-State: AOAM530Uu+spUt3qh76IcmSpA1WFxZGOZq2l0+kLiRVeDTJC6kZfzlsP vhaWcZgGrCnZSVBZ4DPrOeEivfvdx070lg== X-Received: by 2002:a1c:1f42:: with SMTP id f63mr408880wmf.1.1599750249622; Thu, 10 Sep 2020 08:04:09 -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 q186sm4075754wma.45.2020.09.10.08.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:04:08 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 2/2] wcn36xx: Use V1 data structure to store supported rates Date: Thu, 10 Sep 2020 16:04:50 +0100 Message-Id: <20200910150450.2178784-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150450.2178784-1-bryan.odonoghue@linaro.org> References: <20200910150450.2178784-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_110410_603515_A877BB8C 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 This patch converts the internal data structure used to store data-rates from version 0 to version 1. This allows us to extend out the internal storage to represent VHT parameters. Using the extended version 1 data-structure allows us to avoid a whole raft of version 1 specific fixup functions. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 5 +++-- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +- 2 files changed, 4 insertions(+), 3 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 55aaaeb78b14..d5ca9907af86 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -242,9 +242,10 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, sta_params->aid = sta_priv->aid; wcn36xx_smd_set_sta_ht_params(sta, sta_params); memcpy(&sta_params->supported_rates, &sta_priv->supported_rates, - sizeof(sta_priv->supported_rates)); + sizeof(struct wcn36xx_hal_supported_rates)); } else { - wcn36xx_set_default_rates(&sta_params->supported_rates); + wcn36xx_set_default_rates((struct wcn36xx_hal_supported_rates *) + &sta_params->supported_rates); wcn36xx_smd_set_sta_default_ht_params(sta_params); } } diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 342ca0ae7e28..d7d349de20e6 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -169,7 +169,7 @@ struct wcn36xx_sta { u8 bss_dpu_desc_index; bool is_data_encrypted; /* Rates */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; spinlock_t ampdu_lock; /* protects next two fields */ enum wcn36xx_ampdu_state ampdu_state[16];