From: Jeff Chen <jeff.chen_1@nxp.com>
To: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, briannorris@chromium.org,
kvalo@kernel.org, francesco@dolcini.it,
tsung-hsien.hsieh@nxp.com, s.hauer@pengutronix.de,
Jeff Chen <jeff.chen_1@nxp.com>
Subject: [PATCH v2 2/2] wifi: mwifiex: Fix HT40 bandwidth issue.
Date: Wed, 5 Feb 2025 09:28:43 +0800 [thread overview]
Message-ID: <20250205012843.758714-2-jeff.chen_1@nxp.com> (raw)
In-Reply-To: <20250205012843.758714-1-jeff.chen_1@nxp.com>
This patch addresses an issue where, despite the AP supporting 40MHz
bandwidth, the connection was limited to 20MHz. Without this fix,
even if the access point supports 40MHz, the bandwidth after
connection remains at 20MHz. This issue is not a regression.
Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
---
drivers/net/wireless/marvell/mwifiex/11n.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c
index 66f0f5377ac1..4ae0b4aaa09a 100644
--- a/drivers/net/wireless/marvell/mwifiex/11n.c
+++ b/drivers/net/wireless/marvell/mwifiex/11n.c
@@ -308,7 +308,7 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
int ret_len = 0;
struct ieee80211_supported_band *sband;
struct ieee_types_header *hdr;
- u8 radio_type;
+ u8 radio_type, secch_offset;
if (!buffer || !*buffer)
return ret_len;
@@ -401,13 +401,15 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
chan_list->chan_scan_param[0].radio_type =
mwifiex_band_to_radio_type((u8) bss_desc->bss_band);
- if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 &&
- bss_desc->bcn_ht_oper->ht_param &
- IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)
- SET_SECONDARYCHAN(chan_list->chan_scan_param[0].
- radio_type,
- (bss_desc->bcn_ht_oper->ht_param &
- IEEE80211_HT_PARAM_CHA_SEC_OFFSET));
+ if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
+ if (bss_desc->bcn_ht_oper->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) {
+ chan_list->chan_scan_param[0].radio_type |= (CHAN_BW_40MHZ << 2);
+ secch_offset = bss_desc->bcn_ht_oper->ht_param &
+ IEEE80211_HT_PARAM_CHA_SEC_OFFSET;
+ SET_SECONDARYCHAN(chan_list->chan_scan_param[0].radio_type,
+ secch_offset);
+ }
+ }
*buffer += struct_size(chan_list, chan_scan_param, 1);
ret_len += struct_size(chan_list, chan_scan_param, 1);
--
2.34.1
next prev parent reply other threads:[~2025-02-05 1:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 1:28 [PATCH v2 1/2] wifi: mwifiex: Resolve the failure in downloading calibration data Jeff Chen
2025-02-05 1:28 ` Jeff Chen [this message]
2025-03-06 10:37 ` [PATCH v2 2/2] wifi: mwifiex: Fix HT40 bandwidth issue Francesco Dolcini
2025-03-14 3:06 ` [EXT] " Jeff Chen
2025-02-11 13:31 ` [PATCH v2 1/2] wifi: mwifiex: Resolve the failure in downloading calibration data Johannes Berg
2025-02-20 6:11 ` [PATCH v3 0/2] Resolve the failure in downloading Jeff Chen
2025-02-20 6:11 ` [PATCH v3 1/2] wifi: mwifiex: Part A of resolving the failure in downloading calibration data Jeff Chen
2025-03-06 10:43 ` Francesco Dolcini
2025-03-07 16:40 ` [EXT] " Jeff Chen
2025-03-18 5:07 ` [PATCH v4 0/2] wifi: mwifiex: Fix RF calibration data handling issues Jeff Chen
2025-03-18 5:07 ` [PATCH v4 1/2] wifi: mwifiex: Fix premature release of RF calibration data Jeff Chen
2025-03-19 16:28 ` Francesco Dolcini
2025-03-25 16:43 ` [EXT] " Jeff Chen
2025-03-25 16:45 ` Johannes Berg
2025-03-25 22:55 ` Brian Norris
2025-03-26 12:18 ` Francesco Dolcini
2025-03-26 15:23 ` Brian Norris
2025-03-27 17:26 ` Jeff Chen
2025-03-18 5:07 ` [PATCH v4 2/2] wifi: mwifiex: Fix RF calibration data download from file Jeff Chen
2025-03-19 16:31 ` Francesco Dolcini
2025-03-24 16:47 ` [EXT] " Jeff Chen
2025-03-24 7:02 ` Sascha Hauer
2025-03-24 16:57 ` [EXT] " Jeff Chen
2025-02-20 6:11 ` [PATCH v3 2/2] wifi: mwifiex: Part B of resolving the failure in downloading calibration data Jeff Chen
2025-02-20 8:21 ` [PATCH v3 0/2] Resolve the failure in downloading Johannes Berg
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=20250205012843.758714-2-jeff.chen_1@nxp.com \
--to=jeff.chen_1@nxp.com \
--cc=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tsung-hsien.hsieh@nxp.com \
/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