From: Simon Wunderlich <[email protected]>

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 <[email protected]>
Signed-off-by: Benjamin Berg <[email protected]>
---
 ibss.c | 6 ++++++
 1 file changed, 6 insertions(+)

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);
-- 
2.10.2

Reply via email to