linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] nl80211: Add NL80211_EXT_FEATURE_LIVE_IFTYPE_CHANGE
Date: Fri, 30 Aug 2019 11:55:13 -0500	[thread overview]
Message-ID: <73e78b3e-f36a-aa29-a818-e0e1f0598b2f@gmail.com> (raw)
In-Reply-To: <f5986ccd8ecdcc08d5c3e0d65f8bddef8b0af021.camel@sipsolutions.net>

Hi Johannes,

On 8/30/19 5:19 AM, Johannes Berg wrote:
> On Mon, 2019-08-26 at 11:26 -0500, Denis Kenzior wrote:
>>
>> + *	Prior to Kernel 5.4, userspace applications should implement the
>> + *	following behavior:
> 
> I'm not sure mentioning the kernel version here does us any good? I
> mean, you really need to implement that behaviour regardless of kernel
> version, if NL80211_EXT_FEATURE_LIVE_IFTYPE_CHANGE isn't set.
> 

Agreed.  I guess I just view nl80211.h as a sort of combination between 
a uapi file and an actual manpage.  And manpages do mention which kernel 
version a certain feature/flag/whatever was added.  Such info can be 
useful in many ways, e.g. figuring out which kernel version might be 
required for a certain piece of hardware, etc.

Another point where this might be useful is if the kernel starts 
enforcing certain behavior that it didn't before.  E.g. I mentioned this 
in the purge thread that a lot of mode change failure cases could be 
caught if the kernel checked this flag prior to doing anything.

I really leave this up to you if this is something you think is a good 
idea or not.

>> + * @NL80211_EXT_FEATURE_LIVE_IFTYPE_CHANGE: This device supports switching
>> + * 	the IFTYPE of an interface without having to bring the device DOWN
>> + * 	first via RTNL.  Exact semantics of this feature is driver
>> + * 	implementation dependent.
> 
> That's not really nice.

Sorry.  This came from some doc changes I have pending.  I think I wrote 
this after looking at some fullmac drivers and how they handle mode 
changes and the wording reflects the exasperation I felt at the time.

Do you want to suggest some alternate wording?  I think it is worth it 
to have some fair warning in the docs stating that prior to version so 
and so the semantics are completely driver dependent.

> 
>> For mac80211, the following restrictions
>> + * 	apply:
>> + * 		- Only devices currently in IFTYPE AP, P2P_GO, P2P_CLIENT,
>> + * 		  STATION, ADHOC and OCB can be switched.
>> + * 		- The target IFTYPE must be one of: AP, P2P_GO, P2P_CLIENT,
>> + * 		  STATION, ADHOC or OCB.
>> + * 	Other drivers are expected to follow similar restrictions.
> 
> Maybe we should instead have a "bitmask of interface types that can be
> switched while live" or something like that?
> 

I'm fine with that, but this would only apply to newer kernels, no? 
Don't we at least want to attempt to state what the rules are for older 
ones?

An alternative might be to simply state what the restrictions are and 
just enforce those at the cfg80211 level.

Regards,
-Denis

  reply	other threads:[~2019-08-30 16:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 16:26 [PATCH 1/2] nl80211: Add NL80211_EXT_FEATURE_LIVE_IFTYPE_CHANGE Denis Kenzior
2019-08-26 16:26 ` [PATCH 2/2] mac80211: Set LIVE_IFTYPE_CHANGE if op provided Denis Kenzior
2019-08-30 10:19 ` [PATCH 1/2] nl80211: Add NL80211_EXT_FEATURE_LIVE_IFTYPE_CHANGE Johannes Berg
2019-08-30 16:55   ` Denis Kenzior [this message]
2019-09-11  8:37     ` 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=73e78b3e-f36a-aa29-a818-e0e1f0598b2f@gmail.com \
    --to=denkenz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).