Hello community,

here is the log from the commit of package iw for openSUSE:Factory checked in 
at 2015-10-14 16:37:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/iw (Old)
 and      /work/SRC/openSUSE:Factory/.iw.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "iw"

Changes:
--------
--- /work/SRC/openSUSE:Factory/iw/iw.changes    2015-09-11 09:01:25.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.iw.new/iw.changes       2015-10-14 
16:37:48.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Sep 28 09:52:13 UTC 2015 - [email protected]
+
+- Update to 4.3
+  * Support all new kernel features upto 4.3
+
+-------------------------------------------------------------------

Old:
----
  iw-4.1.tar.xz

New:
----
  iw-4.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ iw.spec ++++++
--- /var/tmp/diff_new_pack.HWTQLL/_old  2015-10-14 16:37:49.000000000 +0200
+++ /var/tmp/diff_new_pack.HWTQLL/_new  2015-10-14 16:37:49.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           iw
-Version:        4.1
+Version:        4.3
 Release:        0
 Summary:        Configuration utility for nl80211 based wireless drivers
 License:        ISC

++++++ iw-4.1.tar.xz -> iw-4.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/Android.mk new/iw-4.3/Android.mk
--- old/iw-4.1/Android.mk       2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/Android.mk       2015-09-18 10:54:53.000000000 +0200
@@ -7,17 +7,13 @@
 NO_PKG_CONFIG=y
 include $(LOCAL_PATH)/Makefile
 
-LOCAL_SRC_FILES := $(patsubst %.o,%.c,$(OBJS)) android-nl.c
-
-LOCAL_C_INCLUDES := \
-       $(LOCAL_PATH) \
-       external/libnl-headers/
+LOCAL_SRC_FILES := $(patsubst %.o,%.c,$(OBJS))
 
 LOCAL_CFLAGS += -DCONFIG_LIBNL20
 LOCAL_LDFLAGS := -Wl,--no-gc-sections
 #LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_TAGS := eng
-LOCAL_STATIC_LIBRARIES := libnl_2
+LOCAL_STATIC_LIBRARIES := libnl
 LOCAL_MODULE := iw
 
 $(IW_SOURCE_DIR)/version.c:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/android-nl.c new/iw-4.3/android-nl.c
--- old/iw-4.1/android-nl.c     2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/android-nl.c     1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#include <netlink/attr.h>
-
-int nla_put_flag(struct nl_msg *msg, int flag)
-{
-       return nla_put(msg, flag, 0, NULL);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/bitrate.c new/iw-4.3/bitrate.c
--- old/iw-4.1/bitrate.c        2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/bitrate.c        2015-09-18 10:54:53.000000000 +0200
@@ -77,7 +77,6 @@
 #define VHT_ARGC_MAX   100
 
 static int handle_bitrates(struct nl80211_state *state,
-                          struct nl_cb *cb,
                           struct nl_msg *msg,
                           int argc, char **argv,
                           enum id_input id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/coalesce.c new/iw-4.3/coalesce.c
--- old/iw-4.1/coalesce.c       2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/coalesce.c       2015-09-18 10:54:53.000000000 +0200
@@ -16,7 +16,7 @@
 
 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 +185,7 @@
        "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 +274,11 @@
        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;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/connect.c new/iw-4.3/connect.c
--- old/iw-4.1/connect.c        2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/connect.c        2015-09-18 10:54:53.000000000 +0200
@@ -9,7 +9,7 @@
 #include "nl80211.h"
 #include "iw.h"
 
-static int iw_conn(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_conn(struct nl80211_state *state,
                   struct nl_msg *msg, int argc, char **argv,
                   enum id_input id)
 {
@@ -59,7 +59,6 @@
 }
 
 static int disconnect(struct nl80211_state *state,
-                     struct nl_cb *cb,
                      struct nl_msg *msg,
                      int argc, char **argv,
                      enum id_input id)
@@ -70,7 +69,7 @@
        NL80211_CMD_DISCONNECT, 0, CIB_NETDEV, disconnect,
        "Disconnect from the current network.");
 
-static int iw_connect(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_connect(struct nl80211_state *state,
                      struct nl_msg *msg, int argc, char **argv,
                      enum id_input id)
 {
@@ -146,7 +145,7 @@
        "With -w, wait for the connect to finish or fail.");
 HIDDEN(connect, establish, "", NL80211_CMD_CONNECT, 0, CIB_NETDEV, iw_conn);
 
-static int iw_auth(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_auth(struct nl80211_state *state,
                   struct nl_msg *msg, int argc, char **argv,
                   enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/cqm.c new/iw-4.3/cqm.c
--- old/iw-4.1/cqm.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/cqm.c    2015-09-18 10:54:53.000000000 +0200
@@ -9,7 +9,7 @@
 #include "nl80211.h"
 #include "iw.h"
 
-static int iw_cqm_rssi(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_cqm_rssi(struct nl80211_state *state,
                       struct nl_msg *msg, int argc, char **argv,
                       enum id_input id)
 {
@@ -34,6 +34,8 @@
 
        /* connection quality monitor attributes */
        cqm = nlmsg_alloc();
+       if (!cqm)
+               return -ENOMEM;
 
        NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_THOLD, thold);
        NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hyst);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/event.c new/iw-4.3/event.c
--- old/iw-4.1/event.c  2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/event.c  2015-09-18 10:54:53.000000000 +0200
@@ -49,8 +49,10 @@
        char macbuf[6*3];
        uint16_t tmp;
 
-       if (!attr)
+       if (!attr) {
                printf(" [no frame]");
+               return;
+       }
 
        frame = nla_data(attr);
        len = nla_len(attr);
@@ -140,16 +142,22 @@
 
                if (!found_one)
                        printf("Unknown event type: %i\n", rssi_event);
-       } else if (cqm[NL80211_ATTR_CQM_PKT_LOSS_EVENT] &&
-                  attrs[NL80211_ATTR_MAC]) {
-               uint32_t frames;
-               char buf[3*6];
-
-               frames = nla_get_u32(cqm[NL80211_ATTR_CQM_PKT_LOSS_EVENT]);
-               mac_addr_n2a(buf, nla_data(attrs[NL80211_ATTR_MAC]));
-               printf("peer %s didn't ACK %d packets\n", buf, frames);
-       } else
+       } else if (cqm[NL80211_ATTR_CQM_PKT_LOSS_EVENT]) {
+               if (attrs[NL80211_ATTR_MAC]) {
+                       uint32_t frames;
+                       char buf[3*6];
+
+                       frames = 
nla_get_u32(cqm[NL80211_ATTR_CQM_PKT_LOSS_EVENT]);
+                       mac_addr_n2a(buf, nla_data(attrs[NL80211_ATTR_MAC]));
+                       printf("peer %s didn't ACK %d packets\n", buf, frames);
+               } else {
+                       printf("PKT-LOSS-EVENT did not have MAC attribute!\n");
+               }
+       } else if (cqm[NL80211_ATTR_CQM_BEACON_LOSS_EVENT]) {
+               printf("beacon loss\n");
+       } else {
                printf("unknown event\n");
+       }
 }
 
 static const char * key_type_str(enum nl80211_key_type key_type)
@@ -599,6 +607,9 @@
                }
                printf("\n");
                break;
+       case NL80211_CMD_DEL_WIPHY:
+               printf("delete wiphy\n");
+               break;
        default:
                printf("unknown event %d (%s)\n",
                       gnlh->cmd, command_name(gnlh->cmd));
@@ -694,14 +705,15 @@
 
        /* no sequence checking for multicast messages */
        nl_cb_set(cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);
+       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, valid_handler, NULL);
 
        if (n_waits && waits) {
                wait_ev.cmds = waits;
                wait_ev.n_cmds = n_waits;
                wait_ev.pargs = args;
-               nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, wait_event, &wait_ev);
+               register_handler(wait_event, &wait_ev);
        } else
