From patchwork Tue Sep 8 18:25:13 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: 249335 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791870ilg; Tue, 8 Sep 2020 11:24:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwylfbbXFHRlKmReHNDSd099mUsQ/WL8KTXl8NFeHJpIZZU7ISGTlI9RQoQAhmOcyC3JQl X-Received: by 2002:a05:6e02:66f:: with SMTP id l15mr50428ilt.234.1599589478862; Tue, 08 Sep 2020 11:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589478; cv=none; d=google.com; s=arc-20160816; b=M1aFLZIoTWqN+kmRMA0pW7GdmncB1yMCsnMhILmQjB0sIrjxIW7EjrtLGrCsvlSvxK 0l/eXjntEOO/rutxUlAE9EoMhTzV5BTkv5Sm75WlX2/7P+pdRK0hEMAipXhazZeyQIPc OaPztb0iwvgL1RJNZuCuhYUmb6Caiymd3ij/zjenjg6DYqhUidV2HkVyMa9Go8NeEaju +T67sPEir6hw8c6QZ4QZQc9CZFOD7i2cJ92F+Nm19eg+guP/FOLVqp0j3P5ZFHiiSqVb KzDziX3FMjqusgOBFkTOT578+K9uL8VLvnpMzjzLqMgY8iqbR6Z8iZyoGZOmSO8qQujT 4ojA== 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=7RFJrqp0m0HBg/5Ihod6aOPb+Foa/JoostYtuwJ69/U=; b=PEnVilMe9+09xWUphElFG25HKSYC2Cq5sxrRq/3cgf3Z2dJCtusqxpzl44ECRHFXXr zHLz5YNKw2VqarGwcqhdIniDgRZIRkL0SOyh67H4xdJRkNd/rx0dVG++dpC28pnjVhvR HZPDcrW/VOJgC5+rIMk7OHc/SnNxdoZW/Ov0noI5tm/D0Cv5Te83axHC7neAXtSQgnLp kytvxXaa0HvekZ//OJYp5SKFIL1ATKW9crtWP1sSR7CaTCZWXnC7hiip10ozGDGt98wE TUACcOtrExfSVpH7au1qvkdXCV+31fd+n0psVRBwVKIOYFaCrU0u/GYAAGTmJng+t3ll EbqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=IHZtoy6n; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="eM/nGswS"; 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 z2si14291946jaq.6.2020.09.08.11.24.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:38 -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=IHZtoy6n; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="eM/nGswS"; 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=7RFJrqp0m0HBg/5Ihod6aOPb+Foa/JoostYtuwJ69/U=; b=IHZtoy6nPyzcc39cS0d7fUDce FY7E/SdXv2NWVqCfpvW43CEFliiafalUI2wm1O0psEx/qRsNcJMgi2DVooYFkW8fxmyoajI6oj8Jr tj/gT111MGTdtzdMAf0QTWyZ+4O3gXNRcEAaCzPFJlqJxMBDBsyc0nKi3A0C+eXGLITqdUHMn90Iw v727XEW2Zuh3E4w5/2Y27yNlYtwmc/1t29otNByKjQv0mfx2+D7tHBTW4Cvt2wN0SecftnzuSAtGX Xi4sjW57WmoXECOcKEPqTVSD6htxc08UvL7VvpSznn4VrVIhJKcmFq/3oSSjGLWMcGw41uiiCd8pp 2iuo5E8Tw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIF-0005Ky-Ie; Tue, 08 Sep 2020 18:24:35 +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 1kFiID-0005JD-CG for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:34 +0000 Received: by mail-wm1-x343.google.com with SMTP id z9so313055wmk.1 for ; Tue, 08 Sep 2020 11:24:33 -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=mrTOqER7Ro+hee8gyXLo9S/3xLKcWq5aNxrYU4kgAEA=; b=eM/nGswSaJQtep9usH63Ja+wpPAhQ+zIKb8VCATdPqi3jbLtCrM2NZ3edq6PtLr1c2 UF7u+82n5N6B8CZjewP5FnNRH5gUVjrpuRRPrMyH7Fg2gfyJqMS8nVlUM/Y9zx1U2KxJ W15bk5wPavz5Vru0hyJyrqPYnj5Zchc2mVbtBSP3SCZtusYkNdxxaDK46Stl1gTwBolC OAskN1Jd8VayZnqzYdUAld5tHQSFu7258BkR7jPjonlfk/XxX3edXeboToXN1V5cn5n5 MV2rTOBnJztCJg6MxQlyqSfcAIwKTxSH9zDdAVU1N1TuxEWnOilolxPMp/3TvYJritXL ye5Q== 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=mrTOqER7Ro+hee8gyXLo9S/3xLKcWq5aNxrYU4kgAEA=; b=bP4c29Vk9P8f+/2zy6i335WP+sNDgIIa37t5KpiFrezM5BQZgln8l2nZzCibkvZlMm hHFrcnwoXa9ORl/v4R8RYOh6j+NrBOBY3kqDT3sqtZ9g0R1qiDmYvoRIVv1KPs1GVpaR hN28pkSfOrJa24UDzB3aZBjNlizIdGYYivuGSknTMFLd+N6D1miXvlDU9DoKbLPxIAA6 nd+dN+ISPAztUVoAuVc/3FDkODYv/7hyavJS32t02P0qx+bK8dhL7tc1YzZO32V/MwA5 t93vjiGZkxFO532HjGTMpKR3TD0Xqe4LSAwgoqbHiLiIS/Rg53dWiFLWE6+IYwt92Imk oIqw== X-Gm-Message-State: AOAM531GdpV8y+2elR09THuS9kCSazMGfLyrzj+L6xb9TSAkoZKMD4sD vEEysFJeS0HsAwXDf0Kv7/y3uw== X-Received: by 2002:a05:600c:2155:: with SMTP id v21mr422856wml.118.1599589472460; Tue, 08 Sep 2020 11:24:32 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:31 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Tue, 8 Sep 2020 19:25:13 +0100 Message-Id: <20200908182514.2870410-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.org> References: <20200908182514.2870410-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_142433_418650_210577B5 X-CRM114-Status: GOOD ( 13.00 ) 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 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 ba37439352a7..2c2b6178c8cd 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) { \