Search Linux Wireless

Re: [PATCH 1/2] nl80211: Add NL80211_EXT_FEATURE_LIVE_IFTYPE_CHANGE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux