Re: [RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 10:01 -0500, Denis Kenzior wrote: > Hi Johannes, > > On 03/21/2018 02:47 AM, Johannes Berg wrote: > > On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: > > > > > > + if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) { > > > + if

Re: [RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-21 Thread Denis Kenzior
Hi Johannes, On 03/21/2018 02:47 AM, Johannes Berg wrote: On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: + if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) { + if (!info->attrs[NL80211_ATTR_SOCKET_OWNER]) + return -EINVAL; There

Re: [RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-21 Thread Johannes Berg
On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: > > + if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) { > + if (!info->attrs[NL80211_ATTR_SOCKET_OWNER]) > + return -EINVAL; > There might be value in adding GENL_SET_ERR_MSG() calls to new

[RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-13 Thread Denis Kenzior
Signed-off-by: Denis Kenzior --- include/net/cfg80211.h | 3 +++ include/uapi/linux/nl80211.h | 14 +- net/wireless/nl80211.c | 13 + 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h