From patchwork Mon Aug 3 03:11:06 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: 247315 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860528ilo; Sun, 2 Aug 2020 20:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydHoLJDp/z+s/ZBk6EwsC1HcC8lg79vyRBjiSeARqcJX5MZMcBvTtsCPqBW4KnHrgPNv9n X-Received: by 2002:a17:906:6446:: with SMTP id l6mr15419663ejn.184.1596424261308; Sun, 02 Aug 2020 20:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424261; cv=none; d=google.com; s=arc-20160816; b=Qt1TJZAP3Ewc/82Qmhrq3ms38pK8RLo/SeSNsytWCEZh7cw3bl38BwAQSmGhNywS45 Bop5MTfIW17kw52fDQ2QqbwfGq4MflFetL4PYX1DbOmTCsV8OPkOPqcyB9NG63Ga5WnW cIKdB9jkKTRfQwrnp0yhcPUIPZ/R5G3qnPmHMYZ6qafyvdryAfU9E3V20Q6zU5u/wQs9 YbK4tNFB7vrRlnOxhcB4iBJzuv64KPZxN6y5cYg/5SEqtm4WX4jsRED2M5H1TYzLytVS O4aGuaUYrXSFVjMZmpntCmTMWWaw7f4ago8+/zyFfSgCLJZdVDMbyik64QOQv+tMtgIk St7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PIUGdWACF4QakLBskliO4hK5XoeTeWQ0rH1gMULYYzI=; b=TFxzrqAs3M6H/8/PEYdeEYmlaLmO3lw2QUq2youoeeFu74dDGtXRJuGjmvqCrHvlFw Vrv7k6xVNk2TIiaXJo+FODA0jTxmvf5Us03h78WGM4KTATuJ7NtfSm0RDorT86AMG8bx Xa3AiqZpZXZqUDdd3cvChcKf9rEtUZaTMc1BgZ+z2HCGdD635dJL7SAFYcnD+ZG7YKU4 HW8GpVN888pti+676889//addSJIdyn6nJ/onYW+1UmPyFdS4N223bv00UuqmoWpGZK5 NZFEEAvWvFhDPef/pphqP17RbG7Rd/vTfFdF65s4BrdkpEI+RYqvhdSfRTXd5lS0VEkx 4LDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lSTTisHe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.01; Sun, 02 Aug 2020 20:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lSTTisHe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbgHCDLA (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbgHCDK7 (ORCPT ); Sun, 2 Aug 2020 23:10:59 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC6D7C06174A for ; Sun, 2 Aug 2020 20:10:58 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id l2so22235851wrc.7 for ; Sun, 02 Aug 2020 20:10:58 -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=PIUGdWACF4QakLBskliO4hK5XoeTeWQ0rH1gMULYYzI=; b=lSTTisHejqVgyFob6lCGtFivdaianmepW5eZaT6gi1E2MbVZQaOGuCmFzmbLabm/Z5 1ppcUw3IuXK7aV4iKRD/Oka64Wa8H3Hxi/U77Y6gVD/gLXouuRd8Wdb/5I6BeC8c3gFI pFRK0ev/7k5fvfuytKklk5PkQNPm8l9d9LijrosGuEHkmizSOlMr1rxWBj2cP43QE7YG m966+jQ7qB4kCwImb0WLvzCJfkt1MhwVNrpodoeSLgptg51aURO/xsU5OT8kktkIbv++ yANVItMY57yfKJ8oRrax9bHJEMwo+GRdK+1lBxIptez9WfYEyj/i761zCtkQ2e0zHUdJ edcw== 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=PIUGdWACF4QakLBskliO4hK5XoeTeWQ0rH1gMULYYzI=; b=oVF9vEq07nTr5KxRySH5Ck8O7PzcSoW8NmBXfMB+VYy3bA1kfjMh/xFQBKvMB2fVMN HafuEaL0/+6yB9neswO8+rsyBOgbZZPUv59avjIi+mtk4YSZyY9H8u0Pt8f2mlP64zy7 eE7vTOMX5cJwZ1DnyRbKUbXYRJMX146bNPID9qX1VbnoG2cMbn7U5OUbq6bl+2yGRdlf 2HkJqKBsLwcDspChdDHQhoTTZp9T8WrCsWcU+f4Gcs2PxCTGPA5KLRMxC0LJtzMndara 1yFiTx+sfVW4OPLSSKFI0RGKemB3rWI5vZFqt+MbiiDTt6Efrce4KaxAd4pUDgssShx+ jYdw== X-Gm-Message-State: AOAM533sgAV9aW3dzOlPKOLUUKiLL3SJ+Ale0Po+E9jJqX5W9UAVE+bW nYW3exWIYqZn25w6T2I0/cOK/w== X-Received: by 2002:adf:a15c:: with SMTP id r28mr12968808wrr.151.1596424257705; Sun, 02 Aug 2020 20:10:57 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:10:56 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 10/36] wcn36xx: Use V1 data structure to store supported rates Date: Mon, 3 Aug 2020 04:11:06 +0100 Message-Id: <20200803031132.1427063-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 661742cba1c0..a4e45114991b 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -241,9 +241,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 821c4ce61afd..c3615704b543 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -168,7 +168,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];