Linux wireless drivers development
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Ho Jie Feng <hjf3108@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless-next 4/8] wifi: rt2800: report the MCS16 to MCS8 fallback of RT3593 in TX status
Date: Sat, 31 Oct 2026 11:54:41 +0100	[thread overview]
Message-ID: <20261031105441.GC31143@wp.pl> (raw)
In-Reply-To: <20261029134752.1299130-5-hjf3108@gmail.com>

On Thu, Oct 29, 2026 at 09:47:45PM +0800, Ho Jie Feng wrote:
> The RT3593 retry chain is now MCS 16 to MCS 8, skipping 7 MCS
> rates in between. Reflect that in the retry calculation code.
> 
> Test results:
>    before after
> TX 27.0   29.4
> RX 70.0   70.0

I think this patch should be merged with patch 3, and also 
similar handling should be done for RT3883 since it has
the same fallback pattern.

Regards
Stanislaw
> 
> Signed-off-by: Ho Jie Feng <hjf3108@gmail.com>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800lib.c |  8 ++++++++
>  drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 13 +++++++++++--
>  2 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> index 9d88ee698b854..de234bcc7a065 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> @@ -1116,6 +1116,14 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32 *txwi,
>  		 */
>  		__set_bit(TXDONE_SUCCESS, &txdesc.flags);
>  		txdesc.retry = ((mcs > real_mcs) ? mcs - real_mcs : 0);
> +
> +		/*
> +		 * On RT3593 MCS16 falls back to MCS8, so a frame that was
> +		 * sent below MCS16 after a three stream rate skipped MCS9
> +		 * to MCS15.
> +		 */
> +		if (rt2x00_rt(rt2x00dev, RT3593) && mcs >= 16 && real_mcs < 16)
> +			txdesc.retry -= 7;
>  	} else {
>  		/*
>  		 * Transmission failed. The number of retries is
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> index 4d94b7062f440..823785088a308 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> @@ -329,10 +329,10 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
>  	 * lowest rate was used.
>  	 */
>  	for (i = 0; i < retry_rates && i < IEEE80211_TX_MAX_RATES; i++) {
> -		tx_info->status.rates[i].idx = rate_idx - i;
> +		tx_info->status.rates[i].idx = rate_idx;
>  		tx_info->status.rates[i].flags = rate_flags;
>  
> -		if (rate_idx - i == 0) {
> +		if (rate_idx == 0) {
>  			/*
>  			 * The lowest rate (index 0) was used until the
>  			 * number of max retries was reached.
> @@ -340,8 +340,17 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
>  			tx_info->status.rates[i].count = retry_rates - i;
>  			i++;
>  			break;
> +		} else if (rate_idx == 16) {
> +			/*
> +			 * TX_FBK_CFG_3S_0 makes MCS16 fall back to MCS8 on
> +			 * RT3593, the decrement below shifts it back to 8.
> +			 */
> +			if (rt2x00_rt(rt2x00dev, RT3593) &&
> +			    (rate_flags & IEEE80211_TX_RC_MCS))
> +				rate_idx = 9;
>  		}
>  		tx_info->status.rates[i].count = 1;
> +		rate_idx--;
>  	}
>  	if (i < (IEEE80211_TX_MAX_RATES - 1))
>  		tx_info->status.rates[i].idx = -1; /* terminate */
> -- 
> 2.53.0
> 

  reply	other threads:[~2026-10-31 10:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 13:47 [PATCH wireless-next 0/8] wifi: rt2x00: improve the throughput of rt2800usb Ho Jie Feng
2026-10-29 13:47 ` [PATCH wireless-next 1/8] wifi: rt2x00: start the link tuner when an interface is added Ho Jie Feng
2026-10-31 10:51   ` Stanislaw Gruszka
2026-10-29 13:47 ` [PATCH wireless-next 2/8] wifi: rt2800: calibrate the crystal of RT3593 with the beacons Ho Jie Feng
2026-10-31 10:52   ` Stanislaw Gruszka
2026-10-31 16:49     ` Jie Feng
2026-10-29 13:47 ` [PATCH wireless-next 3/8] wifi: rt2800: use the 3SS fallback table of RT3883 on RT3593 Ho Jie Feng
2026-10-29 13:47 ` [PATCH wireless-next 4/8] wifi: rt2800: report the MCS16 to MCS8 fallback of RT3593 in TX status Ho Jie Feng
2026-10-31 10:54   ` Stanislaw Gruszka [this message]
2026-10-29 13:47 ` [PATCH wireless-next 5/8] wifi: rt2800: don't report an A-MPDU length to minstrel_ht Ho Jie Feng
2026-10-29 13:47 ` [PATCH wireless-next 6/8] wifi: rt2800: set the mac80211 fast-xmit and aggregation flags Ho Jie Feng
2026-10-30  9:17   ` Stanislaw Gruszka
2026-10-30 11:33     ` Jie Feng
2026-10-31 11:06       ` Stanislaw Gruszka
2026-10-31 17:18         ` Jie Feng
2026-10-31 17:23         ` Johannes Berg
2026-10-29 13:47 ` [PATCH wireless-next 7/8] wifi: rt2800usb: enable RX bulk aggregation Ho Jie Feng
2026-10-29 13:47 ` [PATCH wireless-next 8/8] wifi: rt2x00usb: use a threaded NAPI with GRO for RX Ho Jie Feng
2026-10-30  9:10 ` [PATCH wireless-next 0/8] wifi: rt2x00: improve the throughput of rt2800usb Stanislaw Gruszka
2026-10-30 11:30   ` Jie Feng

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=20261031105441.GC31143@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=hjf3108@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@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