public inbox for linux-wireless@vger.kernel.org
 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>
Subject: RE: [PATCH] wifi: rtlwifi: pci: Fix condition to wake the queues
Date: Thu, 27 Feb 2025 00:49:33 +0000	[thread overview]
Message-ID: <7306830ca082470d80f9a6d04329807c@realtek.com> (raw)
In-Reply-To: <609560e0-8393-4feb-8153-0c6147598763@gmail.com>

Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> On 19/02/2025 08:20, Ping-Ke Shih wrote:
> > Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> >> The TX queues should be woken when there are at least 4 available
> >> entries, not when there are at most 4.
> >>
> >> Tested with RTL8821AE.
> >>
> >> Fixes: d0311314d002 ("rtlwifi: rtl8192ee: Fix handling of new style descriptors")
> >
> > I agree your change looks more reasonable. Did you really meet the case
> > and this patch solves it?
> >
> > By the changes of d0311314d002, I can't really understand why the initial
> > version and the commit do. Considering the commit "fix" some situations,
> > I don't know if this patch would break them again. Could you look into
> > rtlwifi PCI flow deeper and share your ideas?
> >
> 
> I saw several problems with rtl8821ae but I can't say if this
> patch fixes any of them:
> 
> - After a few hours it randomly stops receiving beacons and data
>   frames for at least 10 seconds ("AP off, try to reconnect now"
>   in dmesg). Then it may or may not be able to reconnect.

Is interrupt counter increasing in /proc/interrupt?
If not, check if driver ISR (interrupt status register) manually to see
if it received data but not issue interrupt to host properly.
However, if no any of these, it will be WiFi problem, not PCI.

To bisect WiFi problem, we may stop doing rtl_watchdog_wq_callback() to
avoid changing registers dynamically. 

> 
> - Sometimes the TX speed measured by iperf3 is limited to ~80 Mbps.
>   Normally it's over 250.

I suggest to check PHY rate first and MSDU aggregation by sniffer.
Not sure if rtlwifi can be monitor mode, but very sure rtw88 does. 

> 
> - Sometimes there are duplicate pings:
>       19 packets transmitted, 14 received, +151 duplicates, 26.3158% packet loss, time 18098ms

I have never dug this kind of problem, but I suggest to check sniffer
first.  

> 
> - Testing the RX speed with iperf3 sometimes makes the mouse cursor
>   stutter. (It's usually ~300 Mbps.)

If here is Bluetooth mouse, it will be a BT-coexistence problem. If not,
I feel CPU becomes exhausted or huge amount of interrupts at that time.

> 
> I don't know how to reproduce any of these.

If users want/can help to dig problem, please try above suggestions. 



  reply	other threads:[~2025-02-27  0:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 21:42 [PATCH] wifi: rtlwifi: pci: Fix condition to wake the queues Bitterblue Smith
2025-02-19  6:20 ` Ping-Ke Shih
2025-02-26 22:50   ` Bitterblue Smith
2025-02-27  0:49     ` Ping-Ke Shih [this message]
2025-02-26  1:47 ` 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=7306830ca082470d80f9a6d04329807c@realtek.com \
    --to=pkshih@realtek.com \
    --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