-               nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_event, args);
+               register_handler(print_event, args);
 
        wait_ev.cmd = 0;
 
@@ -726,7 +738,6 @@
 }
 
 static int print_events(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/hwsim.c new/iw-4.3/hwsim.c
--- old/iw-4.1/hwsim.c  2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/hwsim.c  2015-09-18 10:54:53.000000000 +0200
@@ -52,7 +52,7 @@
        return NL_SKIP;
 }
 
-static int handle_hwsim_getps(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_hwsim_getps(struct nl80211_state *state,
                              struct nl_msg *msg, int argc, char **argv,
                              enum id_input id)
 {
@@ -66,15 +66,14 @@
 
        nla_nest_end(msg, tmdata);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM,
-                 print_hwsim_ps_handler, NULL);
+       register_handler(print_hwsim_ps_handler, NULL);
        return 0;
  nla_put_failure:
        return -ENOBUFS;
 }
 COMMAND(hwsim, getps, "", NL80211_CMD_TESTMODE, 0, CIB_PHY, 
handle_hwsim_getps, "");
 
-static int handle_hwsim_setps(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_hwsim_setps(struct nl80211_state *state,
                              struct nl_msg *msg, int argc, char **argv,
                              enum id_input id)
 {
@@ -98,15 +97,14 @@
 
        nla_nest_end(msg, tmdata);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM,
-                 print_hwsim_ps_handler, NULL);
+       register_handler(print_hwsim_ps_handler, NULL);
        return 0;
  nla_put_failure:
        return -ENOBUFS;
 }
 COMMAND(hwsim, setps, "<value>", NL80211_CMD_TESTMODE, 0, CIB_PHY, 
handle_hwsim_setps, "");
 
