Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723bs: remove some 5 GHz code

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>

authored by

Michael Straube and committed by
Greg Kroah-Hartman
349f6bef 9279204d

+8 -28
+2 -7
drivers/staging/rtl8723bs/core/rtw_ap.c
··· 741 741 if (p && ie_len) { 742 742 pht_info = (struct HT_info_element *)(p + 2); 743 743 744 - if (cur_channel > 14) { 745 - if ((pregpriv->bw_mode & 0xf0) > 0) 746 - cbw40_enable = 1; 747 - } else { 748 - if ((pregpriv->bw_mode & 0x0f) > 0) 749 - cbw40_enable = 1; 750 - } 744 + if ((pregpriv->bw_mode & 0x0f) > 0) 745 + cbw40_enable = 1; 751 746 752 747 if ((cbw40_enable) && (pht_info->infos[0] & BIT(2))) { 753 748 /* switch to the 40M Hz mode */
+4 -14
drivers/staging/rtl8723bs/core/rtw_mlme.c
··· 2252 2252 } 2253 2253 2254 2254 /* to disable 40M Hz support while gd_bw_40MHz_en = 0 */ 2255 - if (channel > 14) { 2256 - if ((pregistrypriv->bw_mode & 0xf0) > 0) 2257 - cbw40_enable = 1; 2258 - } else { 2259 - if ((pregistrypriv->bw_mode & 0x0f) > 0) 2260 - cbw40_enable = 1; 2261 - } 2255 + if ((pregistrypriv->bw_mode & 0x0f) > 0) 2256 + cbw40_enable = 1; 2262 2257 2263 2258 if ((cbw40_enable == 1) && (operation_bw == CHANNEL_WIDTH_40)) { 2264 2259 ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH); ··· 2361 2366 /* todo: */ 2362 2367 } 2363 2368 2364 - if (channel > 14) { 2365 - if ((pregistrypriv->bw_mode & 0xf0) > 0) 2366 - cbw40_enable = 1; 2367 - } else { 2368 - if ((pregistrypriv->bw_mode & 0x0f) > 0) 2369 - cbw40_enable = 1; 2370 - } 2369 + if ((pregistrypriv->bw_mode & 0x0f) > 0) 2370 + cbw40_enable = 1; 2371 2371 2372 2372 /* update cur_bwmode & cur_ch_offset */ 2373 2373 if ((cbw40_enable) &&
+2 -7
drivers/staging/rtl8723bs/core/rtw_wlan_util.c
··· 854 854 855 855 pHT_info = (struct HT_info_element *)pIE->data; 856 856 857 - if (pmlmeext->cur_channel > 14) { 858 - if ((pregistrypriv->bw_mode & 0xf0) > 0) 859 - cbw40_enable = 1; 860 - } else { 861 - if ((pregistrypriv->bw_mode & 0x0f) > 0) 862 - cbw40_enable = 1; 863 - } 857 + if ((pregistrypriv->bw_mode & 0x0f) > 0) 858 + cbw40_enable = 1; 864 859 865 860 if ((pHT_info->infos[0] & BIT(2)) && cbw40_enable) { 866 861 new_bwmode = CHANNEL_WIDTH_40;