[pkg-wpa-devel] r1965 - in /iw/trunk: ./ debian/

slh-guest at users.alioth.debian.org slh-guest at users.alioth.debian.org
Wed Dec 16 04:56:21 UTC 2015


Author: slh-guest
Date: Wed Dec 16 04:56:21 2015
New Revision: 1965

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1965
Log:
import 4.3

Removed:
    iw/trunk/android-nl.c
Modified:
    iw/trunk/Android.mk
    iw/trunk/bitrate.c
    iw/trunk/coalesce.c
    iw/trunk/connect.c
    iw/trunk/cqm.c
    iw/trunk/debian/changelog
    iw/trunk/event.c
    iw/trunk/hwsim.c
    iw/trunk/ibss.c
    iw/trunk/info.c
    iw/trunk/interface.c
    iw/trunk/iw.c
    iw/trunk/iw.h
    iw/trunk/link.c
    iw/trunk/mesh.c
    iw/trunk/mpath.c
    iw/trunk/mpp.c
    iw/trunk/nl80211.h
    iw/trunk/ocb.c
    iw/trunk/offch.c
    iw/trunk/p2p.c
    iw/trunk/phy.c
    iw/trunk/ps.c
    iw/trunk/reg.c
    iw/trunk/roc.c
    iw/trunk/scan.c
    iw/trunk/station.c
    iw/trunk/survey.c
    iw/trunk/util.c
    iw/trunk/vendor.c
    iw/trunk/version.sh
    iw/trunk/wowlan.c

Modified: iw/trunk/Android.mk
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/Android.mk?rev=1965&op=diff
==============================================================================
--- iw/trunk/Android.mk	(original)
+++ iw/trunk/Android.mk	Wed Dec 16 04:56:21 2015
@@ -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:

Modified: iw/trunk/bitrate.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/bitrate.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/bitrate.c	(original)
+++ iw/trunk/bitrate.c	Wed Dec 16 04:56:21 2015
@@ -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)

Modified: iw/trunk/coalesce.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/coalesce.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/coalesce.c	(original)
+++ iw/trunk/coalesce.c	Wed Dec 16 04:56:21 2015
@@ -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;
 }

Modified: iw/trunk/connect.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/connect.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/connect.c	(original)
+++ iw/trunk/connect.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/cqm.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/cqm.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/cqm.c	(original)
+++ iw/trunk/cqm.c	Wed Dec 16 04:56:21 2015
@@ -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);

Modified: iw/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/changelog?rev=1965&op=diff
==============================================================================
--- iw/trunk/debian/changelog	(original)
+++ iw/trunk/debian/changelog	Wed Dec 16 04:56:21 2015
@@ -1,4 +1,4 @@
-iw (4.1-1) UNRELEASED; urgency=medium
+iw (4.3-1) UNRELEASED; urgency=medium
 
   * NOT RELEASED YET
   * New upstream release:
@@ -6,7 +6,7 @@
     - make sure to use /run/netns directly, rather than using the indirection
       via /var/run/.
 
- -- Stefan Lippers-Hollmann <s.l-h at gmx.de>  Wed, 27 May 2015 03:40:42 +0200
+ -- Stefan Lippers-Hollmann <s.l-h at gmx.de>  Wed, 16 Dec 2015 05:55:28 +0100
 
 iw (3.17-1) unstable; urgency=medium
 

Modified: iw/trunk/event.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/event.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/event.c	(original)
+++ iw/trunk/event.c	Wed Dec 16 04:56:21 2015
@@ -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)

Modified: iw/trunk/hwsim.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/hwsim.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/hwsim.c	(original)
+++ iw/trunk/hwsim.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/ibss.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/ibss.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/ibss.c	(original)
+++ iw/trunk/ibss.c	Wed Dec 16 04:56:21 2015
@@ -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)

Modified: iw/trunk/info.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/info.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/info.c	(original)
+++ iw/trunk/info.c	Wed Dec 16 04:56:21 2015
@@ -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;
 }
 