-static int handle_hwsim_stop_queues(struct nl80211_state *state, struct nl_cb 
*cb,
+static int handle_hwsim_stop_queues(struct nl80211_state *state,
                                    struct nl_msg *msg, int argc, char **argv,
                                    enum id_input id)
 {
@@ -128,7 +126,7 @@
 }
 COMMAND(hwsim, stopqueues, "", NL80211_CMD_TESTMODE, 0, CIB_PHY, 
handle_hwsim_stop_queues, "");
 
-static int handle_hwsim_wake_queues(struct nl80211_state *state, struct nl_cb 
*cb,
+static int handle_hwsim_wake_queues(struct nl80211_state *state,
                                    struct nl_msg *msg, int argc, char **argv,
                                    enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/ibss.c new/iw-4.3/ibss.c
--- old/iw-4.1/ibss.c   2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/ibss.c   2015-09-18 10:54:53.000000000 +0200
@@ -17,7 +17,6 @@
 SECTION(ibss);
 
 static int join_ibss(struct nl80211_state *state,
-                    struct nl_cb *cb,
                     struct nl_msg *msg,
                     int argc, char **argv,
                     enum id_input id)
@@ -183,7 +182,6 @@
 }
 
 static int leave_ibss(struct nl80211_state *state,
-                     struct nl_cb *cb,
                      struct nl_msg *msg,
                      int argc, char **argv,
                      enum id_input id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/info.c new/iw-4.3/info.c
--- old/iw-4.1/info.c   2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/info.c   2015-09-18 10:54:53.000000000 +0200
@@ -645,7 +645,6 @@
 static bool nl80211_has_split_wiphy = false;
 
 static int handle_info(struct nl80211_state *state,
-                      struct nl_cb *cb,
                       struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
@@ -659,7 +658,7 @@
                nlmsg_hdr(msg)->nlmsg_flags |= NLM_F_DUMP;
        }
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_phy_handler, NULL);
+       register_handler(print_phy_handler, NULL);
 
        return 0;
 }
@@ -669,12 +668,11 @@
         "List all wireless devices and their capabilities.");
 TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, 
NULL);
 
-static int handle_commands(struct nl80211_state *state,
-                          struct nl_cb *cb, struct nl_msg *msg,
+static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
                           int argc, char **argv, enum id_input id)
 {
        int i;
-       for (i = 1; i < NL80211_CMD_MAX; i++)
+       for (i = 1; i <= NL80211_CMD_MAX; i++)
                printf("%d (0x%x): %s\n", i, i, command_name(i));
        /* don't send netlink messages */
        return 2;
@@ -705,12 +703,11 @@
        return NL_SKIP;
 }
 
-static int handle_features(struct nl80211_state *state,
-                          struct nl_cb *cb, struct nl_msg *msg,
+static int handle_features(struct nl80211_state *state, struct nl_msg *msg,
                           int argc, char **argv, enum id_input id)
 {
        unsigned long print = argc == 0 || strcmp(argv[0], "-q");
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_feature_handler, (void 
*)print);
+       register_handler(print_feature_handler, (void *)print);
        return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/interface.c new/iw-4.3/interface.c
--- old/iw-4.1/interface.c      2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/interface.c      2015-09-18 10:54:53.000000000 +0200
@@ -165,7 +165,6 @@
 }
 
 static int handle_interface_add(struct nl80211_state *state,
-                               struct nl_cb *cb,
                                struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
@@ -256,7 +255,6 @@
        NL80211_CMD_NEW_INTERFACE, 0, CIB_NETDEV, handle_interface_add, NULL);
 
 static int handle_interface_del(struct nl80211_state *state,
-                               struct nl_cb *cb,
                                struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
@@ -374,19 +372,17 @@
 }
 
 static int handle_interface_info(struct nl80211_state *state,
-                                struct nl_cb *cb,
                                 struct nl_msg *msg,
                                 int argc, char **argv,
                                 enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_iface_handler, NULL);
+       register_handler(print_iface_handler, NULL);
        return 0;
 }
 TOPLEVEL(info, NULL, NL80211_CMD_GET_INTERFACE, 0, CIB_NETDEV, 
handle_interface_info,
         "Show information for this interface.");
 
 static int handle_interface_set(struct nl80211_state *state,
-                               struct nl_cb *cb,
                                struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
@@ -417,7 +413,6 @@
        VALID_FLAGS);
 
 static int handle_interface_meshid(struct nl80211_state *state,
-                                  struct nl_cb *cb,
                                   struct nl_msg *msg,
                                   int argc, char **argv,
                                   enum id_input id)
@@ -441,20 +436,18 @@
 static unsigned int dev_dump_wiphy;
 
 static int handle_dev_dump(struct nl80211_state *state,
-                          struct nl_cb *cb,
                           struct nl_msg *msg,
                           int argc, char **argv,
                           enum id_input id)
 {
        dev_dump_wiphy = -1;
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_iface_handler, 
&dev_dump_wiphy);
+       register_handler(print_iface_handler, &dev_dump_wiphy);
        return 0;
 }
 TOPLEVEL(dev, NULL, NL80211_CMD_GET_INTERFACE, NLM_F_DUMP, CIB_NONE, 
handle_dev_dump,
         "List all network interfaces for wireless hardware.");
 
 static int handle_interface_type(struct nl80211_state *state,
-                                struct nl_cb *cb,
                                 struct nl_msg *msg,
                                 int argc, char **argv,
                                 enum id_input id)
@@ -481,7 +474,6 @@
        IFACE_TYPES);
 
 static int handle_interface_4addr(struct nl80211_state *state,
-                                 struct nl_cb *cb,
                                  struct nl_msg *msg,
                                  int argc, char **argv,
                                  enum id_input id)
@@ -495,7 +487,6 @@
        "Set interface 4addr (WDS) mode.");
 
 static int handle_interface_noack_map(struct nl80211_state *state,
-                                     struct nl_cb *cb,
                                      struct nl_msg *msg,
                                      int argc, char **argv,
                                      enum id_input id)
@@ -523,7 +514,6 @@
 
 
 static int handle_interface_wds_peer(struct nl80211_state *state,
-                                    struct nl_cb *cb,
                                     struct nl_msg *msg,
                                     int argc, char **argv,
                                     enum id_input id)
@@ -555,7 +545,6 @@
        "Set interface WDS peer.");
 
 static int set_mcast_rate(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/iw.c new/iw-4.3/iw.c
--- old/iw-4.1/iw.c     2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/iw.c     2015-09-18 10:54:53.000000000 +0200
@@ -228,7 +228,6 @@
 }
 
 static int print_help(struct nl80211_state *state,
-                     struct nl_cb *cb,
                      struct nl_msg *msg,
                      int argc, char **argv,
                      enum id_input id)
@@ -293,6 +292,23 @@
        return NL_STOP;
 }
 
+static int (*registered_handler)(struct nl_msg *, void *);
+static void *registered_handler_data;
+
+void register_handler(int (*handler)(struct nl_msg *, void *), void *data)
+{
+       registered_handler = handler;
+       registered_handler_data = data;
+}
+
+int valid_handler(struct nl_msg *msg, void *arg)
+{
+       if (registered_handler)
+               return registered_handler(msg, registered_handler_data);
+
+       return NL_OK;
+}
+
 static int __handle_cmd(struct nl80211_state *state, enum id_input idby,
                        int argc, char **argv, const struct cmd **cmdout)
 {
@@ -424,7 +440,7 @@
        if (!cmd->cmd) {
                argc = o_argc;
                argv = o_argv;
-               return cmd->handler(state, NULL, NULL, argc, argv, idby);
+               return cmd->handler(state, NULL, argc, argv, idby);
        }
 
        msg = nlmsg_alloc();
@@ -438,7 +454,7 @@
        if (!cb || !s_cb) {
                fprintf(stderr, "failed to allocate netlink callbacks\n");
                err = 2;
-               goto out_free_msg;
+               goto out;
        }
 
        genlmsg_put(msg, 0, 0, state->nl80211_id, 0,
@@ -458,7 +474,7 @@
                break;
        }
 
-       err = cmd->handler(state, cb, msg, argc, argv, idby);
+       err = cmd->handler(state, msg, argc, argv, idby);
        if (err)
                goto out;
 
@@ -473,12 +489,13 @@
        nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
        nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err);
        nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_handler, &err);
+       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, valid_handler, NULL);
 
        while (err > 0)
                nl_recvmsgs(state->nl_sock, cb);
  out:
        nl_cb_put(cb);
- out_free_msg:
+       nl_cb_put(s_cb);
        nlmsg_free(msg);
        return err;
  nla_put_failure:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/iw.h new/iw-4.3/iw.h
--- old/iw-4.1/iw.h     2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/iw.h     2015-09-18 10:54:53.000000000 +0200
@@ -52,7 +52,6 @@
         * and the usage message should and 2 otherwise.
         */
        int (*handler)(struct nl80211_state *state,
-                      struct nl_cb *cb,
                       struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id);
@@ -130,6 +129,8 @@
                         const int n_waits, const __u32 *waits,
                         struct print_event_args *args);
 
+int valid_handler(struct nl_msg *msg, void *arg);
+void register_handler(int (*handler)(struct nl_msg *, void *), void *data);
 
 int mac_addr_a2n(unsigned char *mac_addr, char *arg);
 void mac_addr_n2a(char *mac_addr, unsigned char *arg);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/link.c new/iw-4.3/link.c
--- old/iw-4.1/link.c   2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/link.c   2015-09-18 10:54:53.000000000 +0200
@@ -98,7 +98,6 @@
 }
 
 static int handle_scan_for_link(struct nl80211_state *state,
-                               struct nl_cb *cb,
                                struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
@@ -106,7 +105,7 @@
        if (argc > 0)
                return 1;
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, link_bss_handler, &lr);
+       register_handler(link_bss_handler, &lr);
        return 0;
 }
 
@@ -199,7 +198,6 @@
 }
 
 static int handle_link_sta(struct nl80211_state *state,
-                          struct nl_cb *cb,
                           struct nl_msg *msg,
                           int argc, char **argv,
                           enum id_input id)
@@ -222,14 +220,14 @@
 
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_link_sta, NULL);
+       register_handler(print_link_sta, NULL);
 
        return 0;
  nla_put_failure:
        return -ENOBUFS;
 }
 
-static int handle_link(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_link(struct nl80211_state *state,
                       struct nl_msg *msg, int argc, char **argv,
                       enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/mesh.c new/iw-4.3/mesh.c
--- old/iw-4.1/mesh.c   2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/mesh.c   2015-09-18 10:54:53.000000000 +0200
@@ -293,7 +293,6 @@
 
 /* Setter */
 static int set_interface_meshparam(struct nl80211_state *state,
-                                  struct nl_cb *cb,
                                   struct nl_msg *msg,
                                   int argc, char **argv,
                                   enum id_input id)
@@ -407,7 +406,6 @@
 }
 
 static int get_interface_meshparam(struct nl80211_state *state,
-                                  struct nl_cb *cb,
                                   struct nl_msg *msg,
                                   int argc, char **argv,
                                   enum id_input id)
@@ -423,8 +421,7 @@
                        return 2;
        }
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM,
-                 print_mesh_param_handler, (void *)mdescr);
+       register_handler(print_mesh_param_handler, (void *)mdescr);
        return 0;
 }
 
@@ -432,7 +429,7 @@
        NL80211_CMD_GET_MESH_PARAMS, 0, CIB_NETDEV, get_interface_meshparam,
        "Retrieve mesh parameter (run command without any to see available 
ones).");
 
-static int join_mesh(struct nl80211_state *state, struct nl_cb *cb,
+static int join_mesh(struct nl80211_state *state,
                     struct nl_msg *msg, int argc, char **argv,
                     enum id_input id)
 {
@@ -598,7 +595,7 @@
 
        if (!argc)
                return 0;
-       return set_interface_meshparam(state, cb, msg, argc, argv, id);
+       return set_interface_meshparam(state, msg, argc, argv, id);
  nla_put_failure:
        return -ENOBUFS;
 }
@@ -611,7 +608,7 @@
        "mcast-rate and mesh parameters. Basic-rates are applied only if\n"
        "frequency is provided.");
 
-static int leave_mesh(struct nl80211_state *state, struct nl_cb *cb,
+static int leave_mesh(struct nl80211_state *state,
                      struct nl_msg *msg, int argc, char **argv,
                      enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/mpath.c new/iw-4.3/mpath.c
--- old/iw-4.1/mpath.c  2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/mpath.c  2015-09-18 10:54:53.000000000 +0200
@@ -91,7 +91,6 @@
 }
 
 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)
@@ -113,7 +112,7 @@
 
        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:
@@ -127,7 +126,6 @@
        "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)
@@ -163,7 +161,7 @@
        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;
@@ -176,14 +174,13 @@
        "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,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/mpp.c new/iw-4.3/mpp.c
--- old/iw-4.1/mpp.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/mpp.c    2015-09-18 10:54:53.000000000 +0200
@@ -37,7 +37,6 @@
 }
 
 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 +58,7 @@
 
        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 +69,12 @@
        "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,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/nl80211.h new/iw-4.3/nl80211.h
--- old/iw-4.1/nl80211.h        2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/nl80211.h        2015-09-18 10:54:53.000000000 +0200
@@ -2620,16 +2620,17 @@
  *     an indoor surroundings, i.e., it is connected to AC power (and not
  *     through portable DC inverters) or is under the control of a master
  *     that is acting as an AP and is connected to AC power.
- * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
+ * @NL80211_FREQUENCY_ATTR_IR_CONCURRENT: IR operation is allowed on this
  *     channel if it's connected concurrently to a BSS on the same channel on
  *     the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
- *     band), and IEEE80211_CHAN_RADAR is not set. Instantiating a GO on a
- *     channel that has the GO_CONCURRENT attribute set can be done when there
- *     is a clear assessment that the device is operating under the guidance of
- *     an authorized master, i.e., setting up a GO while the device is also
- *     connected to an AP with DFS and radar detection on the UNII band (it is
- *     up to user-space, i.e., wpa_supplicant to perform the required
- *     verifications)
+ *     band), and IEEE80211_CHAN_RADAR is not set. Instantiating a GO or TDLS
+ *     off-channel on a channel that has the IR_CONCURRENT attribute set can be
+ *     done when there is a clear assessment that the device is operating under
+ *     the guidance of an authorized master, i.e., setting up a GO or TDLS
+ *     off-channel while the device is also connected to an AP with DFS and
+ *     radar detection on the UNII band (it is up to user-space, i.e.,
+ *     wpa_supplicant to perform the required verifications). Using this
+ *     attribute for IR is disallowed for master interfaces (IBSS, AP).
  * @NL80211_FREQUENCY_ATTR_NO_20MHZ: 20 MHz operation is not allowed
  *     on this channel in current regulatory domain.
  * @NL80211_FREQUENCY_ATTR_NO_10MHZ: 10 MHz operation is not allowed
@@ -2641,7 +2642,7 @@
  * See 
https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
  * for more information on the FCC description of the relaxations allowed
  * by NL80211_FREQUENCY_ATTR_INDOOR_ONLY and
- * NL80211_FREQUENCY_ATTR_GO_CONCURRENT.
+ * NL80211_FREQUENCY_ATTR_IR_CONCURRENT.
  */
 enum nl80211_frequency_attr {
        __NL80211_FREQUENCY_ATTR_INVALID,
@@ -2659,7 +2660,7 @@
        NL80211_FREQUENCY_ATTR_NO_160MHZ,
        NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
        NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
-       NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
+       NL80211_FREQUENCY_ATTR_IR_CONCURRENT,
        NL80211_FREQUENCY_ATTR_NO_20MHZ,
        NL80211_FREQUENCY_ATTR_NO_10MHZ,
 
@@ -2672,6 +2673,8 @@
 #define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN    NL80211_FREQUENCY_ATTR_NO_IR
 #define NL80211_FREQUENCY_ATTR_NO_IBSS         NL80211_FREQUENCY_ATTR_NO_IR
 #define NL80211_FREQUENCY_ATTR_NO_IR           NL80211_FREQUENCY_ATTR_NO_IR
+#define NL80211_FREQUENCY_ATTR_GO_CONCURRENT \
+                                       NL80211_FREQUENCY_ATTR_IR_CONCURRENT
 
 /**
  * enum nl80211_bitrate_attr - bitrate attributes
@@ -2830,7 +2833,7 @@
  * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
  *     base on contiguous rules and wider channels will be allowed to cross
  *     multiple contiguous/overlapping frequency ranges.
- * @NL80211_RRF_GO_CONCURRENT: See &NL80211_FREQUENCY_ATTR_GO_CONCURRENT
+ * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT
  * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation
  * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation
  * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
@@ -2847,7 +2850,7 @@
        NL80211_RRF_NO_IR               = 1<<7,
        __NL80211_RRF_NO_IBSS           = 1<<8,
        NL80211_RRF_AUTO_BW             = 1<<11,
-       NL80211_RRF_GO_CONCURRENT       = 1<<12,
+       NL80211_RRF_IR_CONCURRENT       = 1<<12,
        NL80211_RRF_NO_HT40MINUS        = 1<<13,
        NL80211_RRF_NO_HT40PLUS         = 1<<14,
        NL80211_RRF_NO_80MHZ            = 1<<15,
@@ -2859,6 +2862,7 @@
 #define NL80211_RRF_NO_IR              NL80211_RRF_NO_IR
 #define NL80211_RRF_NO_HT40            (NL80211_RRF_NO_HT40MINUS |\
                                         NL80211_RRF_NO_HT40PLUS)
+#define NL80211_RRF_GO_CONCURRENT      NL80211_RRF_IR_CONCURRENT
 
 /* For backport compatibility with older userspace */
 #define NL80211_RRF_NO_IR_ALL          (NL80211_RRF_NO_IR | 
__NL80211_RRF_NO_IBSS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/ocb.c new/iw-4.3/ocb.c
--- old/iw-4.1/ocb.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/ocb.c    2015-09-18 10:54:53.000000000 +0200
@@ -7,7 +7,7 @@
 
 SECTION(ocb);
 
-static int join_ocb(struct nl80211_state *state, struct nl_cb *cb,
+static int join_ocb(struct nl80211_state *state,
                    struct nl_msg *msg, int argc, char **argv,
                    enum id_input id)
 {
@@ -63,7 +63,7 @@
        NL80211_CMD_JOIN_OCB, 0, CIB_NETDEV, join_ocb,
        "Join the OCB mode network.");
 
-static int leave_ocb(struct nl80211_state *state, struct nl_cb *cb,
+static int leave_ocb(struct nl80211_state *state,
                     struct nl_msg *msg, int argc, char **argv,
                     enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/offch.c new/iw-4.3/offch.c
--- old/iw-4.1/offch.c  2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/offch.c  2015-09-18 10:54:53.000000000 +0200
@@ -9,7 +9,7 @@
 #include "nl80211.h"
 #include "iw.h"
 
-static int offchannel(struct nl80211_state *state, struct nl_cb *cb,
+static int offchannel(struct nl80211_state *state,
                      struct nl_msg *msg, int argc, char **argv,
                      enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/p2p.c new/iw-4.3/p2p.c
--- old/iw-4.1/p2p.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/p2p.c    2015-09-18 10:54:53.000000000 +0200
@@ -13,7 +13,7 @@
 
 SECTION(p2p);
 
-static int handle_p2p_start(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_p2p_start(struct nl80211_state *state,
                            struct nl_msg *msg, int argc, char **argv,
                            enum id_input id)
 {
@@ -21,7 +21,7 @@
 }
 COMMAND(p2p, start, "", NL80211_CMD_START_P2P_DEVICE, 0, CIB_WDEV, 
handle_p2p_start, "");
 
-static int handle_p2p_stop(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_p2p_stop(struct nl80211_state *state,
                           struct nl_msg *msg, int argc, char **argv,
                           enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/phy.c new/iw-4.3/phy.c
--- old/iw-4.1/phy.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/phy.c    2015-09-18 10:54:53.000000000 +0200
@@ -16,7 +16,6 @@
 #include "iw.h"
 
 static int handle_name(struct nl80211_state *state,
-                      struct nl_cb *cb,
                       struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
@@ -144,8 +143,7 @@
        return -ENOBUFS;
 }
 
-static int handle_freq(struct nl80211_state *state,
-                      struct nl_cb *cb, struct nl_msg *msg,
+static int handle_freq(struct nl80211_state *state, struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
 {
@@ -159,8 +157,7 @@
                   "<control freq> [20|40|80|80+80|160] [<center freq 1>] 
[<center freq 2>]",
        NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_freq, NULL);
 
-static int handle_chan(struct nl80211_state *state,
-                      struct nl_cb *cb, struct nl_msg *msg,
+static int handle_chan(struct nl80211_state *state, struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
 {
@@ -172,7 +169,7 @@
        NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_chan, NULL);
 
 static int handle_fragmentation(struct nl80211_state *state,
-                               struct nl_cb *cb, struct nl_msg *msg,
+                               struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
 {
@@ -204,7 +201,7 @@
        "Set fragmentation threshold.");
 
 static int handle_rts(struct nl80211_state *state,
-                     struct nl_cb *cb, struct nl_msg *msg,
+                     struct nl_msg *msg,
                      int argc, char **argv,
                      enum id_input id)
 {
@@ -236,7 +233,7 @@
        "Set rts threshold.");
 
 static int handle_retry(struct nl80211_state *state,
-                       struct nl_cb *cb, struct nl_msg *msg,
+                       struct nl_msg *msg,
                        int argc, char **argv, enum id_input id)
 {
        unsigned int retry_short = 0, retry_long = 0;
@@ -302,7 +299,7 @@
 #ifndef NETNS_RUN_DIR
 #define NETNS_RUN_DIR "/var/run/netns"
 #endif
-int netns_get_fd(const char *name)
+static int netns_get_fd(const char *name)
 {
        char pathbuf[MAXPATHLEN];
        const char *path, *ptr;
@@ -318,7 +315,6 @@
 }
 
 static int handle_netns(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
@@ -362,7 +358,6 @@
        "               or by absolute path (man ip-netns)\n");
 
 static int handle_coverage(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
@@ -394,7 +389,6 @@
        "Valid values: 0 - 255.");
 
 static int handle_distance(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
@@ -442,7 +436,6 @@
        "Valid values: 0 - 114750");
 
 static int handle_txpower(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -494,7 +487,6 @@
        "Specify transmit power level and setting type.");
 
 static int handle_antenna(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/ps.c new/iw-4.3/ps.c
--- old/iw-4.1/ps.c     2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/ps.c     2015-09-18 10:54:53.000000000 +0200
@@ -9,7 +9,6 @@
 #include "iw.h"
 
 static int set_power_save(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -70,13 +69,11 @@
 }
 
 static int get_power_save(struct nl80211_state *state,
-                                  struct nl_cb *cb,
-                                  struct nl_msg *msg,
-                                  int argc, char **argv,
-                                  enum id_input id)
+                         struct nl_msg *msg,
+                         int argc, char **argv,
+                         enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM,
-                 print_power_save_handler, NULL);
+       register_handler(print_power_save_handler, NULL);
        return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/reg.c new/iw-4.3/reg.c
--- old/iw-4.1/reg.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/reg.c    2015-09-18 10:54:53.000000000 +0200
@@ -76,7 +76,6 @@
 }
 
 static int handle_reg_set(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -206,7 +205,7 @@
                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");
@@ -229,17 +228,15 @@
 }
 
 static int handle_reg_dump(struct nl80211_state *state,
-                          struct nl_cb *cb,
                           struct nl_msg *msg,
                           int argc, char **argv,
                           enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_reg_handler, NULL);
+       register_handler(print_reg_handler, NULL);
        return 0;
 }
 
 static int handle_reg_get(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -250,7 +247,7 @@
        err = handle_cmd(state, CIB_NONE, 2, dump_args);
        /* dump might fail since it's not supported on older kernels */
        if (err == -EOPNOTSUPP) {
-               nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_reg_handler,
+               register_handler(print_reg_handler,
                          NULL);
                return 0;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/roc.c new/iw-4.3/roc.c
--- old/iw-4.1/roc.c    2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/roc.c    2015-09-18 10:54:53.000000000 +0200
@@ -13,7 +13,7 @@
 
 SECTION(roc);
 
-static int handle_roc_start(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_roc_start(struct nl80211_state *state,
                            struct nl_msg *msg, int argc, char **argv,
                            enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/scan.c new/iw-4.3/scan.c
--- old/iw-4.1/scan.c   2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/scan.c   2015-09-18 10:54:53.000000000 +0200
@@ -337,7 +337,6 @@
 }
 
 static int handle_scan(struct nl80211_state *state,
-                      struct nl_cb *cb,
                       struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
@@ -409,6 +408,8 @@
                                break;
                        }
                case DONE:
+                       nlmsg_free(ssids);
+                       nlmsg_free(freqs);
                        return 1;
                case FREQ:
                        freq = strtoul(argv[i], &eptr, 10);
@@ -1970,7 +1971,6 @@
 static struct scan_params scan_params;
 
 static int handle_scan_dump(struct nl80211_state *state,
-                           struct nl_cb *cb,
                            struct nl_msg *msg,
                            int argc, char **argv,
                            enum id_input id)
@@ -1987,13 +1987,12 @@
 
        scan_params.type = PRINT_SCAN;
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_bss_handler,
+       register_handler(print_bss_handler,
                  &scan_params);
        return 0;
 }
 
 static int handle_scan_combined(struct nl80211_state *state,
-                               struct nl_cb *cb,
                                struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
@@ -2010,6 +2009,7 @@
                NL80211_CMD_SCAN_ABORTED,
        };
        int trig_argc, dump_argc, err;
+       int i;
 
        if (argc >= 3 && !strcmp(argv[2], "-u")) {
                dump_argc = 4;
@@ -2027,7 +2027,7 @@
        trig_argv[0] = argv[0];
        trig_argv[1] = "scan";
        trig_argv[2] = "trigger";
-       int i;
+
        for (i = 0; i < argc - 2 - (dump_argc - 3); i++)
                trig_argv[i + 3] = argv[i + 2 + (dump_argc - 3)];
        err = handle_cmd(state, id, trig_argc, trig_argv);
@@ -2085,13 +2085,13 @@
 
 
 static int handle_start_sched_scan(struct nl80211_state *state,
-                                  struct nl_cb *cb, struct nl_msg *msg,
+                                  struct nl_msg *msg,
                                   int argc, char **argv, enum id_input id)
 {
        return parse_sched_scan(msg, &argc, &argv);
 }
 
-static int handle_stop_sched_scan(struct nl80211_state *state, struct nl_cb 
*cb,
+static int handle_stop_sched_scan(struct nl80211_state *state,
                                  struct nl_msg *msg, int argc, char **argv,
                                  enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/station.c new/iw-4.3/station.c
--- old/iw-4.1/station.c        2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/station.c        2015-09-18 10:54:53.000000000 +0200
@@ -338,12 +338,15 @@
                }
        }
 
+       if (sinfo[NL80211_STA_INFO_CONNECTED_TIME])
+               printf("\n\tconnected time:\t%u seconds",
+                       nla_get_u32(sinfo[NL80211_STA_INFO_CONNECTED_TIME]));
+
        printf("\n");
        return NL_SKIP;
 }
 
 static int handle_station_get(struct nl80211_state *state,
-                             struct nl_cb *cb,
                              struct nl_msg *msg,
                              int argc, char **argv,
                              enum id_input id)
@@ -366,7 +369,7 @@
 
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_sta_handler, NULL);
+       register_handler(print_sta_handler, NULL);
 
        return 0;
  nla_put_failure:
@@ -397,7 +400,6 @@
 }
 
 static int handle_station_set_plink(struct nl80211_state *state,
-                             struct nl_cb *cb,
                              struct nl_msg *msg,
                              int argc, char **argv,
                              enum id_input id)
@@ -447,7 +449,6 @@
        select_station_cmd, station_set_plink);
 
 static int handle_station_set_vlan(struct nl80211_state *state,
-                                  struct nl_cb *cb,
                                   struct nl_msg *msg,
                                   int argc, char **argv,
                                   enum id_input id)
@@ -495,7 +496,6 @@
        select_station_cmd, station_set_vlan);
 
 static int handle_station_set_mesh_power_mode(struct nl80211_state *state,
-                                             struct nl_cb *cb,
                                              struct nl_msg *msg,
                                              int argc, char **argv,
                                              enum id_input id)
@@ -548,12 +548,11 @@
        select_station_cmd, station_set_mesh_power_mode);
 
 static int handle_station_dump(struct nl80211_state *state,
-                              struct nl_cb *cb,
                               struct nl_msg *msg,
                               int argc, char **argv,
                               enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_sta_handler, NULL);
+       register_handler(print_sta_handler, NULL);
        return 0;
 }
 COMMAND(station, dump, NULL,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/survey.c new/iw-4.3/survey.c
--- old/iw-4.1/survey.c 2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/survey.c 2015-09-18 10:54:53.000000000 +0200
@@ -69,12 +69,11 @@
 }
 
 static int handle_survey_dump(struct nl80211_state *state,
-                             struct nl_cb *cb,
                              struct nl_msg *msg,
                              int argc, char **argv,
                              enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_survey_handler, NULL);
+       register_handler(print_survey_handler, NULL);
        return 0;
 }
 COMMAND(survey, dump, NULL,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/util.c new/iw-4.3/util.c
--- old/iw-4.1/util.c   2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/util.c   2015-09-18 10:54:53.000000000 +0200
@@ -260,6 +260,9 @@
        [NL80211_CMD_JOIN_OCB] = "join_ocb",
        [NL80211_CMD_LEAVE_OCB] = "leave_ocb",
        [NL80211_CMD_CH_SWITCH_STARTED_NOTIFY] = "ch_switch_started_notify",
+       [NL80211_CMD_TDLS_CHANNEL_SWITCH] = "tdls_channel_switch",
+       [NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH] = "tdls_cancel_channel_switch",
+       [NL80211_CMD_WIPHY_REG_CHANGE] = "wiphy_reg_change",
 };
 
 static char cmdbuf[100];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/vendor.c new/iw-4.3/vendor.c
--- old/iw-4.1/vendor.c 2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/vendor.c 2015-09-18 10:54:53.000000000 +0200
@@ -45,7 +45,7 @@
        return argc;
 }
 
-static int handle_vendor(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_vendor(struct nl80211_state *state,
                         struct nl_msg *msg, int argc, char **argv,
                         enum id_input id)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/version.sh new/iw-4.3/version.sh
--- old/iw-4.1/version.sh       2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/version.sh       2015-09-18 10:54:53.000000000 +0200
@@ -1,11 +1,11 @@
 #!/bin/sh
 
-VERSION="4.1"
+VERSION="4.3"
 OUT="$1"
 
 if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
        git update-index --refresh --unmerged > /dev/null
-       descr=$(git describe)
+       descr=$(git describe --match=v*)
 
        # on git builds check that the version number above
        # is correct...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iw-4.1/wowlan.c new/iw-4.3/wowlan.c
--- old/iw-4.1/wowlan.c 2015-05-05 14:15:14.000000000 +0200
+++ new/iw-4.3/wowlan.c 2015-09-18 10:54:53.000000000 +0200
@@ -197,7 +197,7 @@
        return err;
 }
 
-static int handle_wowlan_enable(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_wowlan_enable(struct nl80211_state *state,
                                struct nl_msg *msg, int argc, char **argv,
                                enum id_input id)
 {
@@ -334,7 +334,7 @@
        " iw phy0 wowlan enable net-detect interval 5000 delay 30 freqs 2412 
2422 matches ssid foo ssid bar");
 
 
-static int handle_wowlan_disable(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_wowlan_disable(struct nl80211_state *state,
                                 struct nl_msg *msg, int argc, char **argv,
                                 enum id_input id)
 {
@@ -470,12 +470,11 @@
        return NL_SKIP;
 }
 
-static int handle_wowlan_show(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_wowlan_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_wowlan_handler, NULL);
+       register_handler(print_wowlan_handler, NULL);
 
        return 0;
 }


Reply via email to