linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH v7 08/11] nl80211: Add control_port_over_nl80211 for ibss
Date: Mon, 26 Mar 2018 12:52:48 -0500	[thread overview]
Message-ID: <20180326175251.20666-9-denkenz@gmail.com> (raw)
In-Reply-To: <20180326175251.20666-1-denkenz@gmail.com>

Signed-off-by: Denis Kenzior <denkenz@gmail.com>
---
 include/net/cfg80211.h | 3 +++
 net/wireless/nl80211.c | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 2e7f30c66913..2a28f446648e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2033,6 +2033,8 @@ struct cfg80211_disassoc_request {
  *	sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is
  *	required to assume that the port is unauthorized until authorized by
  *	user space. Otherwise, port is marked authorized by default.
+ * @control_port_over_nl80211: TRUE if userspace expects to exchange control
+ *	port frames over NL80211 instead of the network interface.
  * @userspace_handles_dfs: whether user space controls DFS operation, i.e.
  *	changes the channel when a radar is detected. This is required
  *	to operate on DFS channels.
@@ -2056,6 +2058,7 @@ struct cfg80211_ibss_params {
 	bool channel_fixed;
 	bool privacy;
 	bool control_port;
+	bool control_port_over_nl80211;
 	bool userspace_handles_dfs;
 	int mcast_rate[NUM_NL80211_BANDS];
 	struct ieee80211_ht_cap ht_capa;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 34e8435f0c43..774f5d6ba8e4 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8702,6 +8702,15 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
 	ibss.control_port =
 		nla_get_flag(info->attrs[NL80211_ATTR_CONTROL_PORT]);
 
+	if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) {
+		int r = validate_pae_over_nl80211(rdev, info);
+
+		if (r < 0)
+			return r;
+
+		ibss.control_port_over_nl80211 = true;
+	}
+
 	ibss.userspace_handles_dfs =
 		nla_get_flag(info->attrs[NL80211_ATTR_HANDLE_DFS]);
 
-- 
2.13.5

  parent reply	other threads:[~2018-03-26 17:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 17:52 [PATCH v7 00/11] EAPoL over NL80211 Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 01/11] nl80211: Add CMD_CONTROL_PORT_FRAME API Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 02/11] nl80211: Implement TX of control port frames Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 03/11] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 04/11] cfg80211: Support all iftypes in autodisconnect_wk Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 05/11] nl80211: Add SOCKET_OWNER support to JOIN_IBSS Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 06/11] nl80211: Add SOCKET_OWNER support to JOIN_MESH Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 07/11] nl80211: Add SOCKET_OWNER support to START_AP Denis Kenzior
2018-03-26 17:52 ` Denis Kenzior [this message]
2018-03-26 17:52 ` [PATCH v7 09/11] nl80211: Add control_port_over_nl80211 to mesh_setup Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 10/11] mac80211: Add support for tx_control_port Denis Kenzior
2018-03-26 17:52 ` [PATCH v7 11/11] mac80211: Send control port frames over nl80211 Denis Kenzior
2018-03-27  8:03 ` [PATCH v7 00/11] EAPoL over NL80211 Arend van Spriel
2018-03-27 14:42   ` Denis Kenzior
2018-03-27 20:51     ` Arend van Spriel
2018-03-29 12:44 ` 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=20180326175251.20666-9-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --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).