From patchwork Thu Sep 10 15:07:04 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: 249647 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826555ilk; Thu, 10 Sep 2020 08:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxygZRM4RkOSrO5/RJOjsDJvqYzzdFyG6qaEtjiu5APx8n80u9xF4rNwQPNX4Hc6RxI/gv+ X-Received: by 2002:a05:6e02:e4e:: with SMTP id l14mr8200377ilk.10.1599750388159; Thu, 10 Sep 2020 08:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750388; cv=none; d=google.com; s=arc-20160816; b=uAmKgsNk1+iCOqlifRNx8M4Jy6mk9wZRorg+15G7GwAC6ZeSc0y522WtgW7BsaNw3n oCr8kttk/BU39EfRrGoWIYeMKRlmzk4R2eEORm6eU1BXkDGC+UB2c1/Gi4h0vhN83lb1 QhkJUxxzNQgZAOkodFnd9ZukxckVpgk6Pxv+OIBGMe3FZWRIjJfeQRSkPoBrq89KZTCm GkVRJjatbR5DpM+1UTYibn+BJRTrU+wCYuKbYC+fu0XO6GKeAhV7Po1Rkesi8PtJ8XJw X0Tv6wuzlj8s6ix48OKUtjv76X0VUbQTCMcT97S6CaSbfHgvDj8VKT8ZBVZnR1r2z3aI UjHQ== 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=QTMg0UdadBJpi9WVmIrHRo/ituGHTeqsLwhVgWHHxQXpJqWWaWvZL5CaFWz17JW7GW W4jwYULq9PzhVckuzKTS2AS0DihDJuozHmHmh94nOYuvSRzGVYNodg8GKZoB1MxQguTt btp543iVzCYoFh55nEvM2bp1JPPkL3wctYtON1R83lS9QDFRtqMPm3q1QztsGWFEnK7I /p7BX9QiHlHIJjzJJNrwkHsH+ISloaHGloMegP01bk9tGRDQAKhYHrpG4XX/rKJ0LwfH WTzCNJccwpptFqg8DUYUD74hFm15u0O24sSWz9xMOomA4Oz2x3H3AsD+6M3xduVcCv0S xnGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=WFfUAt+G; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=oCOn9uu7; 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 w25si4238055jap.15.2020.09.10.08.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:28 -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=WFfUAt+G; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=oCOn9uu7; 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=WFfUAt+Gby5WvFdq2sAFJ05uT WfUFXqOwZssctOwvo0h/jRMxU1gX3aR1zMEjOW0nU46vFCdHe5pmRIGd4wotS9OYVkOWBfIwPUc3C TRQUt3GiP6q/BX8023o2u4Ps03RW/I0wqZOnBvP9XN2l7UA2G3PiYBGNq44M2hpL4yObwoS6S2Ba3 gz4f80MOdJfHegZUAQKmo/8c7pAj7vv2vcpKgpdt27SCa9wttJzruleCILPXXUsPSJbPwyY2eRNM4 Vc9svnrhBkd8uJzvm1+jHRaCKboPUCGeAUCEjPg9pFnhq1960lLX2jxWui5RAUZCxY+taa5baWijF J5HUuPgCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9Z-0007p8-23; Thu, 10 Sep 2020 15:06:25 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9W-0007nf-LI for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:06:23 +0000 Received: by mail-wr1-x441.google.com with SMTP id k15so7057668wrn.10 for ; Thu, 10 Sep 2020 08:06:22 -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=oCOn9uu78jvK2Mxprh5yp4HQIcZPjab4XJthUN3hJp6aCzH1VASdy5T+C1nBdjXtAw dfMt4H3gindzAcYHdWnQVAPC+HFI5LtMqHLIkYmCK12Hr5LASFt/GtzUAyJ02dd3WBKg xTBW4RQDsLy6SugjCwHRhmVmL+tnW3Dq0ac+r1i8BXilFBFNw8/+rcVKL1UG+rd9SGoq 5fSNzmgTdnjQJux7v+Ok1/bO8lDW/iCYDGZZTa79UYdkUknW6p9///gLBbvqeEHX6lbF 2619aAQLrFk3Qc8pu3rFMhuim0FkpJ45I8ftAdxHlZYClI/byhPG2LFQZdM/CejfdE4l Ptdw== 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=uBqYHu/zI1JPBtBCyn+hNnSdlpTmE3fVMAE2Nv5GeLukLVXGQ8V3CfYHDQGswM4Swy 3vndgSe/xkb/7m7NwtrzyMLBtpYcaEikn+dAP6I7YK/p+dQPDurjIn7PpzENQV3/c+1C itBGVZjXkxT+9xCFmm9BDJEsskzlWClJP/fBsPMtJWBzUOIcv9GNE1gokIGo4qYwzQII vtd7WetRplIpowEDcsd6AHYxIR2L/xIJoDHnLbnvHSs5Ujht1pLfNqGUWnjxJo0qou3d saFLsUULTi3vLtvFnUdS6Dj7Qzf9KeuNyjUqxCkqnxmOTsFbKqJTz5TBXdkdb5IMRIsK pyfQ== X-Gm-Message-State: AOAM530yYEbdkQoEoPfrUdX4emOlHh4gcmrxBK1YNffnP6wQ1EV0FRB1 Sa7jqtm1uNHmo4SflQUSyi8jzg== X-Received: by 2002:adf:df05:: with SMTP id y5mr10361317wrl.39.1599750381737; Thu, 10 Sep 2020 08:06:21 -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 i11sm8778906wre.32.2020.09.10.08.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:21 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Thu, 10 Sep 2020 16:07:04 +0100 Message-Id: <20200910150708.2179043-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150708.2179043-1-bryan.odonoghue@linaro.org> References: <20200910150708.2179043-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-20200910_110622_715111_860CA773 X-CRM114-Status: GOOD ( 12.02 ) 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:441 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 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)