From patchwork Mon Aug 3 03:11:27 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: 247328 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860754ilo; Sun, 2 Aug 2020 20:11:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXGNLhB5LZNn2OaYrfJu9HflCsCPSksPWqCGby3tOooyzG0cmfSHHDTbBPs3Fi37TrIh6A X-Received: by 2002:a17:906:8d8:: with SMTP id o24mr3604189eje.384.1596424285474; Sun, 02 Aug 2020 20:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424285; cv=none; d=google.com; s=arc-20160816; b=UI7UASnhYwhEgOL36d8JZ4hgJL/risLA4I8fzmr/F33UA51xwU92MVpKme56FSEeIw FL9btyIhyWO0ibRIPKwqTJ9AjkoIpeJZ2I3XZXYfiZO8hEi21MRUFmUPiY06qmvLO/2s fxGWViCmfrPDAzY0Jw9A5IvOZOnC1E+4IHbOh3WafITQz3eKkPUkpF8wGTnaGJXjDoih j7YDPth3AihrtUAVeP1VkNVeEBtDIvxNu33YUam2l9elmMrwT4sbQSj20IJI/N9wso91 H1SFp3YojQtg0vIsx2Enyd25KW9fnVCflydfM2muXLb3YcucJTXJwm/QROcbSuTZ0HLA nr9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=azNHQsdJAoWWLTflM7Ey2S4srlS3jrEo8Q6zu9bfi9A=; b=rgtJPqBVHgnMoS0YhIYbD1FuQX24wEFJkfXLvnNFOZVRFXrrQr/hsYzRDcSm9bH7d4 +d67xoPYT47scltiQgBI7siLmb+MCYzLPsuoIu6zEVWR6pz/uOX4NOVZ7a3dlIdPjViC 76P+t7U2kRVzjq24pxZ9vn2a7Gpq3HfDqgyBJ0G2zDYkWmy8i92vmDDkhSyL1tqXg1KR luie7/x+M1vEB/Coae3qurtNpw04ScpUvnDUMjFFbOWgLqEJDlMXT6zcpiZv4F9vzwla Ah85g9fTJQqLsl5keyR14apUUd+P9YUc3WEuCGQ56IHHbi7N9Q6QDSoIv561IqAXkVtI a2Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KCazHJ0K; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si10235393ejb.34.2020.08.02.20.11.25; Sun, 02 Aug 2020 20:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KCazHJ0K; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgHCDLW (ORCPT + 2 others); Sun, 2 Aug 2020 23:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbgHCDLV (ORCPT ); Sun, 2 Aug 2020 23:11:21 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D42C061756 for ; Sun, 2 Aug 2020 20:11:20 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id d190so13001733wmd.4 for ; Sun, 02 Aug 2020 20:11:20 -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=azNHQsdJAoWWLTflM7Ey2S4srlS3jrEo8Q6zu9bfi9A=; b=KCazHJ0KESxu5Qe7sbtrF/XremK3VUToyVi0LwfpMO8oDZxM7fGX07Bcm4cSryBKdB slWxCeM99yTSQeq6/IBelaCC6JwQqBorw/13GflONbMLhKkOi98jlSXgHyE+nmG7N/xd kXuY3c39iP2nTHVCjRDcQTK/4OHWlI6ZhK3dLVNRboI7VGN2hoFro2hy27PuogjFPDbp 96lDOzlO0FfmERbTJI/b21FcZjoJUfhcMthqSH9vcc28L7rGd07We6WA3B5SOCbQWNwQ MpyQO81SH1uLA/9o0JKPxVgzlauxid9nZN2rP4OEJBsbON2ZXFKSIRndQqfoonYcclfb X8wA== 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=azNHQsdJAoWWLTflM7Ey2S4srlS3jrEo8Q6zu9bfi9A=; b=GJiZET+bPsamjqwY4ZMZCU6YiGk5mtj95JiGsqAEsZSaRvk44aeb0BPdK1u33vZRw7 sgUlZKDSlPCS+aQBiqU+zpZ5rm5lX8fVf6MbYTjqoIDXjQR/xWYKSZohX0Nilz0TGeRb Cr7oOOnysikaL59v6OHkM7koJ3PfPa6xcUEUQeBJDVQ/BsWE96FWeBwsXQMwZie75qjH 0Yehfu2TYURy9/bMKZiSgyJ4Y9pS4CONrbqPF/tYcAEMkx5khx66cujd+VNmHCn3vDE3 rt0SUnkvVkTh+wrfwXjNA3kq3FdKvWmOeKAQxS9uCtX0E+NkWqAnBGRNlMCglyBjc6gV hGPQ== X-Gm-Message-State: AOAM532n9cWktaqMc5JZ37GslrdOK0zkYeGStwRTznyC6/voEQBJ8R4g UfAdGW7PdkAgK7X9HTCJDXTUVVyNzgw= X-Received: by 2002:a1c:9d53:: with SMTP id g80mr13692876wme.70.1596424279680; Sun, 02 Aug 2020 20:11:19 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:19 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 31/36] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Date: Mon, 3 Aug 2020 04:11:27 +0100 Message-Id: <20200803031132.1427063-32-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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index ae8bda76d573..38d68161d9fd 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)