]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mwifiex: Fix HT40 bandwidth issue.
authorJeff Chen <jeff.chen_1@nxp.com>
Fri, 14 Mar 2025 09:42:38 +0000 (17:42 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Mar 2025 09:27:33 +0000 (10:27 +0100)
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>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20250314094238.2097341-1-jeff.chen_1@nxp.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/marvell/mwifiex/11n.c

index 66f0f5377ac1819463e1a7ff2938327e661b1e47..738bafc3749b0ad874e8c7f4f3e67548ed76e199 100644 (file)
@@ -403,12 +403,14 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
 
                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)
+                   IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) {
+                       chan_list->chan_scan_param[0].radio_type |=
+                               CHAN_BW_40MHZ << 2;
                        SET_SECONDARYCHAN(chan_list->chan_scan_param[0].
                                          radio_type,
                                          (bss_desc->bcn_ht_oper->ht_param &
                                          IEEE80211_HT_PARAM_CHA_SEC_OFFSET));
-
+               }
                *buffer += struct_size(chan_list, chan_scan_param, 1);
                ret_len += struct_size(chan_list, chan_scan_param, 1);
        }