[pkg-wpa-devel] r1910 - in /iw/branches/upstream/current: coalesce.c event.c info.c iw.h mesh.c nl80211.h phy.c station.c util.c version.sh

slh-guest at users.alioth.debian.org slh-guest at users.alioth.debian.org
Tue Oct 14 18:41:51 UTC 2014


Author: slh-guest
Date: Tue Oct 14 18:41:50 2014
New Revision: 1910

URL: http://svn.debian.org/wsvn/?sc=1&rev=1910
Log:
[svn-upgrade] new version iw (3.17)

Modified:
    iw/branches/upstream/current/coalesce.c
    iw/branches/upstream/current/event.c
    iw/branches/upstream/current/info.c
    iw/branches/upstream/current/iw.h
    iw/branches/upstream/current/mesh.c
    iw/branches/upstream/current/nl80211.h
    iw/branches/upstream/current/phy.c
    iw/branches/upstream/current/station.c
    iw/branches/upstream/current/util.c
    iw/branches/upstream/current/version.sh

Modified: iw/branches/upstream/current/coalesce.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/coalesce.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/coalesce.c	(original)
+++ iw/branches/upstream/current/coalesce.c	Tue Oct 14 18:41:50 2014
@@ -38,8 +38,10 @@
 		return 1;
 
 	nl_rules = nla_nest_start(msg, NL80211_ATTR_COALESCE_RULE);
-	if (!nl_rules)
+	if (!nl_rules) {
+		fclose(f);
 		return -ENOBUFS;
+	}
 
 	while (!feof(f)) {
 		char *eol;

Modified: iw/branches/upstream/current/event.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/event.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/event.c	(original)
+++ iw/branches/upstream/current/event.c	Tue Oct 14 18:41:50 2014
@@ -79,7 +79,6 @@
 		/* status */
 		tmp = (frame[29] << 8) + frame[28];
 		printf(" status: %d: %s", tmp, get_status_str(tmp));
-		break;
 		break;
 	case 0xa0: /* disassoc */
 	case 0xc0: /* deauth */
@@ -535,6 +534,10 @@
 		printf("vendor event %.6x:%d\n",
 			nla_get_u32(tb[NL80211_ATTR_VENDOR_ID]),
 			nla_get_u32(tb[NL80211_ATTR_VENDOR_SUBCMD]));
+		if (args->frame && tb[NL80211_ATTR_VENDOR_DATA])
+			iw_hexdump("vendor event",
+				   nla_data(tb[NL80211_ATTR_VENDOR_DATA]),
+				   nla_len(tb[NL80211_ATTR_VENDOR_DATA]));
 		break;
 	default:
 		printf("unknown event %d (%s)\n",

Modified: iw/branches/upstream/current/info.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/info.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/info.c	(original)
+++ iw/branches/upstream/current/info.c	Tue Oct 14 18:41:50 2014
@@ -545,12 +545,44 @@
 			printf("\tDevice accepts cell base station regulatory hints.\n");
 		if (features & NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL)
 			printf("\tP2P Device uses a channel (of the concurrent ones)\n");
+		if (features & NL80211_FEATURE_SAE)
+			printf("\tDevice supports SAE with AUTHENTICATE command\n");
 		if (features & NL80211_FEATURE_LOW_PRIORITY_SCAN)
 			printf("\tDevice supports low priority scan.\n");
 		if (features & NL80211_FEATURE_SCAN_FLUSH)
 			printf("\tDevice supports scan flush.\n");
 		if (features & NL80211_FEATURE_AP_SCAN)
 			printf("\tDevice supports AP scan.\n");
+		if (features & NL80211_FEATURE_VIF_TXPOWER)
+			printf("\tDevice supports per-vif TX power setting\n");
+		if (features & NL80211_FEATURE_NEED_OBSS_SCAN)
+			printf("\tUserspace should do OBSS scan and generate 20/40 coex reports\n");
+		if (features & NL80211_FEATURE_P2P_GO_CTWIN)
+			printf("\tP2P GO supports CT window setting\n");
+		if (features & NL80211_FEATURE_P2P_GO_OPPPS)
+			printf("\tP2P GO supports opportunistic powersave setting\n");
+		if (features & NL80211_FEATURE_FULL_AP_CLIENT_STATE)
+			printf("\tDriver supports full state transitions for AP/GO clients\n");
+		if (features & NL80211_FEATURE_USERSPACE_MPM)
+			printf("\tDriver supports a userspace MPM\n");
+		if (features & NL80211_FEATURE_ACTIVE_MONITOR)
+			printf("\tDevice supports active monitor (which will ACK incoming frames)\n");
+		if (features & NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE)
+			printf("\tDriver/device bandwidth changes during BSS lifetime (AP/GO mode)\n");
+		if (features & NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES)
+			printf("\tDevice adds DS IE to probe requests\n");
+		if (features & NL80211_FEATURE_WFA_TPC_IE_IN_PROBES)
+			printf("\tDevice adds WFA TPC Report IE to probe requests\n");
+		if (features & NL80211_FEATURE_QUIET)
+			printf("\tDevice supports quiet requests from AP\n");
+		if (features & NL80211_FEATURE_TX_POWER_INSERTION)
+			printf("\tDevice can update TPC Report IE\n");
+		if (features & NL80211_FEATURE_ACKTO_ESTIMATION)
+			printf("\tDevice supports ACK timeout estimation.\n");
+		if (features & NL80211_FEATURE_STATIC_SMPS)
+			printf("\tDevice supports static SMPS\n");
+		if (features & NL80211_FEATURE_DYNAMIC_SMPS)
+			printf("\tDevice supports dynamic SMPS\n");
 	}
 
 	if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])

