From patchwork Mon Aug 3 03:11: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: 247341 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp861574ilo; Sun, 2 Aug 2020 20:13:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg2uKVIZL5hAVcANXO/BQ/FHfiOR9ovUiaUU3/XtNZwQQc8jp2BPyW6SlSMjlKoBTsa7ON X-Received: by 2002:ae9:e506:: with SMTP id w6mr14193033qkf.376.1596424289387; Sun, 02 Aug 2020 20:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424289; cv=none; d=google.com; s=arc-20160816; b=IuIRWQmvCgnZvw1lEk2IAvT4Foef2mrHdC/yffSLS/hUDicfBZYCfHFLD/ZoPBVjrU obc+h1C/xyB6xkuqazHoI0ZnSX0oqZ2UsvZL0U+NAdrDljWuRx/aVbM1Zbe/JbtERwC8 Q/qPAXjvA3UsU4Cxt4B7/IBVeucgO4C83owo8Nvx+SggUsAdoNhlixNdvgoeUSV51JKz F6NBEMtEXfzt8KETtlNIpYF+403k/9c7EsVDn/a1A6tXb/VG27XBGmTQ/0NIoZN7ngnl GTRb2UizhWoHTU+11lWulPQYBVavu+NKhT7phMWTegHsz/yCvODlVv47gU3G8PTQrVTR FSZA== 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=LBD3CPfNApb2Q7dWT3pAK3aOsKAhfKfS8FiTaOKRTZE=; b=TxVnF4UO9SANCpp0eM7Om2KXlg0NPOq06S+E0fzPgj4zZ9wPo98hmlQP26Qe/4j6Z1 flsQgOeQ5NZEkrUa4bzm9VqcasMejk8rVVl156ndl4ixh/7Jgm5OIf7WmuWuhJCBI6JI A3eqRIjdJiswXDDar4BJFBJ9lJYpTHjDGbjW0ccJfJCF5YcS1hWP4/dmQXLC6mDYaqlU //PHj//wfr/WB4U2QXOVmJmLLKalBtAAb45DSn+2ofV8Gq13h0JTIDOvsUT0a3Rc8TdN c2M6KMIggZciEW5yW+eag+GGHtxphBdL0/2Jz2+4rD34aDBMa8avoPc3GBwTlYFPRcdn DO/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=RCpFwc2V; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KBUtOVWl; 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 b24si8844854qtq.79.2020.08.02.20.11.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:29 -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=RCpFwc2V; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KBUtOVWl; 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=LBD3CPfNApb2Q7dWT3pAK3aOsKAhfKfS8FiTaOKRTZE=; b=RCpFwc2Vcj6/01LFnJM9uwkbA qxb1rP1Hr1KVSTEDCzPB7jKrSGMA9WmvTvmIisaq6xGj2QV7TdU/SkDBFWBjo1AcaKZ59ilynlN/l tT/ZPWLKYXO/q4z6tPseHfu+sRKpMRwvIrvXeKQn7qRAqj7vnYZT9Yu7A+R1gYaXQeSpXIwvojkP/ bcEe4/kDpEV5xcmJmPH+ZcwJLoDr3lHFlq+A3/rJ6bfH8U2rIXd+LJJdl9JsXFT2zFzyKeJPevw3P 5plePYGwTIHazAMFO0p/YBIAPE4nKy26G561DFN5ZUWN+BnA8td4skMTOF2yUItLzeKSl8OfZjFa3 0fp/Cr+7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Qsn-0002nT-Q3; Mon, 03 Aug 2020 03:11:25 +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 1k2Qsj-0002jQ-Fp for wcn36xx@lists.infradead.org; Mon, 03 Aug 2020 03:11:22 +0000 Received: by mail-wm1-x341.google.com with SMTP id 184so14106830wmb.0 for ; Sun, 02 Aug 2020 20:11:21 -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=3Gog2znRpiQy6wPYsGUf9FYxk4e4/BYWwYaxty3ALVY=; b=KBUtOVWlteyuIsDzEt/d/MDfs/AKw1OQQlOaJ603BNQ4XExsJ40qfKSDUalWCA8QGH ktKso7OCM/X/NMbglI9KbLOCvObqAF7BEyJ/QvaRcsM0S+EgpxJOq3CCsoXbxOrgjWd0 l6dUtNbQVY44R23UmT53MF18EIWh8AinVH6+01DDSc2XrOl7nUHuK3xi6ie1xNzBpe6A /lc9hnmbDxPc7tpVn0/1BTDS3NaN3gL3+T2UJIxBcHjbtr8XIJIfL9kDOkPAXxJkfn4F d826u9coUlrTs/7IXbYI8Tv4LGc77DX41LaZE+NAMMFXyHkBTUdlzfE2NmkrTtsmANvv OKfA== 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=3Gog2znRpiQy6wPYsGUf9FYxk4e4/BYWwYaxty3ALVY=; b=FT4Fso+43hpUq/+IBhX8bcly7Fmr5oz6klt4qAMemCnwwqAigY5do4UipMu3jgvm1/ 6KSsdihBz1QkIohVTp1uFGboLOclGM6heJDLmQkfOiVvhMFteOnFMuhsBEw+Y9JEYYHY cbQqbrrdqUtS6ziIAocqFYFzJ+wEq1U4WD1+zzP0l0yelfR/YQz6iL15zc02SY50ndJd 2JwmKJFE7VlkOV5O0eJbTWXOWJTlCPUtUj7MiDXl2f4A8E76697YI8Pu6+motgWwaTT8 USFVPlSlADCCWQOhXF38Q9uRBA8fga3zuj9nxeZV25ywtA09uAiMKyvSA0WehYXec5gr YXdA== X-Gm-Message-State: AOAM530a0X6T/+ZXXmRRndOiLxdlVbuzUvRmV33CZ/f9UJQurzzJYJ/e cXl5SEmkTa4Q1ecoQcJGfXK/SA== X-Received: by 2002:a05:600c:2904:: with SMTP id i4mr13255240wmd.126.1596424280597; Sun, 02 Aug 2020 20:11:20 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:20 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Subject: [PATCH 32/36] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Mon, 3 Aug 2020 04:11:28 +0100 Message-Id: <20200803031132.1427063-33-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_231121_614446_0729E4E0 X-CRM114-Status: GOOD ( 12.66 ) 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_VALID Message has at least one valid DKIM or DK signature 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 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: wcn36xx@lists.infradead.org, shawn.guo@linaro.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit encodes the 802.11ac PHY mode for a given channel in the upper bits of the hw_value field. This allows for a neat read-out and application of the relevant PHY setting. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 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/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 6a85bb699d10..c96ae33a80d5 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -39,10 +39,10 @@ MODULE_PARM_DESC(debug_mask, "Debugging mask"); .max_power = 25, \ } -#define CHAN5G(_freq, _idx) { \ +#define CHAN5G(_freq, _idx, _phy_val) { \ .band = NL80211_BAND_5GHZ, \ .center_freq = (_freq), \ - .hw_value = (_idx), \ + .hw_value = (_phy_val) << HW_VALUE_PHY_SHIFT | HW_VALUE_CHANNEL(_idx), \ .max_power = 25, \ } @@ -67,29 +67,29 @@ static struct ieee80211_channel wcn_2ghz_channels[] = { }; static struct ieee80211_channel wcn_5ghz_channels[] = { - CHAN5G(5180, 36), - CHAN5G(5200, 40), - CHAN5G(5220, 44), - CHAN5G(5240, 48), - CHAN5G(5260, 52), - CHAN5G(5280, 56), - CHAN5G(5300, 60), - CHAN5G(5320, 64), - CHAN5G(5500, 100), - CHAN5G(5520, 104), - CHAN5G(5540, 108), - CHAN5G(5560, 112), - CHAN5G(5580, 116), - CHAN5G(5600, 120), - CHAN5G(5620, 124), - CHAN5G(5640, 128), - CHAN5G(5660, 132), - CHAN5G(5700, 140), - CHAN5G(5745, 149), - CHAN5G(5765, 153), - CHAN5G(5785, 157), - CHAN5G(5805, 161), - CHAN5G(5825, 165) + CHAN5G(5180, 36, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5200, 40, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5220, 44, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5240, 48, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5260, 52, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5280, 56, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5300, 60, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5320, 64, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5500, 100, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5520, 104, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5540, 108, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5560, 112, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5580, 116, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5600, 120, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5620, 124, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5640, 128, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5660, 132, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5700, 140, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5745, 149, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5765, 153, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5785, 157, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5805, 161, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5825, 165, 0) }; #define RATE(_bitrate, _hw_rate, _flags) { \