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 v2 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width
Date: Sat, 29 Aug 2020 04:39:47 +0100 [thread overview]
Message-ID: <20200829033947.2167817-6-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <20200829033947.2167817-1-bryan.odonoghue@linaro.org>
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>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 729708d96586..4b967f8ba949 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1493,6 +1493,7 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif,
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);
@@ -1536,7 +1537,13 @@ int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct ieee80211_vif *vif,
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;
--
2.27.0
next prev parent reply other threads:[~2020-08-29 3:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 3:39 [PATCH v2 0/5] wcn36xx: PHY modifications to support 80MHz operation Bryan O'Donoghue
2020-08-29 3:39 ` [PATCH v2 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Bryan O'Donoghue
2020-08-29 3:39 ` [PATCH v2 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Bryan O'Donoghue
2020-08-29 3:39 ` [PATCH v2 3/5] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Bryan O'Donoghue
2020-08-29 3:39 ` [PATCH v2 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Bryan O'Donoghue
2020-08-29 3:39 ` Bryan O'Donoghue [this message]
2020-08-31 10:08 ` [PATCH v2 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Loic Poulain
2020-08-31 11:30 ` 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=20200829033947.2167817-6-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).