Modified: iw/branches/upstream/current/iw.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/iw.h?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/iw.h	(original)
+++ iw/branches/upstream/current/iw.h	Tue Oct 14 18:41:50 2014
@@ -171,6 +171,7 @@
 	       enum print_ie_type ptype);
 
 void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
+void iw_hexdump(const char *prefix, const __u8 *data, size_t len);
 
 DECLARE_SECTION(set);
 DECLARE_SECTION(get);

Modified: iw/branches/upstream/current/mesh.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/mesh.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/mesh.c	(original)
+++ iw/branches/upstream/current/mesh.c	Tue Oct 14 18:41:50 2014
@@ -438,8 +438,33 @@
 {
 	struct nlattr *container;
 	float rate;
-	int bintval, dtim_period;
-	char *end;
+	unsigned char rates[NL80211_MAX_SUPP_RATES];
+	int bintval, dtim_period, i, n_rates = 0;
+	char *end, *value = NULL, *sptr = NULL;
+	unsigned long freq = 0;
+	static const struct {
+		const char *name;
+		unsigned int width;
+		int freq1_diff;
+		int chantype; /* for older kernel */
+	} *chanmode_selected = NULL, chanmode[] = {
+		{ .name = "HT20",
+		  .width = NL80211_CHAN_WIDTH_20,
+		  .freq1_diff = 0,
+		  .chantype = NL80211_CHAN_HT20 },
+		{ .name = "HT40+",
+		  .width = NL80211_CHAN_WIDTH_40,
+		  .freq1_diff = 10,
+		  .chantype = NL80211_CHAN_HT40PLUS },
+		{ .name = "HT40-",
+		  .width = NL80211_CHAN_WIDTH_40,
+		  .freq1_diff = -10,
+		  .chantype = NL80211_CHAN_HT40MINUS },
+		{ .name = "NOHT",
+		  .width = NL80211_CHAN_WIDTH_20_NOHT,
+		  .freq1_diff = 0,
+		  .chantype = NL80211_CHAN_NO_HT },
+	};
 
 	if (argc < 1)
 		return 1;
@@ -448,6 +473,70 @@
 	argc--;
 	argv++;
 
+	/* freq */
+	if (argc > 1 && strcmp(argv[0], "freq") == 0) {
+		argv++;
+		argc--;
+
+		freq = strtoul(argv[0], &end, 10);
+		if (*end != '\0')
+			return 1;
+		NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
+
+		argv++;
+		argc--;
+	}
+
+	/* channel type */
+	if (argc) {
+		for (i = 0; i < ARRAY_SIZE(chanmode); i++) {
+			if (strcasecmp(chanmode[i].name, argv[0]) == 0) {
+				chanmode_selected = &chanmode[i];
+				break;
+			}
+		}
+
+		if (chanmode_selected) {
+			NLA_PUT_U32(msg, NL80211_ATTR_CHANNEL_WIDTH,
+				    chanmode_selected->width);
+			NLA_PUT_U32(msg, NL80211_ATTR_CENTER_FREQ1,
+				    freq + chanmode_selected->freq1_diff);
+			if (chanmode_selected->chantype != -1)
+				NLA_PUT_U32(msg,
+					    NL80211_ATTR_WIPHY_CHANNEL_TYPE,
+					    chanmode_selected->chantype);
+
+			argv++;
+			argc--;
+		}
+	}
+
+	/* basic rates */
+	if (argc > 1 && strcmp(argv[0], "basic-rates") == 0) {
+		argv++;
+		argc--;
+
+		value = strtok_r(argv[0], ",", &sptr);
+
+		while (value && n_rates < NL80211_MAX_SUPP_RATES) {
+			rate = strtod(value, &end);
+			rates[n_rates] = rate * 2;
+
+			/* filter out suspicious values  */
+			if (*end != '\0' || !rates[n_rates] ||
+			    rate*2 != rates[n_rates])
+				return 1;
+
+			n_rates++;
+			value = strtok_r(NULL, ",", &sptr);
+		}
+
+		NLA_PUT(msg, NL80211_ATTR_BSS_BASIC_RATES, n_rates, rates);
+		argv++;
+		argc--;
+	}
+
+	/* multicast rate */
 	if (argc > 1 && strcmp(argv[0], "mcast-rate") == 0) {
 		argv++;
 		argc--;
@@ -513,11 +602,14 @@
  nla_put_failure:
 	return -ENOBUFS;
 }
-COMMAND(mesh, join, "<mesh ID> [mcast-rate <rate in Mbps>]"
+COMMAND(mesh, join, "<mesh ID> [[freq <freq in MHz> <HT20|HT40+|HT40-|NOHT>]"
+	" [basic-rates <rate in Mbps,rate2,...>]], [mcast-rate <rate in Mbps>]"
 	" [beacon-interval <time in TUs>] [dtim-period <value>]"
 	" [vendor_sync on|off] [<param>=<value>]*",
 	NL80211_CMD_JOIN_MESH, 0, CIB_NETDEV, join_mesh,
-	"Join a mesh with the given mesh ID with mcast-rate and mesh parameters.");
+	"Join a mesh with the given mesh ID with frequency, basic-rates,\n"
+	"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,
 		      struct nl_msg *msg, int argc, char **argv,

Modified: iw/branches/upstream/current/nl80211.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/nl80211.h?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/nl80211.h	(original)
+++ iw/branches/upstream/current/nl80211.h	Tue Oct 14 18:41:50 2014
@@ -503,6 +503,9 @@
  *	TX status event pertaining to the TX request.
  *	%NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
  *	management frames at CCK rate or not in 2GHz band.
+ *	%NL80211_ATTR_CSA_C_OFFSETS_TX is an array of offsets to CSA
+ *	counters which will be updated to the current value. This attribute
+ *	is used during CSA period.
  * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
  *	command may be used with the corresponding cookie to cancel the wait
  *	time if it is known that it is no longer necessary.
@@ -719,6 +722,22 @@
  *	QoS mapping is relevant for IP packets, it is only valid during an
  *	association. This is cleared on disassociation and AP restart.
  *
+ * @NL80211_CMD_ADD_TX_TS: Ask the kernel to add a traffic stream for the given
+ *	%NL80211_ATTR_TSID and %NL80211_ATTR_MAC with %NL80211_ATTR_USER_PRIO
+ *	and %NL80211_ATTR_ADMITTED_TIME parameters.
+ *	Note that the action frame handshake with the AP shall be handled by
+ *	userspace via the normal management RX/TX framework, this only sets
+ *	up the TX TS in the driver/device.
+ *	If the admitted time attribute is not added then the request just checks
+ *	if a subsequent setup could be successful, the intent is to use this to
+ *	avoid setting up a session with the AP when local restrictions would
+ *	make that impossible. However, the subsequent "real" setup may still
+ *	fail even if the check was successful.
+ * @NL80211_CMD_DEL_TX_TS: Remove an existing TS with the %NL80211_ATTR_TSID
+ *	and %NL80211_ATTR_MAC parameters. It isn't necessary to call this
+ *	before removing a station entry entirely, or before disassociating
+ *	or similar, cleanup will happen in the driver/device in this case.
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -889,6 +908,9 @@
 	NL80211_CMD_VENDOR,
 
 	NL80211_CMD_SET_QOS_MAP,
+
+	NL80211_CMD_ADD_TX_TS,
+	NL80211_CMD_DEL_TX_TS,
 
 	/* add new commands above here */
 
@@ -1525,10 +1547,10 @@
  *	operation).
  * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
  *	for the time while performing a channel switch.
- * @NL80211_ATTR_CSA_C_OFF_BEACON: Offset of the channel switch counter
- *	field in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
- * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter
- *	field in the probe response (%NL80211_ATTR_PROBE_RESP).
+ * @NL80211_ATTR_CSA_C_OFF_BEACON: An array of offsets (u16) to the channel
+ *	switch counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
+ * @NL80211_ATTR_CSA_C_OFF_PRESP: An array of offsets (u16) to the channel
+ *	switch counters in the probe response (%NL80211_ATTR_PROBE_RESP).
  *
  * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.
  *	As specified in the &enum nl80211_rxmgmt_flags.
@@ -1576,8 +1598,45 @@
  *	advertise values that cannot always be met. In such cases, an attempt
  *	to add a new station entry with @NL80211_CMD_NEW_STATION may fail.
  *
+ * @NL80211_ATTR_CSA_C_OFFSETS_TX: An array of csa counter offsets (u16) which
+ *	should be updated when the frame is transmitted.
+ * @NL80211_ATTR_MAX_CSA_COUNTERS: U8 attribute used to advertise the maximum
+ *	supported number of csa counters.
+ *
  * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
  *	As specified in the &enum nl80211_tdls_peer_capability.
+ *
+ * @NL80211_ATTR_IFACE_SOCKET_OWNER: flag attribute, if set during interface
+ *	creation then the new interface will be owned by the netlink socket
+ *	that created it and will be destroyed when the socket is closed
+ *
+ * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
+ *	the TDLS link initiator.
+ *
+ * @NL80211_ATTR_USE_RRM: flag for indicating whether the current connection
+ *	shall support Radio Resource Measurements (11k). This attribute can be
+ *	used with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests.
+ *	User space applications are expected to use this flag only if the
+ *	underlying device supports these minimal RRM features:
+ *		%NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,
+ *		%NL80211_FEATURE_QUIET,
+ *	If this flag is used, driver must add the Power Capabilities IE to the
+ *	association request. In addition, it must also set the RRM capability
+ *	flag in the association request's Capability Info field.
+ *
+ * @NL80211_ATTR_WIPHY_DYN_ACK: flag attribute used to enable ACK timeout
+ *	estimation algorithm (dynack). In order to activate dynack
+ *	%NL80211_FEATURE_ACKTO_ESTIMATION feature flag must be set by lower
+ *	drivers to indicate dynack capability. Dynack is automatically disabled
+ *	setting valid value for coverage class.
+ *
+ * @NL80211_ATTR_TSID: a TSID value (u8 attribute)
+ * @NL80211_ATTR_USER_PRIO: user priority value (u8 attribute)
+ * @NL80211_ATTR_ADMITTED_TIME: admitted time in units of 32 microseconds
+ *	(per second) (u16 attribute)
+ *
+ * @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see
+ *	&enum nl80211_smps_mode.
  *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -1913,6 +1972,23 @@
 	NL80211_ATTR_MAX_AP_ASSOC_STA,
 
 	NL80211_ATTR_TDLS_PEER_CAPABILITY,
+
+	NL80211_ATTR_IFACE_SOCKET_OWNER,
+
+	NL80211_ATTR_CSA_C_OFFSETS_TX,
+	NL80211_ATTR_MAX_CSA_COUNTERS,
+
+	NL80211_ATTR_TDLS_INITIATOR,
+
+	NL80211_ATTR_USE_RRM,
+
+	NL80211_ATTR_WIPHY_DYN_ACK,
+
+	NL80211_ATTR_TSID,
+	NL80211_ATTR_USER_PRIO,
+	NL80211_ATTR_ADMITTED_TIME,
+
+	NL80211_ATTR_SMPS_MODE,
 
 	/* add attributes here, update the policy in nl80211.c */
 
@@ -2182,6 +2258,8 @@
  *	Contains a nested array of signal strength attributes (u8, dBm)
  * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
  *	Same format as NL80211_STA_INFO_CHAIN_SIGNAL.
+ * @NL80211_STA_EXPECTED_THROUGHPUT: expected throughput considering also the
+ *	802.11 header (u32, kbps)
  * @__NL80211_STA_INFO_AFTER_LAST: internal
  * @NL80211_STA_INFO_MAX: highest possible station info attribute
  */
@@ -2213,6 +2291,7 @@
 	NL80211_STA_INFO_TX_BYTES64,
 	NL80211_STA_INFO_CHAIN_SIGNAL,
 	NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
+	NL80211_STA_INFO_EXPECTED_THROUGHPUT,
 
 	/* keep last */
 	__NL80211_STA_INFO_AFTER_LAST,
@@ -2336,9 +2415,34 @@
  *	using this channel as the primary or any of the secondary channels
  *	isn't possible
  * @NL80211_FREQUENCY_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
+ * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Only indoor use is permitted on this
+ *	channel. A channel that has the INDOOR_ONLY attribute can only be
+ *	used when there is a clear assessment that the device is operating in
+ *	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
+ *	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)
+ * @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
+ *	on this channel in current regulatory domain.
  * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
  *	currently defined
  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
