Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Ping-Ke Shih" <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH rtw-next] wifi: rtw88: sdio: limit the high queue to DTIM delivery
Date: Wed, 21 Oct 2026 04:47:29 +0000	[thread overview]
Message-ID: <bbdb0b32d88cc23641a0da4e2e9aedabf7a77fb2@linux.dev> (raw)
In-Reply-To: <1afaced93a78c382447af6c0f6cb209ba872e357@linux.dev>

October 21, 2026 at 6:23 AM, "Luka Gejak" <luka.gejak@linux.dev> wrote:


> 
> October 21, 2026 at 3:34 AM, "Ping-Ke Shih" <pkshih@realtek.com> wrote:
> 
> > 
> > Luka Gejak <luka.gejak@linux.dev> wrote:
> >  
> >  
[...]
> >  This is totally the same as USB. To share with USB, move it to tx.c 
> >  as an export function or to tx.h as an inline function.
> > 
> I am aware of that, but ai wasn't sure

                          *I wasn't sure

 what is preferred approach so I
> resorted to changing as little shared code as possible to mitigate the
> risk of regression on other drivers. I will make it shared between USB
> and SDIO.
> 
> > 
> > +
> >  +static bool rtw_sdio_hiq_take_budget(struct rtw_sdio *rtwsdio)
> >  +{
> >  + unsigned long flags, elapsed, add;
> >  + bool ok;
> >  +
> >  + spin_lock_irqsave(&rtwsdio->hiq_lock, flags);
> >  +
> >  + elapsed = jiffies - rtwsdio->hiq_refill;
> >  + add = elapsed / RTW_SDIO_HIQ_REFILL_INTERVAL;
> >  + if (add) {
> >  + rtwsdio->hiq_budget = min_t(unsigned long,
> >  + rtwsdio->hiq_budget + add,
> >  + RTW_SDIO_HIQ_BUDGET_MAX);
> >  +
> >  + /* keep the unfinished part of the interval for the next unit */
> >  + rtwsdio->hiq_refill = jiffies -
> >  + elapsed % RTW_SDIO_HIQ_REFILL_INTERVAL;
> >  + }
> >  +
> >  + ok = rtwsdio->hiq_budget > 0;
> >  + if (ok)
> >  + rtwsdio->hiq_budget--;
> >  +
> >  + spin_unlock_irqrestore(&rtwsdio->hiq_lock, flags);
> >  +
> >  + return ok;
> >  +}
> >  
> >  This is also the same as USB. Please consider how to share the logic.
> > 
> Same as above.
> 
> Best regards,
> Luka Gejak
>

      reply	other threads:[~2026-10-21  4:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 19:15 [PATCH rtw-next] wifi: rtw88: sdio: limit the high queue to DTIM delivery Luka Gejak
2026-10-21  1:34 ` Ping-Ke Shih
2026-10-21  4:23   ` Luka Gejak
2026-10-21  4:47     ` Luka Gejak [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=bbdb0b32d88cc23641a0da4e2e9aedabf7a77fb2@linux.dev \
    --to=luka.gejak@linux.dev \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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