linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Subject: RE: [PATCH] wifi: rtlwifi: Fix setting the basic rates
Date: Mon, 19 Feb 2024 07:37:47 +0000	[thread overview]
Message-ID: <afded3d1768247cca613f55943a013aa@realtek.com> (raw)
In-Reply-To: <35165caf-337c-4da0-b55c-c1a7081a1456@gmail.com>



> -----Original Message-----
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Sent: Sunday, February 18, 2024 4:20 AM
> To: linux-wireless@vger.kernel.org
> Cc: Ping-Ke Shih <pkshih@realtek.com>; Larry Finger <Larry.Finger@lwfinger.net>
> Subject: [PATCH] wifi: rtlwifi: Fix setting the basic rates

Though driver sets register via enum HW_VAR_BASIC_RATE, but actually it uses
supported rates as ACK and RTS rates, so I think it would be clearer to
mention "fix setting of RTS rate" in subject.

Others look good to me. 

> 
> RTL8192CU transmits RTS frames at 48M instead of the expected 24M.
> This is because rtlwifi never writes REG_INIRTS_RATE_SEL, because when
> rtl_op_bss_info_changed() is called with BSS_CHANGED_BASIC_RATES (and
> BSS_CHANGED_BSSID) it calls ieee80211_find_sta(), which returns NULL,
> and the code skips over the part that handles BSS_CHANGED_BASIC_RATES.
> 
> A bit later rtl_op_bss_info_changed() is called with BSS_CHANGED_ASSOC.
> At this point ieee80211_find_sta() works, so set the basic rates from
> here.
> 
> Some of the code from BSS_CHANGED_BSSID which needs ieee80211_find_sta()
> was already duplicated under BSS_CHANGED_ASSOC, so delete it from
> BSS_CHANGED_BSSID.
> 
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> ---
> 
> I'm not sure if this is enough. Should we also handle
> BSS_CHANGED_BASIC_RATES? But bss_conf->basic_rates is only 0xf (CCK
> rates only) and the out-of-tree Realtek drivers want to use the 6, 12,
> and 24M rates as well. If ieee80211_find_sta() returns NULL, how can we
> know if OFDM rates are supported?
> 
> I'm also not sure if it's okay to set the basic rates later than
> originally intended, but it's still better than never.

bss_conf->basic_rates is from AP beacon basically, and only the supported rates
with 0x80 bit are basic rates, which is minimum rates requirement to the AP.
Thus, I think it is not suitable to consider basic rates as RTS rate. 

Ping-Ke 


  reply	other threads:[~2024-02-19  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 20:19 [PATCH] wifi: rtlwifi: Fix setting the basic rates Bitterblue Smith
2024-02-19  7:37 ` Ping-Ke Shih [this message]
2024-02-19 10:04   ` Johannes Berg
2024-02-20  3:11     ` Ping-Ke Shih

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=afded3d1768247cca613f55943a013aa@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@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;
as well as URLs for NNTP newsgroup(s).