summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wcn36xx/smd.c
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2020-09-21 16:21:18 +0300
committerKalle Valo <kvalo@codeaurora.org>2020-09-22 10:23:01 +0300
commite042bc19aaceeb9aed24bfd4b53dfb4fe8bd0fd0 (patch)
treef960b21bfd7fa049f1a0f11b0cd8506ef071d9b2 /drivers/net/wireless/ath/wcn36xx/smd.c
parentfc4d4008f810ef7936c503467e377437bdc24490 (diff)
downloadlinux-e042bc19aaceeb9aed24bfd4b53dfb4fe8bd0fd0.tar.xz
wcn36xx: Set PHY into correct mode for 80MHz channel width
For the 80MHz channel we need to set the PHY mode to one of four PHY modes that span the 80MHz range. This patch latches the hw_value PHY field previously defined for 5GHz channels directly to the parameter passed to the firmware. 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-6-bryan.odonoghue@linaro.org
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/smd.c')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index feeb27851f7a..7dada66b9f87 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1508,6 +1508,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
struct wcn36xx_hal_config_bss_params_v1 *bss;
struct wcn36xx_hal_config_bss_params bss_v0;
struct wcn36xx_hal_config_sta_params_v1 *sta;
+ struct cfg80211_chan_def *chandef;
int ret;
msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL);
@@ -1547,7 +1548,13 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
bss->dtim_period = bss_v0.dtim_period;
bss->tx_channel_width_set = bss_v0.tx_channel_width_set;
bss->oper_channel = bss_v0.oper_channel;
- bss->ext_channel = bss_v0.ext_channel;
+
+ if (wcn->hw->conf.chandef.width == NL80211_CHAN_WIDTH_80) {
+ chandef = &wcn->hw->conf.chandef;
+ bss->ext_channel = HW_VALUE_PHY(chandef->chan->hw_value);
+ } else {
+ bss->ext_channel = bss_v0.ext_channel;
+ }
bss->reserved = bss_v0.reserved;