From patchwork Sat Aug 29 03:39:43 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: 248695 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602843ilg; Fri, 28 Aug 2020 20:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA9XMoue4BLnmN9CvjtX4N7yTdAx50byyS+sLdiETlax7UA0melemzrSgtNi9Bxc02xyT+ X-Received: by 2002:a5d:9947:: with SMTP id v7mr1415594ios.203.1598672348920; Fri, 28 Aug 2020 20:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672348; cv=none; d=google.com; s=arc-20160816; b=uGBBXfMQKU6BYxyIzPWtWvlDFHscf27b7czTwVTdebX3LWAh+VTtYz5Lghk6tMo+ly 2rqovNe39k0UXl2M2vu8ktuM0orjsOmyH81T7eJsg0tm5MNXARuDtBdlSdQoCF0nBncb W7sKva5h94uK+0dj8HJx9meQ6xTCcLzwZRWNFYIgwL4i4JP8S9fIvcX0S2oY74ZdsK+X QPINWDw8YLWalbJt9InJJbphsiJFnm23oPP/5OMdXkVR4qJjdSnMQ0DA3Uja/fwGaFlN 3+n3vijv4Pehx/WvfKoM6yq43fGwrrPmo154F1ygAOl7v8RxlzCOKD/dB3aVwq3RDTmp vksA== 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=flXNHQYuvE/kP9x2ix+60tIaj+7wI5SXY3ip5wDBkGM=; b=iQOoOzLYaWwqYgCi+rUIj7viH+J9bFttbBYzyT1QVXNqI0dT2QgFZKpHyXGNtSxnAi OKEqWWpugLzVH6V8CZDcj90ioEsd0WQ7jWPk1cqrf6WMOgIAVtFI0zt5JAg3MO0QjWVx qqbHSBtzd70pZ+jDb9cYHCFXq/YnYLizi1y0aAgh/FkAY6Q4Qn7v3A5PT6sJWz4PKGku QK0ZnPYmlVVeElJRGQuBwxaaCBoyW9+AxOXzQk8l+U0aJ+db8XIULFJ5rVt3VV4NCHlE BjyKCJl7V3rtIBuGyNupLHpYPmJPx3M4NrDlqBv+j3vLXQvSDHDa2d0AXeYdK1tUIenM lV8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=iVVLNdT3; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Gqy8FQEz; 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 u17si1098402ilm.96.2020.08.28.20.39.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:08 -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=iVVLNdT3; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Gqy8FQEz; 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=flXNHQYuvE/kP9x2ix+60tIaj+7wI5SXY3ip5wDBkGM=; b=iVVLNdT3PDkyqDRS7ZOSgmCZL wplZcCffbbpuUWrIpuWwSKPGXdaK9SzH7aeFsS1g6heDOzs3J004PeCsg83r79Ac3Ypj9zwoMuQGa AH+i88AKXPDed0UYWuUUn4bTeVhwKI/inQB0dOpzpYZAuj4AZJO10HJt0fog+ROyfw768udz/prpK cPLgdnd/vanSZRLRyRvd1lDTdpCwkJSZ+cgyxElPyAaST5IiIfA/Wm7XfXidYmR0jhgllxqZh5WVN dERsn4Yn6JeZWurjmec18M6Zfm7r2RXNPAzLfHGaDm+h0rHVTu/gtmobo36Oos6r9vMMBp/UyP+1+ XnETIFGsw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhp-0002an-Ln; Sat, 29 Aug 2020 03:39:05 +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 1kBrhm-0002Z8-RI for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:03 +0000 Received: by mail-wm1-x341.google.com with SMTP id t14so844593wmi.3 for ; Fri, 28 Aug 2020 20:39:02 -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=yBk3qb6esZU21s8yt3ET2KrYd742m2TmS8YznjO4lK8=; b=Gqy8FQEzfLCKK3RYqITztwv3hYVU9XwW6KBNpURG362FGIVMqWZjtVMA3tJp792u4l UVPXhhdPT1l8u9u2RvZGx6AOpU1846V9WQAMMPM/aFJfzLQDdBk/wwBYXQxMQFGgYGG2 MB8MnAEKdTlRFaPO29I14g7egmuRZKuAd/pjqJBD3xDnQkCiXJV4o+qWHv45fSoIaQMf PikAq3NwczwXu3g94C1nInAJBSbOMfvM8DFnor6CzQSjWtQRgWy8O+usIjgpVv/vy03t hRsTX8UirQQiQXnNnfr+1FsL/6h2RqDV8pCkM6PPLM4mBrjd5BqMiLM1Ee2FqgOAd36J MlQQ== 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=yBk3qb6esZU21s8yt3ET2KrYd742m2TmS8YznjO4lK8=; b=RaThtFA1qBs6t5r8m0CtxjN/1jHuR8bwA+crCKR0hlWuwp9kV1eHrXAB0uLmG3ibv/ xgjsF+toMxT3FrYIesOHMUfjKw0dCRA/YzTLEOLpOHCEqLsmKEeYXY09HZO1dFPRqrAB DXcqPZAqDsC1GY3QgPvVqnWDuAMgOqsW8WG1M0ndbgWrl5YeFbsf22yMCEiwFrp6O53g GWMabk9OmJW3HrtfQU3Ibu/N7M+MKhlqOzr95FV6JHTqfH588hQKpJMBiX+99eRTegc/ HBdkjqXXll0kKmPXpzDMNShIO8//UL9UZPM2bvvZmXIjjpuOtrxJ/1t3Z7ic7WEKdJMa sGmw== X-Gm-Message-State: AOAM530yQ/DVGsWG3fSikQ/bdj5R5y4rQmHT5FLI9Qm+4hXskHA7qQMd eaU/srLPQo/3a+gBqYt0cTt7tg== X-Received: by 2002:a1c:544f:: with SMTP id p15mr1511069wmi.147.1598672342068; Fri, 28 Aug 2020 20:39:02 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:01 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Sat, 29 Aug 2020 04:39:43 +0100 Message-Id: <20200829033947.2167817-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org> References: <20200829033947.2167817-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-20200828_233902_907293_4D3BFFE4 X-CRM114-Status: GOOD ( 12.51 ) 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_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 Adds HW_VALUE_CHANNEL(hw_value) an access macro that will be used to extract the channel number from struct ieee80211_channel->hw_value in preparation for also storing PHY settings for 802.11ac in the upper bits of hw_value. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 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/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 2da81d9926c4..ebce1ed7adf7 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,7 +83,9 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; -#define WCN36XX_HW_CHANNEL(__wcn) (__wcn->hw->conf.chandef.chan->hw_value) +#define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) +#define WCN36XX_HW_CHANNEL(__wcn)\ + HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) #define WCN36XX_BAND(__wcn) (__wcn->hw->conf.chandef.chan->band) #define WCN36XX_CENTER_FREQ(__wcn) (__wcn->hw->conf.chandef.chan->center_freq) #define WCN36XX_LISTEN_INTERVAL(__wcn) (__wcn->hw->conf.listen_interval) From patchwork Sat Aug 29 03:39:44 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: 248696 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602847ilg; Fri, 28 Aug 2020 20:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN01Ot66gg0aPy4RAj/UARcGuUNoZTN1XaPIFOS6oqcJCPKK9K28N25ldjj4Y/7YRSUmKM X-Received: by 2002:a02:a592:: with SMTP id b18mr3873265jam.44.1598672349156; Fri, 28 Aug 2020 20:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672349; cv=none; d=google.com; s=arc-20160816; b=BVYiWxi7o93SzBvTfnb6PuH+TFCynhkFA5NBgm/3OtChgUqoY4bPSaipYiHyQAimA0 dr6aCuYkLjk+InjJCDGTnpkEZ8BSvzHmFhwjeYLILZDbGlzXEfOF+xla0XHxGavsIktO etckKuXRBS833CJsdrNs9nr9IqKr9CbXgyG6R6ZkDTgkotKkYicHW+6Mh2NeoRpwIQXe nrVzRzqD7ueDWMoB7OiEupCvqZJnOEs4zM03+Hj4edzjqtpGRUWVtNs3uwHbeNhL0EQJ ZvmEh52N6kEq9J8EF/wsKOPmKMuV/LPyHE6vLYAwE6Q5086wRDE+/NY2DVCD+lIwjz9/ W0xA== 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=Y+NLUL05Z3j4w7pkr7OxzlemSWpSe8T3qgkIWkJB1jQ=; b=0Y8OZFD+458Bofm3HLk34w7+sopesggV6Lgo/n8cd4uxz0tSQm5UGZXKBcL4fviEq3 AD17eBEoYfWhxQr4LvB6QOk1Kr+4InzoBoLbQFt1dKa04smnLqwiY6bCn5HEIKDgA46H K42tcEigXK+GHy5DVp7YE6EXogWwF7UOBAhlR/s3wD3RspyA9w6zPGuQ8+MEzEwW1Gw6 OT6x8gZYeTAWSwu4JrtEcmFPCGHyfh42DJfraPzKA+DBl6Zs5O8T3LbrNUtsZz0O9S6p MGofgBfwarOco4A7qIVqp+OLruMpPc0uqunB6EfPRYxAanlaITPPidF3qXgHnwAMnMLW xeIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="AABkg/g/"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Y790U8AJ; 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 k1si1158225ili.40.2020.08.28.20.39.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:09 -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="AABkg/g/"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Y790U8AJ; 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=Y+NLUL05Z3j4w7pkr7OxzlemSWpSe8T3qgkIWkJB1jQ=; b=AABkg/g/49Lq/dm9e6gTTS8Ys S2Z9+DbIqhZvlQ7V37qa8if7WOXDnzyGN/bMF7RpBpTHkDQprZh6bZusnXPjZskDfjsj7fJldnhZ/ Empwarr2DOBKm3MWMFctyt4Bd/AkMYnf2UM0xh7kE8wc7KRf6djBPrJvuLqnvgHNI903NpgQHjwjZ nmf+qo0CIaHKeXZmxhCr1dxekZT7EURH+pcfI+GsJPJ0F8gU3M3Q0JaeqauViJQQExdVyZgWFPJ8A dB6xy216wvniIwoTXNOfmD+XtAP2THHN3s3vkDHXIp/bjtJ9/MSn5QlxWhjExxcBvcfOkJKGbOCO9 RCSI3fyAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhq-0002bM-8W; Sat, 29 Aug 2020 03:39:06 +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 1kBrhn-0002Zf-TA for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:04 +0000 Received: by mail-wr1-x442.google.com with SMTP id x7so891219wro.3 for ; Fri, 28 Aug 2020 20:39:03 -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=HF7pNf4fbKb1C6oMKd3EGPiCGGRyRUf2Kb2rIRMMGWI=; b=Y790U8AJA1GGX4VlxN9KQIZb/aM7dCIaSPkklN6wdO4pQ1G3P826sz5DnkiFt9dVrp VVTdjpmXpv5x3Rp/w2K+NDQTPAdgF6TRJkYZb7J4m1a5+JgCuOMMdIA+z4R2qnKKJHF7 59GVSR0YNDBDopQ+Jfvi34azbTU2OpWnziRT8+bda1MqPBqnwSGUT8GLUuHgfTCvf+ql yM7+NRW1d8PcwE1DyGyOZX5RPf569A4uSbecGBve43TX5YtQ+Zz2XUsE3iXu76HxnNZN Pr/4lwakm3jKO173h1CAF2v83JsX+KWsbaJrXTUYVZiA7/tdDHX9EFUqs3vXGEcE0CxK 1lgQ== 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=HF7pNf4fbKb1C6oMKd3EGPiCGGRyRUf2Kb2rIRMMGWI=; b=gaE7NFGNxQvSdVtbh2JiiAb1jro9BjPOb/rF9Dd6rVlEkyckOX/FJQX9QRYyRE9J4D QyZ49u1QlMm/tcc5tcE0RX16VkcbquKYyoWp8WuoBo//oZX3Il9vM0laxDyu7W9prEZi 7GXVYpsXwzSfBVETimSw2q39hI6b8YvjvlDLjtRIXmzIH5ksgkoaOZXrPCwGDvxWx9W1 glUT7jl0JbT+9fgsVsEpkZ2UWONbWGrInK/HqLitIW8MARoswhDs3UqR7oufWc9237zC Aw5jwt76zSy0RbpUeSMRt/os6HxXDgj1EFYURfsQz93+Ms5PH62Zuk/NInmC2UEZIof6 xsQw== X-Gm-Message-State: AOAM532d8X6l/Z8+ohhczYO4w9WMm3caqS4yyL2qj/cBd8zeT4gSnkwH CGGtexH3g4YD87j6ek17nhiw3g== X-Received: by 2002:a5d:60c2:: with SMTP id x2mr1809740wrt.73.1598672343041; Fri, 28 Aug 2020 20:39:03 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:02 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Date: Sat, 29 Aug 2020 04:39:44 +0100 Message-Id: <20200829033947.2167817-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org> References: <20200829033947.2167817-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-20200828_233903_946693_B901FCCB X-CRM114-Status: GOOD ( 12.89 ) 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_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 Uses HW_VALUE_CHANNEL() to extract the channel number from a struct ieee80211_channel->hw_value. Once done we can use the upper bits of the hw_value to encode PHY related data. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 2c58f7050836..729708d96586 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -764,8 +764,10 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif, msg_body->num_channel = min_t(u8, req->n_channels, sizeof(msg_body->channels)); - for (i = 0; i < msg_body->num_channel; i++) - msg_body->channels[i] = req->channels[i]->hw_value; + for (i = 0; i < msg_body->num_channel; i++) { + msg_body->channels[i] = + HW_VALUE_CHANNEL(req->channels[i]->hw_value); + } msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN; From patchwork Sat Aug 29 03:39:45 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: 248697 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602863ilg; Fri, 28 Aug 2020 20:39:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQEPsiUuhH5S1Erqx2D2cYYMdacbu3rEQaVNSRzlJE411lb4W7Rr1LWsSCB5Jz1JGd1OZa X-Received: by 2002:a05:6638:1690:: with SMTP id f16mr3914275jat.91.1598672350843; Fri, 28 Aug 2020 20:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672350; cv=none; d=google.com; s=arc-20160816; b=Ipt5KXJiuisXH/i2jL2/2yUfngS7GVt/GUhj5Ut26wkV8RJVIQY/8w9/andIz2chDa qllCpXxKXQFjJr71CG/agzPkxsyK9ou2ddUVlm98mieNJmOwgvNbMSH26W/ufNQENPZp xjUYvd5OcneXlcUzXMfj1zuRxgEafdphBgssYnSHHOh5JnPa/Zsi5bsfRQRkALy7W7Uj JjEBiOhsLdi3YpugjlGT76n+f5NCMgyOrMWdVrJURgfu0QqXIlRYC5mSgEHqfLSr1CWa EkxLVNB2+vvLcAFWtl+qRbX9RAVD0pxFDTQZW1CMBKOcg7zYmJQ7eVuYy45PwrVIe0RY Pt9g== 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=24BKZVtj12JRlleNm6PPRQzhJdaLhvOx7jvBAIsYZMo=; b=qn2Hg0+MKFc9t5BGW4JruKaTSvGgNlrHt9ysxTyKOqXGMoF83xGPVClLNzMU6CKNrP E5y2hPSsQth2OmgJ4869zlyC6rXCiJTJkFZaFWSKQQxewUjoQj0FhnNcxl53IwZqvDhw 6rfOaCDCrP8shsuCuyFLQPAX/E9ks+aDO2LygL0QwclMabdGJlsXnuZ60VAOIOUvNDiz Tl0IXwGE+DahRCBrddGG1vDMW4PNVMVXOG8x1JEhO+nKtFcrIRD+eNLAX6T4Qf+QyR3T LxKEST2eeSVNAWHX/r32jyqvLSF5Gfa8h3YLJGEHmd8/zSv1Q5gDW+VoU9X2E9OPqKfT 7KBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=GeLcxFck; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Okw/bFl+"; 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 t18si753492iob.42.2020.08.28.20.39.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:10 -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=GeLcxFck; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Okw/bFl+"; 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=24BKZVtj12JRlleNm6PPRQzhJdaLhvOx7jvBAIsYZMo=; b=GeLcxFck+xwypVZkQM8JKE351 M4a4ZBbsOIv+UYzl/x2nqrFhtFa2p4q0FpfD3ZiBsF2yrrJ15Zvxotzvk0gyeAWP5zAfJCfOyUP3A ZK7At2Dvi/cKjQKwB+pDPa267sciw8f6J9uGpdCS4PQxwkSV6mssam75PMRqg2+etZRr/y4Rk0GQp 2fPQehh06bmNv1Vs4ePp9h7MUlh2oaKdSx2yH7vl+TfWydPVlLhzhDUfC7LPRFRgIDNoztEiIM/+b pcR0SsH/9pxICCiVtkddpxLY/kjcWB97HJNrC8tyxZX4YwqZF/2cA9oBuZpCwPHAxsgc8V2B9yHcr 0TbjE+1/Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhr-0002cE-PA; Sat, 29 Aug 2020 03:39:07 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrho-0002aB-UA for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:05 +0000 Received: by mail-wr1-x444.google.com with SMTP id w13so878696wrk.5 for ; Fri, 28 Aug 2020 20:39:04 -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=gyyyc+eVVPBc5oNmWeDufnX8Vdj7EzlctFSImbJVqV4=; b=Okw/bFl+1QURlf+DlpmTVa0gvxD/RbzvJ429LMzioPWrxukuqEZ+O7njYJhTMnGMhV 9wcB0ylpd69wM/+mKeIygft35AOcbZf5fPCqGtXFz2QDkmiw7JGcYoaPQBFDG8P0lEwJ PXzbaYgJApaUqhsxaSS1SrhxUA4cBVA9Y+81YBrceI8r7wPhkD+2EW2wf83oknGHAdr2 dSDf6ZJyHsZFonYTnSE9C5gCozdITixue6FJE9O0cT4PCqgUGI4Sc4HCAW+nBpYLzj+u YVCFgHlhbPKPZmNm5GBfRh+2H8fbg0gz1SNj3BTtw3gh2CunmVxmONTC5tYUhvVSODGv vhFA== 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=gyyyc+eVVPBc5oNmWeDufnX8Vdj7EzlctFSImbJVqV4=; b=qduw87yJrJAjcXxQeYuNVPLmp5U9Ins2Fw/7xVBku/muoAFjt2ntjk24ZARoPlw4DH 14mRxc3HKbnOAUwgM9SmECh2InTiMclZL6BzouGTfTMZKDLn7bHJpS6v6UPlhJz8e/kS 1XWGKcPCAf52hajqTtsW7Db7XULE9ToeJ2XQqY1Jvp4CfxSAEK6S7tMkZgHJzj/jTSAe jU7FaJdBxRfRJRxH+6mGoLVaGHDYUjTY6imSq/TPEBH/3Nik1h7zDu7isx54d/Ey/278 xsXXZQZfVxZh/ASPHzM1/5V7WW2UhAE6EKuo6h2eGp0izCCFTx9oYbDmatkaXQQDJATh Li/g== X-Gm-Message-State: AOAM532f5xgvT9jU+oZG2YrXGoZm1431b7IyrNZROU8YykR5smnH0Ph4 wSsOfxcD1TrmBWlglWbmtlUUyA== X-Received: by 2002:adf:cc8c:: with SMTP id p12mr1150793wrj.92.1598672344017; Fri, 28 Aug 2020 20:39:04 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:03 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 3/5] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Date: Sat, 29 Aug 2020 04:39:45 +0100 Message-Id: <20200829033947.2167817-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org> References: <20200829033947.2167817-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-20200828_233905_017246_D9FB5CB8 X-CRM114-Status: GOOD ( 11.85 ) 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:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 Adds HW_VALUE_PHY(hw_value) an access macro that will be used to extract a hardware specific PHY setting for a given channel. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 ++ 1 file changed, 2 insertions(+) -- 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/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index ebce1ed7adf7..71fa9992b118 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,6 +83,8 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; +#define HW_VALUE_PHY_SHIFT 8 +#define HW_VALUE_PHY(hw_value) ((hw_value) >> HW_VALUE_PHY_SHIFT) #define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) #define WCN36XX_HW_CHANNEL(__wcn)\ HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) From patchwork Sat Aug 29 03:39:46 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: 248698 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602872ilg; Fri, 28 Aug 2020 20:39:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8o2E06GePYexqPcpS76sdSmOJse4TcQUfXntBmaPW3kQGERvDmmXepjcAVEurumc55Rqo X-Received: by 2002:a02:95ab:: with SMTP id b40mr3765792jai.14.1598672351504; Fri, 28 Aug 2020 20:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672351; cv=none; d=google.com; s=arc-20160816; b=uaN0NADBxbwNh5dMHPIkVnc5DmPWVpIsY54obM5af8kS9+qaSxOrfRiz0ePF93GV69 ixr2HHHrZHRt5Rxfqth8M/qSDOoRQuQ3hrkOYc/Sh6aSowkQB+xEuUlJ0RO5yvX/70U+ BmAK5hapaDCDHylwL87NU2iuLLJbnhh5q8USJP4imdXKSKlKWH6Cu/JE8YFNAAaQLgWM VxJj/DHHG0qzzcyge5arkadqNH4C9TGUpzZyuIqBy7gZ1h8lnFJUuACJdmU5drOlXYH+ LhwBrOy3fbd5QiphcrsCZYrKOgTEaEJOdOfA/t++HllMHjE4VjAmzzgB192RbOzUNHYx XmNg== 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=eXTfreOHVpXiZmuJnZzIGrW6KqZOQyk2MDoju+JBr4I=; b=sXmKs6itoDDKCgjN0CrUhPJSsvkom07IJDj1Ejw0UOF9H2pzx2YpxvOJjiitHhRcYS mUkVOpo84v5XMTRuNIz02GfabVOGXOLMYUCFIRUOOx1wN2Nne15D0vt0Ll+rusA2K7qT BKjgPv3Ct7AWih0vudrcfTQeFZ4aw3MrgC0VPwPqpxFOFyA/Bp2XyytzDwgzYFdl7Kpb i3zkLE6luJtOrvjKEdsaXUFVyAmY8KCXtA3AM7MdWv0827ZmssmJ2Bz8xeMVc1eD/PSc NeTcNLFUpHb599qE/Su8dOZFlr0jGfK2t2A6kdPqoivp/fmov2g+nj+aEo8hRMNnLS0O 1PKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=2EIdfIMG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kIVZi9oR; 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 h7si1099981ile.15.2020.08.28.20.39.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:11 -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=2EIdfIMG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kIVZi9oR; 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=eXTfreOHVpXiZmuJnZzIGrW6KqZOQyk2MDoju+JBr4I=; b=2EIdfIMGCwmT8HwvIf0DxbjkQ cPTEpxL4aFC3tUuzLiLgi4HK+AzEIhGdFjtcjQ0K/OPHpSbK6jRPjwACPGD6NOSnz7ICwSJRYNhUp HAl7IyIf4KcYHonS/TeKVDCZ9syr4CZijtP94ELlmOQG+NFVyGjGLhhVvGy9ITERarAjmtITIIJ4A rTpVFHMFv7goCvM5ynzTS6F5M1WNnLVpRg/tS1TzmBhtGtOVNbTSQWQamBiy6b8zUNqqlw9sILGbm O2gaBANYVSoFAFRXp/KTpn6iurrUH9mR4vggYSrNoVGmOlekvw8v+6r6rwvEBWLV0SwmECodtIqFZ UJAPE7GIw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhs-0002cY-5s; Sat, 29 Aug 2020 03:39:08 +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 1kBrhp-0002am-TS for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:06 +0000 Received: by mail-wm1-x343.google.com with SMTP id b79so838289wmb.4 for ; Fri, 28 Aug 2020 20:39:05 -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=yQy8OHTZ0idummaIvQ2bIiI3uqJoP/LErWU5Dq1ghsQ=; b=kIVZi9oRTiO/jlsjnSJGa1Ewk4JNmh/k5+zIOdrkGi3h63VS8T96KLGBVem9EiZLkq qSB64lE+d3sZYzeoq2i2wtvjyvcte3Q9eivrrjq6tleyUEAXz2lABbFP5sUtnr7NYDQK m0bwUPaJjMsrRKEb55+V4NF5lR6SAHFmoW5pnHwCUvjDxsOztZjxzVJ5qwfbK+IGNObi oKTXwRDG71Chq5hB6l8cAFJcDwqsRfzRxygRBgm5CcDfP4fXKs+ivin8Yjq0sYJiQdcb jo4hmhy4Onw7MRkDZ3hMUsLaXkujQczF6LgW7foTK+q7zlUMvM9lQt+VGAKUoBCUozaV vT6Q== 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=yQy8OHTZ0idummaIvQ2bIiI3uqJoP/LErWU5Dq1ghsQ=; b=Oaj5iys3CvQ5T9POS5qISdEkEkh+fE7quchf+pLXkhOQeRfTgpik5wCgtm89NwQwct UfzVuib/4RAi02LT79U8CVsDu+PhKxgP+ls+989OpguRdVLvJYW+G2cCysgSkwCE7JeA jINsAmjYhHEv17gXAZYSjJoCaFXWxeWFA2oZa1aKEESNNntEeuWZ9kG/5qPey2KeD8MS txFmAbDqdbY+hwDHoUGHRZUAd04rPZaVPX54e/Gl+k36c9kllDJtFezlAIXeqq7X9eJR EMy2dDtT50W2xmNoDdbEVYa/167F9Qy1R/6KdHWZyJQbvjrporqUXnkuHNeo9dAWOlNT jVRQ== X-Gm-Message-State: AOAM533mzl2B4YfVc4XTMlyk8RUqal5W+RiLaW5zc895LXpz+mF/h/a2 jOQ4oixyZX9ijHnZQK0ai1ugPA== X-Received: by 2002:a7b:c399:: with SMTP id s25mr1548265wmj.13.1598672344983; Fri, 28 Aug 2020 20:39:04 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:04 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Sat, 29 Aug 2020 04:39:46 +0100 Message-Id: <20200829033947.2167817-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org> References: <20200829033947.2167817-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-20200828_233906_043662_4975B13F X-CRM114-Status: GOOD ( 13.34 ) 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_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 e92907a33443..9e97513feeb5 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) { \ From patchwork Sat Aug 29 03:39:47 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: 248705 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602870ilg; Fri, 28 Aug 2020 20:39:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT8XwlBcZ2VqEPIrzbjE4QaGbhWvEdqyk1men1oVMvsN7SLHhepsetpEEZwEAwH+xDzXgv X-Received: by 2002:a02:a592:: with SMTP id b18mr3873333jam.44.1598672351439; Fri, 28 Aug 2020 20:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672351; cv=none; d=google.com; s=arc-20160816; b=eSkTslQM+Vjf2ALRrHcYeRhrvLmm5A2DEAxYL/Wc6TvFEoOH/DOdv1jDlsC6VNz6Uy U17vBOAzY+CVZtse3NrTrcuRWl3Ona0Y0yjMJziWJXnMdL79pzFUf2UlbZPx6+W/OFjr L2kaWB+RZX1KWixf9f6T189yjpoCuKzUB5Yib5G5Vda5fLj6Re1Y9u0mcFPf4QeJOBgV l0dmg8rg0SxsInMn9NqmJmVh0Jsbvhh/ysSpjO665vaejUf3CADjhx0fGubv7fHh2i66 Y6P2m5ruf4ZCZLgXPCsPRzsAnQu7y5derhexw/75moA+J2ObAfA6pavvdsGkdPtMuI1e Ce6w== 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=/9lBmbu8t1CqSjvTTVosn7VkePvHDbj98u+3L5fGYWM=; b=bPMhPC7m8N994FTSi9ZqE+MdFUNKMy29mRCXKpsYR6sxR3PytWVCdIl7guERok8uGl toUm7htYiaXNTrhcupj0XyPqn5YsCxfoK8kMRoKuyTbHszhaLaTG/FyqdTcdpcDoQW6L u6zAmNq89BhoKtU+d8OvXxWxLqvy+qm/qCQ0dw/ANCJ+Q/xLDVBHWmi/d49au//Jsang 7YZUUj6kP2GKyhzIh07/9cb82PgYfT5D/8DUAuCu3n+O1sNNgPjDsvmUie+7EE1+6B4j daqXdTXL5hnCi3AmGg8pZd7wVkrCCcVz8dZnhiv63Zqz/19akKFC5ZOAncaNko2ljohG Pvyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=x3Bc48ks; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yhAvw0w3; 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 g10si1187319ilq.155.2020.08.28.20.39.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:11 -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=x3Bc48ks; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yhAvw0w3; 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=/9lBmbu8t1CqSjvTTVosn7VkePvHDbj98u+3L5fGYWM=; b=x3Bc48ksnyAM4Caho+xzW5SBC 5Id4bMJ4cEhhVJRPeB3tYxIXc+Fh19NB0jZAXUTYbTzgA8OVx7Of4h9iK0U11cFqUi6UvcRY6IOeh nxCrbe6HfrK+ZzDaroY2+tIaPDUkk8BJ7mgqsfVpgUjfhLzmjYFMMl63iE4RVEDFVl+ZiPhQQxbh0 Atbt5K69eJhOM9dC9D6tF1gArYQdDXPY3Mz5R+4OdCZDrVk5ImiDvs/ZYcEnr+NjC0shzs5d8aeev Pz6qn2RFx7SZ6PFhD/WduUADLyQrzFpvROEl6KJYTRJbdw32jR6oAH+X0I7QrIFIZ5ROD2tGLVqiG qwDgWKh7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhs-0002cr-JE; Sat, 29 Aug 2020 03:39:08 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhr-0002bQ-3u for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:07 +0000 Received: by mail-wr1-x443.google.com with SMTP id w5so868253wrp.8 for ; Fri, 28 Aug 2020 20:39:06 -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=+gz5nCyObldL5Gm9cjjoAI5bGBbxcrE8UnaMm3PvfTM=; b=yhAvw0w35tHzVG2StztQGtBFWWj+pdnd7KCWqy13B35Z2J1rwMFZKsHOWIXhQAmMzW 78Jh5t9kEE3gC8MBkhYHATVsIei4XWleRHuyPWUCcd5jsRTEVXUKmsTvhlVuXkoZLqBd 0lglK5kdX9ScMoht1EOKG2tXnPlYnPesL7Wjlafp8Pj6lq+rkWnr7dMqsOQelY/1cwh5 4fomDTtOC4MCAHNGYBkfEAMFUv/hxD5wzOs3VEu/n5Guphj1ITV5RmewzmE4jIFxcKiz wfNb+7BQJTHHC45eWZzJeVKtzWHnJ6Z8C3kqBEBhX9qj5Z0DbtOZn2IhsKX9E7dlFU3F 31aA== 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=+gz5nCyObldL5Gm9cjjoAI5bGBbxcrE8UnaMm3PvfTM=; b=PafoEBVL8g0DO/8DvKnaVrn9m/GnP0s3Gxrwo3rC+0xB+rTfU2EXNuiKkiucqXzYQ1 BZLD/P0q6brtsaOKxSMImVtUnSjuBxDjueKwocENj3aXjthqAonZf36LRK6J5VlHWZ8Q DWtVeKb0TKCIKqCqbh0XouQV27Y/n11EyA6Vk+8bX8MWGTm9waf9W4D/dpaiIhpi0969 vtn3lLP01VYvCSofKnUlErRBwhtdPvkrPU8wW90bi4x41gpT9KmhnxKqxtpn6hYg/0yF B3KXJtq7XVBB5GCSIdDxvqV3a1ppoUk6f2/v8lLAemNOGx4LV1ETx7405cRS1PtUA8/j 5e8w== X-Gm-Message-State: AOAM530XfHDkCw/gzLWgphEl+1hI/JRtDtIXgXDH9tSzGEy3cZRXiv8p yTFj8QwQ80RYdC3wLncy4SjqQA== X-Received: by 2002:adf:ab57:: with SMTP id r23mr1777893wrc.386.1598672345939; Fri, 28 Aug 2020 20:39:05 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id l9sm1732151wmh.1.2020.08.28.20.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:05 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Date: Sat, 29 Aug 2020 04:39:47 +0100 Message-Id: <20200829033947.2167817-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org> References: <20200829033947.2167817-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-20200828_233907_199355_1C7065E6 X-CRM114-Status: GOOD ( 14.62 ) 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:443 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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 For the 80MHz channel we need to set the PHY mode to one of four PHY modes that span the 80MHz range. This patch latches the hw_value PHY field previously defined for 5GHz channels directly to the parameter passed to the firmware. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 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 729708d96586..4b967f8ba949 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1493,6 +1493,7 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct wcn36xx_hal_config_bss_params_v1 *bss; struct wcn36xx_hal_config_bss_params bss_v0; struct wcn36xx_hal_config_sta_params_v1 *sta; + struct cfg80211_chan_def *chandef; int ret; msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); @@ -1536,7 +1537,13 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif, bss->dtim_period = bss_v0.dtim_period; bss->tx_channel_width_set = bss_v0.tx_channel_width_set; bss->oper_channel = bss_v0.oper_channel; - bss->ext_channel = bss_v0.ext_channel; + + if (wcn->hw->conf.chandef.width == NL80211_CHAN_WIDTH_80) { + chandef = &wcn->hw->conf.chandef; + bss->ext_channel = HW_VALUE_PHY(chandef->chan->hw_value); + } else { + bss->ext_channel = bss_v0.ext_channel; + } bss->reserved = bss_v0.reserved;