All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org,
	linux-wireless@vger.kernel.org
Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org,
	loic.poulain@linaro.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	[thread overview]
Message-ID: <20200908182514.2870410-2-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <20200908182514.2870410-1-bryan.odonoghue@linaro.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 <bryan.odonoghue@linaro.org>
---
 drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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)
-- 
2.27.0


  reply	other threads:[~2020-09-08 18:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 18:25 [PATCH v3 0/5] wcn36xx: PHY modifications to support 80MHz operation Bryan O'Donoghue
2020-09-08 18:25 ` Bryan O'Donoghue [this message]
2020-09-08 18:25 ` [PATCH v3 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Bryan O'Donoghue
2020-09-08 18:25 ` [PATCH v3 3/5] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Bryan O'Donoghue
2020-09-08 18:25 ` [PATCH v3 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Bryan O'Donoghue
2020-09-08 18:25 ` [PATCH v3 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Bryan O'Donoghue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200908182514.2870410-2-bryan.odonoghue@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=shawn.guo@linaro.org \
    --cc=wcn36xx@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.