From patchwork Wed Sep 9 15:36:59 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: 249491 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524457ilg; Wed, 9 Sep 2020 08:36:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6J3UmgimkMGM6Y8V8Ta9z0tIePgraVnML9eBAIySgmsHnfALhvFPCX1J1gI9EV2+fjVyV X-Received: by 2002:a5e:8d04:: with SMTP id m4mr3672865ioj.107.1599665782713; Wed, 09 Sep 2020 08:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665782; cv=none; d=google.com; s=arc-20160816; b=P2E7pbg6z0I9x5EGKDpMZzCIbprVYDRwVmxlS71otf+GHL84KHcmK/CzyTOkAMnSs6 EaB+ZscSMeu1yfyOphCJxcj39N9n//1IYx8q07RDiSHwPN+4Hn1htsMLQpv0wyIALI9u r7xd/0yFejmwJjXqUs/MM2mBNfbyhhbDkmEqKD6jPC/FbDQBUcZq4hx5CckUQ0hq/JjB +5SYX9a4AyUP2WmtR/xFfPhgnI29HxCd8NppaMXnceK1osZYMAGNjgmu8i25OnTFDHNi 0PpLGJ+FHzrBQ+xglInMAJYNbfsohC65TcTYJai4FAOmwDm81Av5YukWc8EWn1xTrp6b clpA== 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=mZ+9Z5IM62SRNNDsj/7kgbbI+wzN+HdVOimUOJSajSQ=; b=xWtZ6qwi4P/S4Nn5jI5xk99NLeGaZSbf2u0ywoZ/meNMt62wX886nA/tJv9lt8STe+ JgVyTi0My507Ab5te00Kjy/q7HW6zRySbMwn+yjtiUNh+rtpBTIoDZe7EFk3z1e326ka LSH+tFOj2jaWLi9CgbxwORf9VMcmBHKd3dONVbCmgk9DS7Zp2UjXPiTIZbNTkTM0opw3 ZLiLF+iIeZEZQxXrYpwSLXATeDUCGGLBH8TD14ir1pry5jetxVZ3J0SzRhezuTO4Ybyb iMEUyRbyrWmP21/8BpHOWMNAl8eODbENbnDPWc/ej3d89Lu8/tJov+rk1lonZC/gBuF+ Vu4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=PQnzyz3e; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Y2/PyBWd"; 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 o1si2648076ilc.17.2020.09.09.08.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:22 -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=PQnzyz3e; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Y2/PyBWd"; 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=mZ+9Z5IM62SRNNDsj/7kgbbI+wzN+HdVOimUOJSajSQ=; b=PQnzyz3eKOSAb3Me8TTyigjoF 2MCtfQ9TJ3btNKUDz45jl/ve+IN+PseuwDGC1IK/rWlORtsBJbvS38Xk12KLZHEa+qkKHORoe2kMM ZhiACK/2royUz3AXfuMzn4NuwS5DKqvVA5EbZDQKnuIJlYTkZwY/YhTxyz83yMxcj1COUvSYMz66H Dxek7TwgtZG2YiPYBkUCbkuEHro0xPl9ubByvrdKNNQmIOzUv1PHgVMrw4SOaMeOKyX/eW+rTGuEU 9WbPpxVF5PGquzUc82WFto1rj8T/kxuFYoL9zNgfs0MGlFZMSSW0i9tUDPYOo8kIM2iUibz4xZxRG 7ew7iQ+Dw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28x-0006ci-29; Wed, 09 Sep 2020 15:36:19 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28u-0006bH-5y for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:17 +0000 Received: by mail-wr1-x442.google.com with SMTP id o5so3411738wrn.13 for ; Wed, 09 Sep 2020 08:36:16 -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=mNr+Pfqwu/0aRFo1Po43D8D7g7/h15rV4ULpD0JgPO4=; b=Y2/PyBWdxg1P1jEbkeXKlpmoigQdCKRo87k2Le3pRYeEoxfnA4NvrUfQnpkcmkSMJ9 SgRep61lw1lGaYH/GbF+9b41ELuBMcS8XeftkoU8zvRnWIKmIKA4Pb0j3RSQdUx1SZKn 5uSzSIdhrKdwIU6aWO4extuXuHSkLpCBdYNmjVvP8OCqYYTOJL0d4Hsj6eu4fDYts4dU TeTLwLskJ6tz+iN72GL2kpUoZicGvsO1kZtP+ffojLjVCZqos1JHGAYgBMPijYbJle8C zi1BOM6+rJXuBPEU21VFEp3v+/q7OzomQwjBzUh0DxCUxnSgbWZmlWvj9v7FJdbpyAiw 5h6Q== 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=mNr+Pfqwu/0aRFo1Po43D8D7g7/h15rV4ULpD0JgPO4=; b=ZU8jv4CkNlrFVtNmIs2wDo8/MroDdasxCk+dQ33xkj6aMPfG0nDKtDZnMi1nkGraEZ h4A6tJg0RQV+Ayjze8i69CkdU0sUoa8PS+vX6i9HW5nVYVRBtOskFfU8Hr3AXvVuWeFZ 5p+doTTEc4/bNTvPi7gu9bJJGQ+yvznbxAaN8oj+rF1ffVS26nY61V7BYpOEhGlFW4Ps FOdQNgaikouW+SUC1VaGVFPIfLPrJySi9MwutoeWC5GX+y/mPF5AjrvATGpeg+CJecQe iunaEYTazs2shrtKWXc7KDB4o5nT3li/dJJVEB8YaPLPxh5/chzWRP9vZEzLkSLuEm/8 97Zw== X-Gm-Message-State: AOAM530EiUKSuI2Bwx3sjfKk9n28KvxAvgM1oP9P596NOMJKmvZ7manC sMAYuuXa9rdS4KNcJ/W5vD6otw== X-Received: by 2002:adf:e4c5:: with SMTP id v5mr4282315wrm.320.1599665775342; Wed, 09 Sep 2020 08:36:15 -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 v204sm4619807wmg.20.2020.09.09.08.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:14 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Wed, 9 Sep 2020 16:36:59 +0100 Message-Id: <20200909153700.2904977-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153700.2904977-1-bryan.odonoghue@linaro.org> References: <20200909153700.2904977-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-20200909_113616_616518_93F341CF X-CRM114-Status: GOOD ( 12.71 ) 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:442 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 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 ab6685dc956b..36cfa7043bc3 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) { \