All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Adding CMD_SET_CHANNEL for station iftypes
Date: Fri, 07 Jan 2022 11:35:32 -0800	[thread overview]
Message-ID: <58ebff51d64d1ae6b01d85cff7bb9e137e19848a.camel@gmail.com> (raw)
In-Reply-To: <d8250f97a2be736736374974095f219d858acb1e.camel@sipsolutions.net>

On Thu, 2022-01-06 at 23:01 +0100, Johannes Berg wrote:
> Hi Preston,
> 
> Ugh, sorry. I'm way behind on a whole bunch of emails (about 4 dozen
> to
> be honest) ... trying to catch up, but only so many hours a day.

No worries, thanks for getting to it :)

> 
> > So the use case here is to become provisioned with DPP, or discover
> > another P2P device. For example, you buy a light bulb, plug it in,
> > and
> > want to provision it. Going on channel for small amounts of time
> > can
> > only be detremental to the user experience since you are bound to
> > miss
> > these discovery type frames and delay the provisioning.
> 
> Right.
> 
> > As far as power goes, for at least the above use case, there really
> > isn't an argument. And its a stretch to find a use case of sitting
> > idle
> > as something that anyone wants to do at least for an unprovisioned
> > device that is looking to be configured.
> 
> Fair point.
> 
> > Would there even be a noticable difference in power usage between
> > the
> > two scenarios?
> > 
> >  - Sitting offchannel for 2 minutes
> >  - Issuing REMAIN_ON_CHANNEL repeatedly for 2 minutes
> 
> Probably not :)
> 
> > As far as cancelling CMD_SET_CHANNEL I totally agree. If a device
> > wants
> > to go idle for whatever reason that should definitely be possible.
> > I
> > think a timer could be avoided using SOCKET_OWNER. So if userspace
> > really 'forgets' (crashes or what have you) the device could still
> > be
> > brought to idle if that socket closes.
> 
> Oh, yeah, good point.
> 
> 
> However, looking at something like e.g. iwlwifi, there's no way to
> actually implement what you want, you can't, without a time event
> like
> one created by remain-on-channel, actually just "sit" on a channel.
> 
> So chances are that, even if we implement the API you'd like, it'd
> end
> up being optional and you'd have to support remain-on-channel usage
> like
> before, even for common devices like iwlwifi. (*)

Yes this is inevitable. But this method is really hit or miss honestly.
Each driver arbitrarily chooses its own duration, some as low as 500ms.
My specific iwlwifi card routinely locks up my entire system requring a
hard reboot when I repeatedly issue ROC OR will randomly not send the
ROC event (which I reported on the ML). But I digress.

> 
> At which point it's probably not really worth it? Emulating it in the
> driver by repeatedly issuing time events also seems like a bad idea,
> worse even than doing it in the application, since the application
> could
> at least try to synchronise it a bit with whatever it needs to be
> doing,
> whereas the driver can't do that at all.

If this is the case then sure, its just offloading the same nasty
procedure into the driver/FW. You know more than me about this topic
but I'm still trying to understand how this would differ much from AP
mode?

In my own mind I see SET_CHANNEL doing the same thing as START_AP, just
without sending out beacons/probes and the iftype being station. Maybe
this is an oversimplifation but it seems like the FW/driver *can* sit
on channel without some time constraint if it supports AP mode.

Thanks,
James

> 
> 
> (*) and I'm not even sure we can do anything else from a firmware
> perspective, or at least it'd probably be a complicated fw change
> 
> johannes



  reply	other threads:[~2022-01-07 19:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  0:11 Adding CMD_SET_CHANNEL for station iftypes James Prestwood
2021-11-19  8:31 ` Johannes Berg
2021-11-19 17:43   ` James Prestwood
2022-01-06 22:01     ` Johannes Berg
2022-01-07 19:35       ` James Prestwood [this message]
2022-01-09 12:00         ` Arend van Spriel
2022-01-10 17:13           ` James Prestwood
2022-02-03 22:06             ` Johannes Berg

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=58ebff51d64d1ae6b01d85cff7bb9e137e19848a.camel@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=johannes@sipsolutions.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.