]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: rtl8723bs: remove some 5 GHz code
authorMichael Straube <straube.linux@gmail.com>
Sun, 15 Jun 2025 12:38:59 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 15:32:43 +0000 (17:32 +0200)
Chips that use this driver are 2.4 GHz only. Remove some code that is
executed only for 5 GHz (channel > 14) . This addresses the following
TODO item:

- find and remove any code for other chips that is left over

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250615123859.41922-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ap.c
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/core/rtw_wlan_util.c

index 383a6f7c06f4453171e2be7f3e9a5f95010a4eff..b2e7e7267aa49d8e8aa1b7ed5a67f318bbf120b5 100644 (file)
@@ -741,13 +741,8 @@ void start_bss_network(struct adapter *padapter)
        if (p && ie_len) {
                pht_info = (struct HT_info_element *)(p + 2);
 
-               if (cur_channel > 14) {
-                       if ((pregpriv->bw_mode & 0xf0) > 0)
-                               cbw40_enable = 1;
-               } else {
-                       if ((pregpriv->bw_mode & 0x0f) > 0)
-                               cbw40_enable = 1;
-               }
+               if ((pregpriv->bw_mode & 0x0f) > 0)
+                       cbw40_enable = 1;
 
                if ((cbw40_enable) &&    (pht_info->infos[0] & BIT(2))) {
                        /* switch to the 40M Hz mode */
index 6301dbbcc472061cbf9f66d00181762305a7609f..b60f5a4565433c2b56ba062712e659994480968e 100644 (file)
@@ -2252,13 +2252,8 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
        }
 
        /* to disable 40M Hz support while gd_bw_40MHz_en = 0 */
-       if (channel > 14) {
-               if ((pregistrypriv->bw_mode & 0xf0) > 0)
-                       cbw40_enable = 1;
-       } else {
-               if ((pregistrypriv->bw_mode & 0x0f) > 0)
-                       cbw40_enable = 1;
-       }
+       if ((pregistrypriv->bw_mode & 0x0f) > 0)
+               cbw40_enable = 1;
 
        if ((cbw40_enable == 1) && (operation_bw == CHANNEL_WIDTH_40)) {
                ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH);
@@ -2366,13 +2361,8 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
                /* todo: */
        }
 
-       if (channel > 14) {
-               if ((pregistrypriv->bw_mode & 0xf0) > 0)
-                       cbw40_enable = 1;
-       } else {
-               if ((pregistrypriv->bw_mode & 0x0f) > 0)
-                       cbw40_enable = 1;
-       }
+       if ((pregistrypriv->bw_mode & 0x0f) > 0)
+               cbw40_enable = 1;
 
        /* update cur_bwmode & cur_ch_offset */
        if ((cbw40_enable) &&
index 73c70b016f00972209ca8d638195b53b8d7acf5e..0c6072d08661a6d483b9c63e6492e3d74237f317 100644 (file)
@@ -854,13 +854,8 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_80211_var_
 
        pHT_info = (struct HT_info_element *)pIE->data;
 
-       if (pmlmeext->cur_channel > 14) {
-               if ((pregistrypriv->bw_mode & 0xf0) > 0)
-                       cbw40_enable = 1;
-       } else {
-               if ((pregistrypriv->bw_mode & 0x0f) > 0)
-                       cbw40_enable = 1;
-       }
+       if ((pregistrypriv->bw_mode & 0x0f) > 0)
+               cbw40_enable = 1;
 
        if ((pHT_info->infos[0] & BIT(2)) && cbw40_enable) {
                new_bwmode = CHANNEL_WIDTH_40;