mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Cc: Dan Callaghan <dan.callaghan@morsemicro.com>,
	Arien Judge	 <arien.judge@morsemicro.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt	 <justinstitt@google.com>,
	ayman.grais@morsemicro.com, 	linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, 	llvm@lists.linux.dev
Subject: Re: [PATCH wireless-next v2 12/31] wifi: mm81x: add mac.c
Date: Fri, 05 Jun 2026 09:28:09 +0200	[thread overview]
Message-ID: <93fee0ae9311d6c1e0d72c2c6b15be2de70f3d20.camel@sipsolutions.net> (raw)
In-Reply-To: <aqbfc2k7xdlggjchxuuklzliuu7cutoqwemjc72zrghhrvwf5f@gqnz7wyqirxx> (sfid-20260605_082632_698815_0923094C)

On Fri, 2026-06-05 at 16:26 +1000, Lachlan Hodges wrote:
> Hi Johannes, just having a think about how to do this:
> 
> On Thu, Jun 04, 2026 at 01:46:32PM +0200, Johannes Berg wrote:
> > 
> > > +static void mm81x_mac_ops_flush(struct ieee80211_hw *hw,
> > > +				struct ieee80211_vif *vif, u32 queues,
> > > +				bool drop)
> > > +{
> > > +	struct mm81x *mors = hw->priv;
> > > +
> > > +	/* We don't support IEEE80211_HW_QUEUE_CONTROL so flush all queues */
> > > +	if (drop) {
> > > +		/*
> > > +		 * No need to call mm81x_skbq_stop_tx_queues as mac80211
> > > +		 * has already cancelled each queue prior to calling .flush()
> > > +		 */
> > > +		mm81x_skbq_data_traffic_pause(mors);
> > > +
> > > +		flush_work(&mors->hif_work);
> > > +		flush_work(&mors->tx_stale_work);
> > > +
> > > +		mm81x_hif_clear_events(mors);
> > > +		mm81x_hif_flush_tx_data(mors);
> > > +		mm81x_hif_flush_cmds(mors);
> > > +
> > > +		/* Reenable data, not that there will be any */
> > > +		mm81x_skbq_data_traffic_resume(mors);
> > > +	}
> > > +}
> > 
> > Doing nothing in the !drop case seems questionable - mac80211 uses this
> > sometimes to e.g. make sure a deauth frame really went out before
> > shutting down the hardware.
> 
> What is the consensus 

No idea ;-)

> (or I guess your opinion) on using
> read_poll_timeout() with a function that isn't really doing any real
> I/O but rather just reading software queue state?

[snip]

> It is fairly easy to opencode something similar, but this looks nice :)
> though I can't see many examples of using it like this so I am
> a bit cautious.

I think the more common way to do this would be to have an explicit
waitq so you don't have to poll, and trigger that whenever the queues
become empty.

With hardware you often don't have a signal so you have to poll, though
in some cases if you have an interrupt you'd prefer that too.

johannes

  reply	other threads:[~2026-06-05  7:28 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260430045615.334669-1-lachlan.hodges@morsemicro.com>
2026-04-30  4:55 ` [PATCH wireless-next v2 01/31] wifi: mm81x: add bus.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 02/31] wifi: mm81x: add command.c Lachlan Hodges
2026-06-04 11:32   ` Johannes Berg
2026-04-30  4:55 ` [PATCH wireless-next v2 03/31] wifi: mm81x: add command_defs.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 04/31] wifi: mm81x: add command.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 05/31] wifi: mm81x: add core.c Lachlan Hodges
2026-05-01  5:45   ` Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 06/31] wifi: mm81x: add core.h Lachlan Hodges
2026-06-04 11:39   ` Johannes Berg
2026-06-04 11:40   ` Johannes Berg
2026-06-10  5:06     ` Lachlan Hodges
2026-06-10  6:22       ` Johannes Berg
2026-06-22  6:10     ` Lachlan Hodges
2026-07-06  8:44       ` Johannes Berg
2026-04-30  4:55 ` [PATCH wireless-next v2 07/31] wifi: mm81x: add fw.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 08/31] wifi: mm81x: add fw.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 09/31] wifi: mm81x: add hif.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 10/31] wifi: mm81x: add hw.c Lachlan Hodges
2026-06-04 11:42   ` Johannes Berg
2026-04-30  4:55 ` [PATCH wireless-next v2 11/31] wifi: mm81x: add hw.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 12/31] wifi: mm81x: add mac.c Lachlan Hodges
2026-06-04 11:46   ` Johannes Berg
2026-06-05  1:36     ` Lachlan Hodges
2026-06-05  6:26     ` Lachlan Hodges
2026-06-05  7:28       ` Johannes Berg [this message]
2026-04-30  4:55 ` [PATCH wireless-next v2 13/31] wifi: mm81x: add mac.h Lachlan Hodges
2026-06-04 11:48   ` Johannes Berg
2026-04-30  4:55 ` [PATCH wireless-next v2 14/31] wifi: mm81x: add mmrc.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 15/31] wifi: mm81x: add mmrc.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 16/31] wifi: mm81x: add ps.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 17/31] wifi: mm81x: add ps.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 18/31] wifi: mm81x: add rate_code.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 19/31] wifi: mm81x: add rc.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 20/31] wifi: mm81x: add rc.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 21/31] mmc: sdio: add Morse Micro vendor ids Lachlan Hodges
2026-05-11 14:54   ` Ulf Hansson
2026-04-30  4:55 ` [PATCH wireless-next v2 22/31] wifi: mm81x: add sdio.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 23/31] wifi: mm81x: add skbq.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 24/31] wifi: mm81x: add skbq.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 25/31] wifi: mm81x: add usb.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 26/31] wifi: mm81x: add yaps.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 27/31] wifi: mm81x: add yaps.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 28/31] wifi: mm81x: add yaps_hw.c Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 29/31] wifi: mm81x: add yaps_hw.h Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 30/31] wifi: mm81x: add Kconfig and Makefile Lachlan Hodges
2026-04-30  4:55 ` [PATCH wireless-next v2 31/31] wifi: mm81x: add MAINTAINERS entry Lachlan Hodges

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=93fee0ae9311d6c1e0d72c2c6b15be2de70f3d20.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arien.judge@morsemicro.com \
    --cc=ayman.grais@morsemicro.com \
    --cc=dan.callaghan@morsemicro.com \
    --cc=justinstitt@google.com \
    --cc=lachlan.hodges@morsemicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@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

all inboxes | Powered by JetHome®