+ *
+ * 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.
  */
 enum nl80211_frequency_attr {
 	__NL80211_FREQUENCY_ATTR_INVALID,
@@ -2355,6 +2459,10 @@
 	NL80211_FREQUENCY_ATTR_NO_80MHZ,
 	NL80211_FREQUENCY_ATTR_NO_160MHZ,
 	NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
+	NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
+	NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
+	NL80211_FREQUENCY_ATTR_NO_20MHZ,
+	NL80211_FREQUENCY_ATTR_NO_10MHZ,
 
 	/* keep last */
 	__NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -2573,10 +2681,13 @@
  *	present has been registered with the wireless core that
  *	has listed NL80211_FEATURE_CELL_BASE_REG_HINTS as a
  *	supported feature.
+ * @NL80211_USER_REG_HINT_INDOOR: a user sent an hint indicating that the
+ *	platform is operating in an indoor environment.
  */
 enum nl80211_user_reg_hint_type {
 	NL80211_USER_REG_HINT_USER	= 0,
 	NL80211_USER_REG_HINT_CELL_BASE = 1,
+	NL80211_USER_REG_HINT_INDOOR    = 2,
 };
 
 /**
@@ -2998,14 +3109,20 @@
  * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets)
  * @NL80211_BSS_FREQUENCY: frequency in MHz (u32)
  * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64)
+ *	(if @NL80211_BSS_PRESP_DATA is present then this is known to be
+ *	from a probe response, otherwise it may be from the same beacon
+ *	that the NL80211_BSS_BEACON_TSF will be from)
  * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
  * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
  * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
  *	raw information elements from the probe response/beacon (bin);
- *	if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are
- *	from a Probe Response frame; otherwise they are from a Beacon frame.
+ *	if the %NL80211_BSS_BEACON_IES attribute is present and the data is
+ *	different then the IEs here are from a Probe Response frame; otherwise
+ *	they are from a Beacon frame.
  *	However, if the driver does not indicate the source of the IEs, these
  *	IEs may be from either frame subtype.
+ *	If present, the @NL80211_BSS_PRESP_DATA attribute indicates that the
+ *	data here is known to be from a probe response, without any heuristics.
  * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
  *	in mBm (100 * dBm) (s32)
  * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
@@ -3017,6 +3134,10 @@
  *	yet been received
  * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel
  *	(u32, enum nl80211_bss_scan_width)
+ * @NL80211_BSS_BEACON_TSF: TSF of the last received beacon (u64)
+ *	(not present if no beacon frame has been received yet)
+ * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
+ *	@NL80211_BSS_TSF is known to be from a probe response (flag attribute)
  * @__NL80211_BSS_AFTER_LAST: internal
  * @NL80211_BSS_MAX: highest BSS attribute
  */
@@ -3034,6 +3155,8 @@
 	NL80211_BSS_SEEN_MS_AGO,
 	NL80211_BSS_BEACON_IES,
 	NL80211_BSS_CHAN_WIDTH,
+	NL80211_BSS_BEACON_TSF,
+	NL80211_BSS_PRESP_DATA,
 
 	/* keep last */
 	__NL80211_BSS_AFTER_LAST,
@@ -3650,6 +3773,8 @@
  *	different channels may be used within this group.
  * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
  *	of supported channel widths for radar detection.
+ * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the bitmap
+ *	of supported regulatory regions for radar detection.
  * @NUM_NL80211_IFACE_COMB: number of attributes
  * @MAX_NL80211_IFACE_COMB: highest attribute number
  *
@@ -3683,6 +3808,7 @@
 	NL80211_IFACE_COMB_STA_AP_BI_MATCH,
 	NL80211_IFACE_COMB_NUM_CHANNELS,
 	NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
+	NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
 
 	/* keep last */
 	NUM_NL80211_IFACE_COMB,
@@ -3893,6 +4019,29 @@
  *	interface. An active monitor interface behaves like a normal monitor
  *	interface, but gets added to the driver. It ensures that incoming
  *	unicast packets directed at the configured interface address get ACKed.
+ * @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic
+ *	channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the
+ *	lifetime of a BSS.
+ * @NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES: This device adds a DS Parameter
+ *	Set IE to probe requests.
+ * @NL80211_FEATURE_WFA_TPC_IE_IN_PROBES: This device adds a WFA TPC Report IE
+ *	to probe requests.
+ * @NL80211_FEATURE_QUIET: This device, in client mode, supports Quiet Period
+ *	requests sent to it by an AP.
+ * @NL80211_FEATURE_TX_POWER_INSERTION: This device is capable of inserting the
+ *	current tx power value into the TPC Report IE in the spectrum
+ *	management TPC Report action frame, and in the Radio Measurement Link
+ *	Measurement Report action frame.
+ * @NL80211_FEATURE_ACKTO_ESTIMATION: This driver supports dynamic ACK timeout
+ *	estimation (dynack). %NL80211_ATTR_WIPHY_DYN_ACK flag attribute is used
+ *	to enable dynack.
+ * @NL80211_FEATURE_STATIC_SMPS: Device supports static spatial
+ *	multiplexing powersave, ie. can turn off all but one chain
+ *	even on HT connections that should be using more chains.
+ * @NL80211_FEATURE_DYNAMIC_SMPS: Device supports dynamic spatial
+ *	multiplexing powersave, ie. can turn off all but one chain
+ *	and then wake the rest up as required after, for example,
+ *	rts/cts handshake.
  */
 enum nl80211_feature_flags {
 	NL80211_FEATURE_SK_TX_STATUS			= 1 << 0,
@@ -3913,6 +4062,14 @@
 	NL80211_FEATURE_FULL_AP_CLIENT_STATE		= 1 << 15,
 	NL80211_FEATURE_USERSPACE_MPM			= 1 << 16,
 	NL80211_FEATURE_ACTIVE_MONITOR			= 1 << 17,
+	NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE	= 1 << 18,
+	NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES	= 1 << 19,
+	NL80211_FEATURE_WFA_TPC_IE_IN_PROBES		= 1 << 20,
+	NL80211_FEATURE_QUIET				= 1 << 21,
+	NL80211_FEATURE_TX_POWER_INSERTION		= 1 << 22,
+	NL80211_FEATURE_ACKTO_ESTIMATION		= 1 << 23,
+	NL80211_FEATURE_STATIC_SMPS			= 1 << 24,
+	NL80211_FEATURE_DYNAMIC_SMPS			= 1 << 25,
 };
 
 /**
@@ -3984,6 +4141,25 @@
 enum nl80211_acl_policy {
 	NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
 	NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
+};
+
+/**
+ * enum nl80211_smps_mode - SMPS mode
+ *
+ * Requested SMPS mode (for AP mode)
+ *
+ * @NL80211_SMPS_OFF: SMPS off (use all antennas).
+ * @NL80211_SMPS_STATIC: static SMPS (use a single antenna)
+ * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and
+ *	turn on other antennas after CTS/RTS).
+ */
+enum nl80211_smps_mode {
+	NL80211_SMPS_OFF,
+	NL80211_SMPS_STATIC,
+	NL80211_SMPS_DYNAMIC,
+
+	__NL80211_SMPS_AFTER_LAST,
+	NL80211_SMPS_MAX = __NL80211_SMPS_AFTER_LAST - 1
 };
 
 /**

Modified: iw/branches/upstream/current/phy.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/phy.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/phy.c	(original)
+++ iw/branches/upstream/current/phy.c	Tue Oct 14 18:41:50 2014
@@ -362,39 +362,46 @@
 			int argc, char **argv,
 			enum id_input id)
 {
-	char *end;
-	unsigned int distance, coverage;
-
 	if (argc != 1)
 		return 1;
 
 	if (!*argv[0])
 		return 1;
 
-	distance = strtoul(argv[0], &end, 10);
-
-	if (*end)
-		return 1;
-
-	/*
-	 * Divide double the distance by the speed of light in m/usec (300) to
-	 * get round-trip time in microseconds and then divide the result by
-	 * three to get coverage class as specified in IEEE 802.11-2007 table
-	 * 7-27. Values are rounded upwards.
-	 */
-	coverage = (distance + 449) / 450;
-	if (coverage > 255)
-		return 1;
-
-	NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_COVERAGE_CLASS, coverage);
-
-	return 0;
- nla_put_failure:
-	return -ENOBUFS;
-}
-COMMAND(set, distance, "<distance>",
+	if (strcmp("auto", argv[0]) == 0) {
+		NLA_PUT_FLAG(msg, NL80211_ATTR_WIPHY_DYN_ACK);
+	} else {
+		char *end;
+		unsigned int distance, coverage;
+
+		distance = strtoul(argv[0], &end, 10);
+
+		if (*end)
+			return 1;
+
+		/*
+		 * Divide double the distance by the speed of light
+		 * in m/usec (300) to get round-trip time in microseconds
+		 * and then divide the result by three to get coverage class
+		 * as specified in IEEE 802.11-2007 table 7-27.
+		 * Values are rounded upwards.
+		 */
+		coverage = (distance + 449) / 450;
+		if (coverage > 255)
+			return 1;
+
+		NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_COVERAGE_CLASS, coverage);
+	}
+
+	return 0;
+ nla_put_failure:
+	return -ENOBUFS;
+}
+COMMAND(set, distance, "<auto|distance>",
 	NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_distance,
-	"Set appropriate coverage class for given link distance in meters.\n"
+	"Enable ACK timeout estimation algorithm (dynack) or set appropriate\n"
+	"coverage class for given link distance in meters.\n"
+	"To disable dynack set valid value for coverage class.\n"
 	"Valid values: 0 - 114750");
 
 static int handle_txpower(struct nl80211_state *state,

Modified: iw/branches/upstream/current/station.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/station.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/station.c	(original)
+++ iw/branches/upstream/current/station.c	Tue Oct 14 18:41:50 2014
@@ -226,6 +226,17 @@
 		printf("\n\trx bitrate:\t%s", buf);
 	}
 
+	if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) {
+		uint32_t thr;
+
+		thr = nla_get_u32(sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]);
+		/* convert in Mbps but scale by 1000 to save kbps units */
+		thr = thr * 1000 / 1024;
+
+		printf("\n\texpected throughput:\t%u.%uMbps",
+		       thr / 1000, thr % 1000);
+	}
+
 	if (sinfo[NL80211_STA_INFO_LLID])
 		printf("\n\tmesh llid:\t%d",
 			nla_get_u16(sinfo[NL80211_STA_INFO_LLID]));

Modified: iw/branches/upstream/current/util.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/util.c?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/util.c	(original)
+++ iw/branches/upstream/current/util.c	Tue Oct 14 18:41:50 2014
@@ -702,3 +702,16 @@
 	tmp = mcs[6] | (mcs[7] << 8);
 	printf("\t\tVHT TX highest supported: %d Mbps\n", tmp & 0x1fff);
 }
+
+void iw_hexdump(const char *prefix, const __u8 *buf, size_t size)
+{
+	int i;
+
+	printf("%s: ", prefix);
+	for (i = 0; i < size; i++) {
+		if (i && i % 16 == 0)
+			printf("\n%s: ", prefix);
+		printf("%02x ", buf[i]);
+	}
+	printf("\n\n");
+}

Modified: iw/branches/upstream/current/version.sh
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/version.sh?rev=1910&op=diff
==============================================================================
--- iw/branches/upstream/current/version.sh	(original)
+++ iw/branches/upstream/current/version.sh	Tue Oct 14 18:41:50 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-VERSION="3.15"
+VERSION="3.17"
 OUT="$1"
 
 if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then




More information about the Pkg-wpa-devel mailing list