diff mbox

[7/8] Add flag for DFS handling in IBSS

Message ID 20161107145943.16761-8-benjamin@sipsolutions.net (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show

Commit Message

Benjamin Berg Nov. 7, 2016, 2:59 p.m. UTC
From: Simon Wunderlich <sw@simonwunderlich.de>

When Userspace is capable of handling DFS, it can inform the kernel
about that by sending the NL80211_ATTR_HANDLE_DFS attribute when joining
an IBSS. DFS channels will then be unlocked.

Note that this flag is only added for debugging purposes and therefore
hidden from the user by prefixing with __ and not documenting it.

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com>
---
 ibss.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/ibss.c b/ibss.c
index 84f1e95..7087cc9 100644
--- a/ibss.c
+++ b/ibss.c
@@ -47,6 +47,12 @@  static int join_ibss(struct nl80211_state *state,
 		argc--;
 	}
 
+	if (argc && strcmp(argv[0], "__dfs-enable") == 0) {
+		NLA_PUT_FLAG(msg, NL80211_ATTR_HANDLE_DFS);
+		argv++;
+		argc--;
+	}
+
 	if (argc) {
 		if (mac_addr_a2n(abssid, argv[0]) == 0) {
 			NLA_PUT(msg, NL80211_ATTR_MAC, 6, abssid);