From patchwork Tue Sep 8 18:24:28 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: 249313 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791264ilg; Tue, 8 Sep 2020 11:23:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHCuKaXhrFiM28kPj8HOYHnlO8x9SXQ5t7OHiBc2mj2KhcEKRm4kaztmJGdHIibUO01Nth X-Received: by 2002:a02:ccca:: with SMTP id k10mr217293jaq.111.1599589431041; Tue, 08 Sep 2020 11:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589431; cv=none; d=google.com; s=arc-20160816; b=mWt9cpNqt3pL0fxLROBRw5nz69MjJQWTnIzd1Z+cowagd0dtL961fAnfzjmgHncm/7 DeEFjCMePnK0zSHsmpduXVcgjOPoRKvuCRP40KEmgLEZslXQPvwa+6L85jAZgmcZXApY C/bddDnS+HyCFqsdmJa1HGY0eqZlIDLGaiqLSaWQJImKzfaAVnXgVWzUJ+8+QHXQj3lp TZT9on2/fEmtZqrI8lOe2FbbhlM9fGgMyEJgWvp5y9EP+Kcc1Cfm4SoA7KcXg0jZmI44 27KEtpCtab5ZzvUzbjQjYQ21gZXdvGt44Th0CZrY/O5fZ55V+a2TC5qKFBDN6FqgTxWv 9Q6A== 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=T66K34P44PV0U4JGJMCPfLdFBvBls5IvQTbWqh7IhxpDqQe3JFPxmbP7pv29Bc0o7b H8tMf6BvqVKTEJm6s0YnrWygCsj6zDbjCySK02P/VCcMl7lJ4hAQL/iB1Ln8znJqFZgl 27ozyX2fhnLOIiUGVAEIZIITwaUd4BeOcR5t9Su1d3nOAqnq+3IOx/gO7DHr3Qm1FWeS oUiBxCqJSEJMmT6cOBwOsY4Fl6wlaOY/lYHanxjcTpQFFdvOUGPbsqjUP7TR+qxQb/zm 65J4hXeotokR19h/y6/n3OAn34APbkp77HZJbFyTZuKfUj9Eddy/W7QIlVFupnqRcOnY 49GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=BoK2R5rs; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L84IYj1+; 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 z8si18195066jan.18.2020.09.08.11.23.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:51 -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=BoK2R5rs; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L84IYj1+; 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=BoK2R5rsO8IlxqAte6s9EtktE As+ZV5wYa0+Dw4jqa2AExavj9UucOvvjoXleRzMrF1MsL6s/uZyHsDhBOnJGbTx/yeqGIA4rYPTse RnUMwmtBkh+W3kF5BIDJzTdG6X9Yyr8pYrhO4FOilxWnX0BVGkVm/vJJqT6kMpqpBzyzeToArfxaK zBMi2YX6YThwCYNlhhnRb3/LlwQmPy0PwHm22A9rUlnVvfsXAB92HYN/stl8e6lPLGKRlVjBq/i/A 6fcvmpQpw+xscluWJXdafaA/HuDZsAO4NhxgHbrcW37FDwG0JADek3mUKhTQ30UEb/9y4OBdyEWCd sNZ3SqsnA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHU-0004vc-4l; Tue, 08 Sep 2020 18:23:48 +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 1kFiHP-0004tL-VX for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:23:45 +0000 Received: by mail-wm1-x343.google.com with SMTP id l9so303100wme.3 for ; Tue, 08 Sep 2020 11:23:43 -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=L84IYj1+mGRVeUF5X+p6fcIEr9exM6/rlB2Liur8Tibm9ON92A+Oh4Pmmx4sPMNhIf PGPNl0P0f2cIhb1Fw36RKPFZ61WcMyMeM1j+AW0ga9zl/e57ilZ/Y4yNHDs9wthzN4F6 /1DgtoNBwUHJ2ApEvJOlvYC5zeut5yRhuNIbnrJ4tRHU6mOoognuHxahBviwyfCtJkby fnIh2MqAj8jEwZMBm9VJzAKG9KtkLOKXnfWp2WDcGzwC4isDjxVLWP2eO8Ma2lENmMx0 n9uCGvqOaieuP2yZls8PiEVL2ho+WfXw3tdxzqIHsY/NvBs1X4gqWbpPAjbdGajXvPk4 RYmQ== 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=RFAc7meZwOessm6iCyXsoghToJYqZYSODZWRvwt1EpX2sPjwFVRhL191bz4nLNbhZH CEYjukj74ktWv37K/mmaI9+Bt4WZ06YAX0RMTyE0y5v+FX3iEsS7+o0D66dgparL/PHq 69bH7g3m6KN2ZRDWu882n+oHJWHHg2pBJ78CiT57Erm7eM9dKCNrydjJybTJgNEnV3Fd Hi1z9XioOb0DnYl+RyB82eE+JHlMZiejmNXkNkTcP/0FPkM58xKUKN9kClo4M4wiRj2w 6c55zlUSbcHpxO5RFFRJACIu7gUDGNiYWa0FnKzEqRFKQpt7kBMs7Vdvl0MHzkZTqOZB C5YQ== X-Gm-Message-State: AOAM531oajCG7I9VJCI7eDAm+qKsje29/SZXKp01lNAcxzDUSVchazKu W4fmNv/eH2QCuYNio/3xIawKrQ== X-Received: by 2002:a7b:c5cf:: with SMTP id n15mr365746wmk.93.1599589422587; Tue, 08 Sep 2020 11:23:42 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id g186sm286202wmg.25.2020.09.08.11.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:42 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 2/2] wcn36xx: Use V1 data structure to store supported rates Date: Tue, 8 Sep 2020 19:24:28 +0100 Message-Id: <20200908182428.2870226-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182428.2870226-1-bryan.odonoghue@linaro.org> References: <20200908182428.2870226-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-20200908_142344_071300_E703CC74 X-CRM114-Status: GOOD ( 14.93 ) 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 Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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];