summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2020-09-21 15:21:17 +0200
committerKalle Valo <kvalo@codeaurora.org>2020-09-22 09:22:53 +0200
commitf779a92f7b69bf4f421b8bdcc744307fa9c46b32 (patch)
treeffd30e122f2982861c98efc51cc61d66f535c085 /drivers
parentwcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels (diff)
downloadlinux-f779a92f7b69bf4f421b8bdcc744307fa9c46b32.tar.xz
linux-f779a92f7b69bf4f421b8bdcc744307fa9c46b32.zip
wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number
Uses HW_VALUE_CHANNEL() to extract the channel number from a struct ieee80211_channel->hw_value. Once done we can use the upper bits of the hw_value to encode PHY related data. 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-3-bryan.odonoghue@linaro.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 05e5e079dab3..feeb27851f7a 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -773,8 +773,10 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif,
msg_body->num_channel = min_t(u8, req->n_channels,
sizeof(msg_body->channels));
- for (i = 0; i < msg_body->num_channel; i++)
- msg_body->channels[i] = req->channels[i]->hw_value;
+ for (i = 0; i < msg_body->num_channel; i++) {
+ msg_body->channels[i] =
+ HW_VALUE_CHANNEL(req->channels[i]->hw_value);
+ }
msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN;