From patchwork Tue Sep 8 18:25:10 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: 249332 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791805ilg; Tue, 8 Sep 2020 11:24:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT/ctB0icAwVCY0c+GMzDS5lBBPcJsH+AZWNfmdqh5GjEoW50tMgffdS/DVF6N+kvwuYHt X-Received: by 2002:a92:1e0d:: with SMTP id e13mr65766ile.66.1599589473900; Tue, 08 Sep 2020 11:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589473; cv=none; d=google.com; s=arc-20160816; b=nyGfmzqoXXCubwnB23QZI6d9gWG+ksDLx1HWNSenFwFVJl65CfvaNQawG520Skkk7f lEuZIsNBvxGjsXZOAkEXFBC1wXvp7Nwa9gDcV2uPWn3/FW6nYFRIfY+5nBxU90fUNy6K 147FAMUB7Qgt6Qy97Ts06Cjz3dgqn2qMZCPSKYXj9YEwTBQIxwwZlCO/O0e53kBwqDsv JwOPvm2MjxvYD4vchqEDeZFH4/4JWickgZfKdz/qXULrwkMSLvQKo3hviKbFcLBy2Wjv +1VlOh+YK1Gc4bHpuKKhZVUubdlrEvFrbQsKyN2lxPLPrD4jOXT/a/LpQnRmyRzIw8BT n8Pg== 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=bFNnfzm9SGqgr1yavY8OaPCg7553zWU7U/rVdHuopA0jmIQMrK2hWdYI+xtPVWvNAo 7jmCyxUU9NCLUwCC7ZDzQEoqRxO6aQhUtwU8GRpPvv7tCjAt5rluSG0nWx64I9yOBsYO EFIPHPAm5SxLi91vW31XnNyj2wc/Qot0LZ2xErBOJ8y5D3xU3ZlgCj9+oja2YL41lPhW GGLqLaaJ0yY+MlKj0lyficaWWD1j9h12jiE4ROXKDthosUmZLRO7swWlyO85vJF+RUiB 7Es9TNEWcWEt6nPg5H8302Kh6qCR3/j36Fc+hxPLOfRgvJO/M3SB3crTkETnHUvnNv8n htMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=FqeXXV7w; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vfytRyIW; 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 t13si17339966jaj.13.2020.09.08.11.24.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:33 -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=FqeXXV7w; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vfytRyIW; 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=FqeXXV7wgyIwu8CPvbeVxOF39 LbCn1HNONKaD592vfV34pG0U8a1J4AQP3Nn2n941Ltqsjlj1gFxcC6frpKRnKX2xHYnG/CJ/0kQWD 6zCDBkpeQ317Djuuq6Q01j9CKeYmTALi3Y4QIiaoPJ0orK2FnbdDn0rXD2lSz3hzSFUK7Valrb9PO OUJvIwyuQVNDLLV8IEZDeL+esyB2enMkG+ozO2nNkTSarMDdRUeBXW103XZRYzH9iwenYznXaVj4D 59N6RbY+28lKygk+T16OYtk7IAiU3sFpVXNUrmoI9yJ5nQOqi6c5K1HxmabSDqd1De5K7enq8QUiM Oe4UboGSQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiIA-0005I7-PF; Tue, 08 Sep 2020 18:24:30 +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 1kFiI9-0005Gl-AG for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:29 +0000 Received: by mail-wr1-x444.google.com with SMTP id s12so194589wrw.11 for ; Tue, 08 Sep 2020 11:24:29 -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=vfytRyIWj9sZ1Y6Pgz4Y1o9VVwDmzeiVbWWGa0+XVFHMhQ662ftEfe/xnNCbSdlgBF YNtKCqHg5p9RrjJkZXPMXXoPS/QhQ6qzEIwOlnTmndpCo+a/sNt8K+bRYKGdLvh2sw2m oaLAzdMD55kPkR6Hqxn8HxdQqyoe3O1XkLNVOiId35WEkHUaxM9H3gGUni/EsTj8sxVI X7UIvLBXaigqQax5r5PM0Ihrg4/oKSnFdgyvAA0SL6Ru3pHefBOSCp8tcRB/MupVkYN8 JNKRGGMhyPdbTRPC9VRbSHnMnXS4Axy8qOG8TxsXZjw878u9dhyWfnRGyZtB1ucgP+p7 pmvA== 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=AJXSRyDYaH5rsWI3kX80OsXNbYzkNEUz89HN5ih8gWnQlrwfIJUOSerB6OSe6Zo7IO Sk4f3o7J6rApczZzBPNz8cSdHLgRy8l4WeymDCIx9UYi/20RIyjvw7/RSHem1a4WJRhG yNPNLD7S6kZHvjqX8dt6td12HhUwkFnp6Rqnvv9DGXVQeGwKqIjSc1WNPdK2jCkaRH7V Li5kVFiaD9R9yiks5l1H43xUnZLCDWZIa5t6qnQydgW2fsGVcFhTul59GOMipYXWjKbo fMsvSShXYNMzDbVmoVqmmaKIl0HGPLLbSivqdo6eRtTX3xfUOJoQcDf+RHjYWbSCryZu VSgQ== X-Gm-Message-State: AOAM530lHjQGkQQDPkNqvmuQdwywjgzmGq31GRSmPr0qOLA/VQ8MX6hq XI8MbHnw02peUKn1oIXBj94uvg== X-Received: by 2002:adf:fe42:: with SMTP id m2mr860212wrs.367.1599589468376; Tue, 08 Sep 2020 11:24:28 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id f14sm352447wrv.72.2020.09.08.11.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:27 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Tue, 8 Sep 2020 19:25:10 +0100 Message-Id: <20200908182514.2870410-2-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_142429_370518_18F85847 X-CRM114-Status: GOOD ( 12.82 ) 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_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 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)