mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Chris Chiu <chris.chiu@canonical.com>
Cc: Jes.Sorensen@gmail.com, davem@davemloft.net, kuba@kernel.org,
	code@reto-schneider.ch, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] rtl8xxxu: fill up txrate info for gen1 chips
Date: Wed, 16 Mar 2022 17:37:23 +0200	[thread overview]
Message-ID: <87o825x618.fsf@tynnyri.adurom.net> (raw)
In-Reply-To: <20220307125852.13606-3-chris.chiu@canonical.com> (Chris Chiu's message of "Mon, 7 Mar 2022 20:58:52 +0800")

Chris Chiu <chris.chiu@canonical.com> writes:

> RTL8188CUS/RTL8192CU(gen1) don't support rate adatptive report hence
> no real txrate info can be retrieved. The vendor driver reports the
> highest rate in HT capabilities from the IEs to avoid empty txrate.
> This commit initiates the txrate information with the highest supported
> rate negotiated with AP. The gen2 chip keeps update the txrate from
> the rate adaptive reports, and gen1 chips at least have non-NULL txrate
> after associated.
>
> Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
> ---
>  .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 59 +++++++++++++++++++
>  1 file changed, 59 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index d225a1257530..285acf303e3d 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -4473,6 +4473,35 @@ void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv)
>  	priv->rx_buf_aggregation = 1;
>  }
>  
> +static struct ieee80211_rate rtl8xxxu_legacy_ratetable[] = {
> +	{.bitrate = 10, .hw_value = 0x00,},
> +	{.bitrate = 20, .hw_value = 0x01,},
> +	{.bitrate = 55, .hw_value = 0x02,},
> +	{.bitrate = 110, .hw_value = 0x03,},
> +	{.bitrate = 60, .hw_value = 0x04,},
> +	{.bitrate = 90, .hw_value = 0x05,},
> +	{.bitrate = 120, .hw_value = 0x06,},
> +	{.bitrate = 180, .hw_value = 0x07,},
> +	{.bitrate = 240, .hw_value = 0x08,},
> +	{.bitrate = 360, .hw_value = 0x09,},
> +	{.bitrate = 480, .hw_value = 0x0a,},
> +	{.bitrate = 540, .hw_value = 0x0b,},
> +};

Should this be static const?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

      reply	other threads:[~2022-03-16 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 12:58 [PATCH 0/2] rtl8xxxu: Fill up more TX information Chris Chiu
2022-03-07 12:58 ` [PATCH 1/2] rtl8xxxu: feed antenna information for cfg80211 Chris Chiu
2022-03-07 12:58 ` [PATCH 2/2] rtl8xxxu: fill up txrate info for gen1 chips Chris Chiu
2022-03-16 15:37   ` Kalle Valo [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=87o825x618.fsf@tynnyri.adurom.net \
    --to=kvalo@kernel.org \
    --cc=Jes.Sorensen@gmail.com \
    --cc=chris.chiu@canonical.com \
    --cc=code@reto-schneider.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®