diff options
author | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2020-09-21 15:21:16 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-09-22 09:22:50 +0200 |
commit | 59b5c8447c14e7aeda90439f05968bcdbae11af1 (patch) | |
tree | 0715b42f1d62532d858aca924fd3e5bea2361853 /drivers/net/wireless/ath/wcn36xx | |
parent | ath10k: Use bdf calibration variant for snoc targets (diff) | |
download | linux-59b5c8447c14e7aeda90439f05968bcdbae11af1.tar.xz linux-59b5c8447c14e7aeda90439f05968bcdbae11af1.zip |
wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200910150708.2179043-2-bryan.odonoghue@linaro.org
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx')
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 |
1 files changed, 3 insertions, 1 deletions
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) |