]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - mpath.c
iw: bump version to 4.7
[thirdparty/iw.git] / mpath.c
diff --git a/mpath.c b/mpath.c
index 8f0869840122426e3c04186959d3b3930117bd61..ff0b7419fd2be08888b7801956f9967a36b6fbb0 100644 (file)
--- a/mpath.c
+++ b/mpath.c
@@ -23,12 +23,6 @@ enum plink_state {
        BLOCKED
 };
 
-enum plink_actions {
-       PLINK_ACTION_UNDEFINED,
-       PLINK_ACTION_OPEN,
-       PLINK_ACTION_BLOCK,
-};
-
 
 static int print_mpath_handler(struct nl_msg *msg, void *arg)
 {
@@ -97,7 +91,6 @@ static int print_mpath_handler(struct nl_msg *msg, void *arg)
 }
 
 static int handle_mpath_get(struct nl80211_state *state,
-                           struct nl_cb *cb,
                            struct nl_msg *msg,
                            int argc, char **argv,
                            enum id_input id)
@@ -119,7 +112,7 @@ static int handle_mpath_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_mpath_handler, NULL);
+       register_handler(print_mpath_handler, NULL);
 
        return 0;
  nla_put_failure:
@@ -133,7 +126,6 @@ COMMAND(mpath, del, "<MAC address>",
        "Remove the mesh path to the given node.");
 
 static int handle_mpath_set(struct nl80211_state *state,
-                           struct nl_cb *cb,
                            struct nl_msg *msg,
                            int argc, char **argv,
                            enum id_input id)
@@ -169,7 +161,7 @@ static int handle_mpath_set(struct nl80211_state *state,
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, dst);
        NLA_PUT(msg, NL80211_ATTR_MPATH_NEXT_HOP, ETH_ALEN, next_hop);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_mpath_handler, NULL);
+       register_handler(print_mpath_handler, NULL);
        return 0;
  nla_put_failure:
        return -ENOBUFS;
@@ -182,14 +174,13 @@ COMMAND(mpath, set, "<destination MAC address> next_hop <next hop MAC address>",
        "Set an existing mesh path's next hop.");
 
 static int handle_mpath_dump(struct nl80211_state *state,
-                            struct nl_cb *cb,
                             struct nl_msg *msg,
                             int argc, char **argv,
                             enum id_input id)
 {
        printf("DEST ADDR         NEXT HOP          IFACE\tSN\tMETRIC\tQLEN\t"
               "EXPTIME\t\tDTIM\tDRET\tFLAGS\n");
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_mpath_handler, NULL);
+       register_handler(print_mpath_handler, NULL);
        return 0;
 }
 COMMAND(mpath, dump, NULL,