Search Linux Wireless

RE: [PATCH v2 3/9] cfg80211: add add_nan_func / rm_nan_func

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

 



> -----Original Message-----
> From: Arend Van Spriel [mailto:arend.vanspriel@xxxxxxxxxxxx]
> Sent: Sunday, September 18, 2016 22:54
> To: Luca Coelho <luca@xxxxxxxxx>; johannes@xxxxxxxxxxxxxxxx
> Cc: linux-wireless@xxxxxxxxxxxxxxx; Beker, Ayala <ayala.beker@xxxxxxxxx>;
> Otcheretianski, Andrei <andrei.otcheretianski@xxxxxxxxx>; Grumbach,
> Emmanuel <emmanuel.grumbach@xxxxxxxxx>; Coelho, Luciano
> <luciano.coelho@xxxxxxxxx>
> Subject: Re: [PATCH v2 3/9] cfg80211: add add_nan_func / rm_nan_func
> 
> On 16-9-2016 10:33, Luca Coelho wrote:
> > From: Ayala Beker <ayala.beker@xxxxxxxxx>
> >
> > A NAN function can be either publish, subscribe or follow up. Make all
> > the necessary verifications and just pass the request to the driver.
> > Allow the user space application that starts NAN to forbid any other
> > socket to add or remove functions.
> >
> > Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@xxxxxxxxx>
> > Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
> > Signed-off-by: Ayala Beker <ayala.beker@xxxxxxxxx>
> > Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
> > ---
> 
> [...]
> 
> > diff --git a/include/uapi/linux/nl80211.h
> > b/include/uapi/linux/nl80211.h index 7ab18c8..ab16c8e 100644
> > --- a/include/uapi/linux/nl80211.h
> > +++ b/include/uapi/linux/nl80211.h
> > @@ -847,6 +847,24 @@
> >   *	After this command NAN functions can be added.
> >   * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by
> >   *	its %NL80211_ATTR_WDEV interface.
> > + * @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The
> function is defined
> > + *	with %NL80211_ATTR_NAN_FUNC nested attribute. When called,
> this
> > + *	operation returns the strictly positive and unique instance id
> > + *	(%NL80211_ATTR_NAN_FUNC_INST_ID) and a cookie
> (%NL80211_ATTR_COOKIE)
> > + *	of the function upon success.
> > + *	Since instance ID's can be re-used, this cookie is the right
> > + *	way to identify the function. This will avoid races when a termination
> > + *	event is handled by the user space after it has already added a new
> > + *	function that got the same instance id from the kernel as the one
> > + *	which just terminated.
> > + *	This cookie may be used in NAN events even before the command
> > + *	returns, so userspace shouldn't process NAN events until it
> processes
> > + *	the response to this command.
> > + *	Look at %NL80211_ATTR_SOCKET_OWNER as well.
> > + * @NL80211_CMD_RM_NAN_FUNCTION: Remove a NAN function by
> cookie.
> > + *	This command is also used as a notification sent when a NAN function
> is
> > + *	terminated. This will contain a %NL80211_ATTR_NAN_FUNC_INST_ID
> > + *	and %NL80211_ATTR_COOKIE attributes.
> 
> This patch does not show the notification scenario as it is added in patch 6. So
> those three lines could be added by that patch instead to keep things
> logically together.
> 

Good point. Thanks

> Regards,
> Arend



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

  Powered by Linux