]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - mpp.c
iw: bump version to 4.7
[thirdparty/iw.git] / mpp.c
diff --git a/mpp.c b/mpp.c
index 2d20d6bf98027e7294211e873db416598329c344..58bf28e713c9e000d8d983c07690aafd9f23216e 100644 (file)
--- a/mpp.c
+++ b/mpp.c
@@ -1,6 +1,5 @@
 #include <net/if.h>
 #include <errno.h>
-#include <string.h>
 
 #include <netlink/genl/genl.h>
 #include <netlink/genl/family.h>
@@ -37,7 +36,6 @@ static int print_mpp_handler(struct nl_msg *msg, void *arg)
 }
 
 static int handle_mpp_get(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -59,7 +57,7 @@ static int handle_mpp_get(struct nl80211_state *state,
 
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, dst);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_mpp_handler, NULL);
+       register_handler(print_mpp_handler, NULL);
 
        return 0;
  nla_put_failure:
@@ -70,13 +68,12 @@ COMMAND(mpp, get, "<MAC address>",
        "Get information on mesh proxy path to the given node.");
 
 static int handle_mpp_dump(struct nl80211_state *state,
-                            struct nl_cb *cb,
                             struct nl_msg *msg,
                             int argc, char **argv,
                             enum id_input id)
 {
        printf("DEST ADDR         PROXY NODE        IFACE\n");
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_mpp_handler, NULL);
+       register_handler(print_mpp_handler, NULL);
        return 0;
 }
 COMMAND(mpp, dump, NULL,