]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - reg.c
iw: add scheduled scan plans configuration
[thirdparty/iw.git] / reg.c
diff --git a/reg.c b/reg.c
index 79843aac7e0e1d7dae2dab2103972e86ad60bd73..cee0b5e8cedbe09d1908965e8426f5f6c58b33db 100644 (file)
--- a/reg.c
+++ b/reg.c
@@ -1,4 +1,3 @@
-#include <net/if.h>
 #include <errno.h>
 #include <string.h>
 #include <stdbool.h>
@@ -205,7 +204,7 @@ static int print_reg_handler(struct nl_msg *msg, void *arg)
                PARSE_FLAG(NL80211_RRF_DFS, "DFS");
                PARSE_FLAG(NL80211_RRF_PTP_ONLY, "PTP-ONLY");
                PARSE_FLAG(NL80211_RRF_AUTO_BW, "AUTO-BW");
-               PARSE_FLAG(NL80211_RRF_GO_CONCURRENT, "GO-CONCURRENT");
+               PARSE_FLAG(NL80211_RRF_IR_CONCURRENT, "IR-CONCURRENT");
                PARSE_FLAG(NL80211_RRF_NO_HT40MINUS, "NO-HT40MINUS");
                PARSE_FLAG(NL80211_RRF_NO_HT40PLUS, "NO-HT40PLUS");
                PARSE_FLAG(NL80211_RRF_NO_80MHZ, "NO-80MHZ");
@@ -245,14 +244,14 @@ static int handle_reg_get(struct nl80211_state *state,
        int err;
 
        err = handle_cmd(state, CIB_NONE, 2, dump_args);
-       /* dump might fail since it's not supported on older kernels */
-       if (err == -EOPNOTSUPP) {
-               register_handler(print_reg_handler,
-                         NULL);
+       /*
+        * dump might fail since it's not supported on older kernels,
+        * in that case the handler is still registered already
+        */
+       if (err == -EOPNOTSUPP)
                return 0;
-       }
 
-       return err;
+       return err ?: HANDLER_RET_DONE;
 }
 COMMAND(reg, get, NULL, NL80211_CMD_GET_REG, 0, CIB_NONE, handle_reg_get,
        "Print out the kernel's current regulatory domain information.");