Modified: iw/trunk/interface.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/interface.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/interface.c	(original)
+++ iw/trunk/interface.c	Wed Dec 16 04:56:21 2015
@@ -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)

Modified: iw/trunk/iw.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/iw.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/iw.c	(original)
+++ iw/trunk/iw.c	Wed Dec 16 04:56:21 2015
@@ -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)
@@ -291,6 +290,23 @@
 	int *ret = arg;
 	*ret = 0;
 	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,
@@ -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:

Modified: iw/trunk/iw.h
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/iw.h?rev=1965&op=diff
==============================================================================
--- iw/trunk/iw.h	(original)
+++ iw/trunk/iw.h	Wed Dec 16 04:56:21 2015
@@ -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);

Modified: iw/trunk/link.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/link.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/link.c	(original)
+++ iw/trunk/link.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/mesh.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/mesh.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/mesh.c	(original)
+++ iw/trunk/mesh.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/mpath.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/mpath.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/mpath.c	(original)
+++ iw/trunk/mpath.c	Wed Dec 16 04:56:21 2015
@@ -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,

Modified: iw/trunk/mpp.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/mpp.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/mpp.c	(original)
+++ iw/trunk/mpp.c	Wed Dec 16 04:56:21 2015
@@ -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,

Modified: iw/trunk/nl80211.h
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/nl80211.h?rev=1965&op=diff
==============================================================================
--- iw/trunk/nl80211.h	(original)
+++ iw/trunk/nl80211.h	Wed Dec 16 04:56:21 2015
@@ -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)

Modified: iw/trunk/ocb.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/ocb.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/ocb.c	(original)
+++ iw/trunk/ocb.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/offch.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/offch.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/offch.c	(original)
+++ iw/trunk/offch.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/p2p.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/p2p.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/p2p.c	(original)
+++ iw/trunk/p2p.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/phy.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/phy.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/phy.c	(original)
+++ iw/trunk/phy.c	Wed Dec 16 04:56:21 2015
@@ -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)

Modified: iw/trunk/ps.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/ps.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/ps.c	(original)
+++ iw/trunk/ps.c	Wed Dec 16 04:56:21 2015
@@ -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;
 }
 

Modified: iw/trunk/reg.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/reg.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/reg.c	(original)
+++ iw/trunk/reg.c	Wed Dec 16 04:56:21 2015
@@ -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;
 	}

Modified: iw/trunk/roc.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/roc.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/roc.c	(original)
+++ iw/trunk/roc.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/scan.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/scan.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/scan.c	(original)
+++ iw/trunk/scan.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/station.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/station.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/station.c	(original)
+++ iw/trunk/station.c	Wed Dec 16 04:56:21 2015
@@ -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,

Modified: iw/trunk/survey.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/survey.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/survey.c	(original)
+++ iw/trunk/survey.c	Wed Dec 16 04:56:21 2015
@@ -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,

Modified: iw/trunk/util.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/util.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/util.c	(original)
+++ iw/trunk/util.c	Wed Dec 16 04:56:21 2015
@@ -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];

Modified: iw/trunk/vendor.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/vendor.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/vendor.c	(original)
+++ iw/trunk/vendor.c	Wed Dec 16 04:56:21 2015
@@ -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)
 {

Modified: iw/trunk/version.sh
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/version.sh?rev=1965&op=diff
==============================================================================
--- iw/trunk/version.sh	(original)
+++ iw/trunk/version.sh	Wed Dec 16 04:56:21 2015
@@ -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...

Modified: iw/trunk/wowlan.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/wowlan.c?rev=1965&op=diff
==============================================================================
--- iw/trunk/wowlan.c	(original)
+++ iw/trunk/wowlan.c	Wed Dec 16 04:56:21 2015
@@ -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;
 }




More information about the Pkg-wpa-devel mailing list