From: Hans de Goede <hdegoede@redhat.com>
To: Michael Straube <straube.linux@gmail.com>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: remove some 5 GHz code
Date: Mon, 16 Jun 2025 12:52:12 +0200 [thread overview]
Message-ID: <98a85abb-5e77-4e66-a192-8db9245e7ef7@redhat.com> (raw)
In-Reply-To: <20250615123859.41922-1-straube.linux@gmail.com>
Hi,
On 15-Jun-25 14:38, Michael Straube wrote:
> 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>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hansg@kernel.org>
Regards,
Hans
> ---
> Compile tested only, due to lack of hardware.
>
> drivers/staging/rtl8723bs/core/rtw_ap.c | 9 ++-------
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 18 ++++--------------
> drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 9 ++-------
> 3 files changed, 8 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index 383a6f7c06f4..b2e7e7267aa4 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -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 */
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 1d23ea7d6f59..0b0ee023a239 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -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) &&
> diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> index 73c70b016f00..0c6072d08661 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> @@ -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;
prev parent reply other threads:[~2025-06-16 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-15 12:38 [PATCH] staging: rtl8723bs: remove some 5 GHz code Michael Straube
2025-06-16 10:52 ` Hans de Goede [this message]
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=98a85abb-5e77-4e66-a192-8db9245e7ef7@redhat.com \
--to=hdegoede@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.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