aboutsummaryrefslogtreecommitdiff
path: root/coalesce.c
diff options
context:
space:
mode:
Diffstat (limited to 'coalesce.c')
-rw-r--r--coalesce.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/coalesce.c b/coalesce.c
index 0d80ceb..36dcaef 100644
--- a/coalesce.c
+++ b/coalesce.c
@@ -1,4 +1,3 @@
-#include <net/if.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
@@ -9,14 +8,12 @@
#include <netlink/msg.h>
#include <netlink/attr.h>
-#include <arpa/inet.h>
-
#include "nl80211.h"
#include "iw.h"
SECTION(coalesce);
-static int handle_coalesce_enable(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_coalesce_enable(struct nl80211_state *state,
struct nl_msg *msg, int argc, char **argv,
enum id_input id)
{
@@ -185,7 +182,7 @@ COMMAND(coalesce, enable, "<config-file>",
"match '43:34:00:12' after 18 bytes of offset in Rx packet.\n");
static int
-handle_coalesce_disable(struct nl80211_state *state, struct nl_cb *cb,
+handle_coalesce_disable(struct nl80211_state *state,
struct nl_msg *msg, int argc, char **argv,
enum id_input id)
{
@@ -274,12 +271,11 @@ static int print_coalesce_handler(struct nl_msg *msg, void *arg)
return NL_SKIP;
}
-static int handle_coalesce_show(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_coalesce_show(struct nl80211_state *state,
struct nl_msg *msg, int argc, char **argv,
enum id_input id)
{
- nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM,
- print_coalesce_handler, NULL);
+ register_handler(print_coalesce_handler, NULL);
return 0;
}