[pkg-wpa-devel] r1863 - in /iw/branches/upstream/current: CONTRIBUTING bitrate.c event.c info.c nl80211.h phy.c reg.c util.c version.sh wowlan.c

slh-guest at users.alioth.debian.org slh-guest at users.alioth.debian.org
Thu May 29 18:39:47 UTC 2014


Author: slh-guest
Date: Thu May 29 18:39:47 2014
New Revision: 1863

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

Added:
    iw/branches/upstream/current/CONTRIBUTING
Modified:
    iw/branches/upstream/current/bitrate.c
    iw/branches/upstream/current/event.c
    iw/branches/upstream/current/info.c
    iw/branches/upstream/current/nl80211.h
    iw/branches/upstream/current/phy.c
    iw/branches/upstream/current/reg.c
    iw/branches/upstream/current/util.c
    iw/branches/upstream/current/version.sh
    iw/branches/upstream/current/wowlan.c

Added: iw/branches/upstream/current/CONTRIBUTING
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/CONTRIBUTING?rev=1863&op=file
==============================================================================
--- iw/branches/upstream/current/CONTRIBUTING	(added)
+++ iw/branches/upstream/current/CONTRIBUTING	Thu May 29 18:39:47 2014
@@ -0,0 +1,49 @@
+
+This project embraces the Developer Certificate of Origin (DCO) for
+contributions. This means you must agree to the following prior to submitting
+patches, if you agree with this developer certificate you acknowledge this by
+adding a Signed-off-by tag to your patch commit log. Every submitted patch
+must have this.
+
+The source for the DCO:
+
+http://developercertificate.org/
+
+-----------------------------------------------------------------------
+
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
+660 York Street, Suite 102,
+San Francisco, CA 94110 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+    have the right to submit it under the open source license
+    indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+    of my knowledge, is covered under an appropriate open source
+    license and I have the right under that license to submit that
+    work with modifications, whether created in whole or in part
+    by me, under the same open source license (unless I am
+    permitted to submit under a different license), as indicated
+    in the file; or
+
+(c) The contribution was provided directly to me by some other
+    person who certified (a), (b) or (c) and I have not modified
+    it.
+
+(d) I understand and agree that this project and the contribution
+    are public and that a record of the contribution (including all
+    personal information I submit with it, including my sign-off) is
+    maintained indefinitely and may be redistributed consistent with
+    this project or the open source license(s) involved.

Modified: iw/branches/upstream/current/bitrate.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/bitrate.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/bitrate.c	(original)
+++ iw/branches/upstream/current/bitrate.c	Thu May 29 18:39:47 2014
@@ -101,12 +101,14 @@
 	char **vht_argv = NULL;
 	int vht_argc_5 = 0; int vht_argc_24 = 0;
 	int *vht_argc = NULL;
+	int sgi_24 = 0, sgi_5 = 0, lgi_24 = 0, lgi_5 = 0;
 
 	enum {
 		S_NONE,
 		S_LEGACY,
 		S_HT,
 		S_VHT,
+		S_GI,
 	} parser_state = S_NONE;
 
 	for (i = 0; i < argc; i++) {
@@ -157,8 +159,19 @@
 			vht_argv = vht_argv_5;
 			vht_argc = &vht_argc_5;
 			have_vht_mcs_5 = true;
-		}
-		else switch (parser_state) {
+		} else if (strcmp(argv[i], "sgi-2.4") == 0) {
+			sgi_24 = 1;
+			parser_state = S_GI;
+		} else if (strcmp(argv[i], "sgi-5") == 0) {
+			sgi_5 = 1;
+			parser_state = S_GI;
+		} else if (strcmp(argv[i], "lgi-2.4") == 0) {
+			lgi_24 = 1;
+			parser_state = S_GI;
+		} else if (strcmp(argv[i], "lgi-5") == 0) {
+			lgi_5 = 1;
+			parser_state = S_GI;
+		} else switch (parser_state) {
 		case S_LEGACY:
 			tmpd = strtod(argv[i], &end);
 			if (*end != '\0')
@@ -180,6 +193,8 @@
 				return 1;
 			vht_argv[(*vht_argc)++] = argv[i];
 			break;
+		case S_GI:
+			break;
 		default:
 			return 1;
 		}
@@ -193,11 +208,17 @@
 		if(!setup_vht(&txrate_vht_5, vht_argc_5, vht_argv_5))
 			return -EINVAL;
 
+	if (sgi_5 && lgi_5)
+		return 1;
+
+	if (sgi_24 && lgi_24)
+		return 1;
+
 	nl_rates = nla_nest_start(msg, NL80211_ATTR_TX_RATES);
 	if (!nl_rates)
 		goto nla_put_failure;
 
-	if (have_legacy_24 || have_ht_mcs_24 || have_vht_mcs_24) {
+	if (have_legacy_24 || have_ht_mcs_24 || have_vht_mcs_24 || sgi_24 || lgi_24) {
 		nl_band = nla_nest_start(msg, NL80211_BAND_2GHZ);
 		if (!nl_band)
 			goto nla_put_failure;
@@ -207,10 +228,14 @@
 			nla_put(msg, NL80211_TXRATE_HT, n_ht_mcs_24, ht_mcs_24);
 		if (have_vht_mcs_24)
 			nla_put(msg, NL80211_TXRATE_VHT, sizeof(txrate_vht_24), &txrate_vht_24);
+		if (sgi_24)
+			nla_put_u8(msg, NL80211_TXRATE_GI, NL80211_TXRATE_FORCE_SGI);
+		if (lgi_24)
+			nla_put_u8(msg, NL80211_TXRATE_GI, NL80211_TXRATE_FORCE_LGI);
 		nla_nest_end(msg, nl_band);
 	}
 
-	if (have_legacy_5 || have_ht_mcs_5 || have_vht_mcs_5) {
+	if (have_legacy_5 || have_ht_mcs_5 || have_vht_mcs_5 || sgi_5 || lgi_5) {
 		nl_band = nla_nest_start(msg, NL80211_BAND_5GHZ);
 		if (!nl_band)
 			goto nla_put_failure;
@@ -220,6 +245,10 @@
 			nla_put(msg, NL80211_TXRATE_HT, n_ht_mcs_5, ht_mcs_5);
 		if (have_vht_mcs_5)
 			nla_put(msg, NL80211_TXRATE_VHT, sizeof(txrate_vht_5), &txrate_vht_5);
+		if (sgi_5)
+			nla_put_u8(msg, NL80211_TXRATE_GI, NL80211_TXRATE_FORCE_SGI);
+		if (lgi_5)
+			nla_put_u8(msg, NL80211_TXRATE_GI, NL80211_TXRATE_FORCE_LGI);
 		nla_nest_end(msg, nl_band);
 	}
 
@@ -231,9 +260,9 @@
 }
 
 #define DESCR_LEGACY "[legacy-<2.4|5> <legacy rate in Mbps>*]"
-#define DESCR DESCR_LEGACY " [ht-mcs-<2.4|5> <MCS index>*] [vht-mcs-<2.4|5> <NSS:MCSx,MCSy... | NSS:MCSx-MCSy>*]"
-
-COMMAND(set, bitrates, "[legacy-<2.4|5> <legacy rate in Mbps>*] [ht-mcs-<2.4|5> <MCS index>*] [vht-mcs-<2.4|5> <NSS:MCSx,MCSy... | NSS:MCSx-MCSy>*]",
+#define DESCR DESCR_LEGACY " [ht-mcs-<2.4|5> <MCS index>*] [vht-mcs-<2.4|5> <NSS:MCSx,MCSy... | NSS:MCSx-MCSy>*] [sgi-2.4|lgi-2.4] [sgi-5|lgi-5]"
+
+COMMAND(set, bitrates, "[legacy-<2.4|5> <legacy rate in Mbps>*] [ht-mcs-<2.4|5> <MCS index>*] [vht-mcs-<2.4|5> <NSS:MCSx,MCSy... | NSS:MCSx-MCSy>*] [sgi-2.4|lgi-2.4] [sgi-5|lgi-5]",
 	NL80211_CMD_SET_TX_BITRATE_MASK, 0, CIB_NETDEV, handle_bitrates,
 	"Sets up the specified rate masks.\n"
 	"Not passing any arguments would clear the existing mask (if any).");

Modified: iw/branches/upstream/current/event.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/event.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/event.c	(original)
+++ iw/branches/upstream/current/event.c	Thu May 29 18:39:47 2014
@@ -537,7 +537,8 @@
 			nla_get_u32(tb[NL80211_ATTR_VENDOR_SUBCMD]));
 		break;
 	default:
-		printf("unknown event %d\n", gnlh->cmd);
+		printf("unknown event %d (%s)\n",
+		       gnlh->cmd, command_name(gnlh->cmd));
 		break;
 	}
 

Modified: iw/branches/upstream/current/info.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/info.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/info.c	(original)
+++ iw/branches/upstream/current/info.c	Thu May 29 18:39:47 2014
@@ -199,6 +199,9 @@
 							printf(" (for %lu sec)", time/1000);
 						}
 						printf("\n");
+						if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_CAC_TIME])
+							printf("\t\t\t  DFS CAC time: %u ms\n",
+							       nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_DFS_CAC_TIME]));
 					}
 
 				}
@@ -244,6 +247,22 @@
 		rts = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_RTS_THRESHOLD]);
 		if (rts != (unsigned int)-1)
 			printf("\tRTS threshold: %d\n", rts);
+	}
+
+	if (tb_msg[NL80211_ATTR_WIPHY_RETRY_SHORT] ||
+	    tb_msg[NL80211_ATTR_WIPHY_RETRY_LONG]) {
+		unsigned char retry_short = 0, retry_long = 0;
+
+		if (tb_msg[NL80211_ATTR_WIPHY_RETRY_SHORT])
+			retry_short = nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_RETRY_SHORT]);
+		if (tb_msg[NL80211_ATTR_WIPHY_RETRY_LONG])
+			retry_long = nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_RETRY_LONG]);
+		if (retry_short == retry_long) {
+			printf("\tRetry short long limit: %d\n", retry_short);
+		} else {
+			printf("\tRetry short limit: %d\n", retry_short);
+			printf("\tRetry long limit: %d\n", retry_long);
+		}
 	}
 
 	if (tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]) {

Modified: iw/branches/upstream/current/nl80211.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/nl80211.h?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/nl80211.h	(original)
+++ iw/branches/upstream/current/nl80211.h	Thu May 29 18:39:47 2014
@@ -303,8 +303,9 @@
  *	passed, all channels allowed for the current regulatory domain
  *	are used.  Extra IEs can also be passed from the userspace by
  *	using the %NL80211_ATTR_IE attribute.
- * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan.  Returns -ENOENT
- *	if scheduled scan is not running.
+ * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if
+ *	scheduled scan is not running. The caller may assume that as soon
+ *	as the call returns, it is safe to start a new scheduled scan again.
  * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan
  *	results available.
  * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has
@@ -418,8 +419,18 @@
  *	%NL80211_ATTR_SSID attribute, and can optionally specify the association
  *	IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
  *	%NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
- *	%NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
- *	%NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
+ *	%NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
+ *	%NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and
+ *	%NL80211_ATTR_WIPHY_FREQ_HINT.
+ *	If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are
+ *	restrictions on BSS selection, i.e., they effectively prevent roaming
+ *	within the ESS. %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT
+ *	can be included to provide a recommendation of the initial BSS while
+ *	allowing the driver to roam to other BSSes within the ESS and also to
+ *	ignore this recommendation if the indicated BSS is not ideal. Only one
+ *	set of BSSID,frequency parameters is used (i.e., either the enforcing
+ *	%NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict
+ *	%NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT).
  *	Background scan period can optionally be
  *	specified in %NL80211_ATTR_BG_SCAN_PERIOD,
  *	if not specified default background scan configuration
@@ -1555,6 +1566,19 @@
  *	data is in the format defined for the payload of the QoS Map Set element
  *	in IEEE Std 802.11-2012, 8.4.2.97.
  *
+ * @NL80211_ATTR_MAC_HINT: MAC address recommendation as initial BSS
+ * @NL80211_ATTR_WIPHY_FREQ_HINT: frequency of the recommended initial BSS
+ *
+ * @NL80211_ATTR_MAX_AP_ASSOC_STA: Device attribute that indicates how many
+ *	associated stations are supported in AP mode (including P2P GO); u32.
+ *	Since drivers may not have a fixed limit on the maximum number (e.g.,
+ *	other concurrent operations may affect this), drivers are allowed to
+ *	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_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
+ *	As specified in the &enum nl80211_tdls_peer_capability.
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1882,6 +1906,13 @@
 	NL80211_ATTR_VENDOR_EVENTS,
 
 	NL80211_ATTR_QOS_MAP,
+
+	NL80211_ATTR_MAC_HINT,
+	NL80211_ATTR_WIPHY_FREQ_HINT,
+
+	NL80211_ATTR_MAX_AP_ASSOC_STA,
+
+	NL80211_ATTR_TDLS_PEER_CAPABILITY,
 
 	/* add attributes here, update the policy in nl80211.c */
 
@@ -2304,6 +2335,7 @@
  * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
  *	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_MAX: highest frequency attribute number
  *	currently defined
  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -2322,6 +2354,7 @@
 	NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
 	NL80211_FREQUENCY_ATTR_NO_80MHZ,
 	NL80211_FREQUENCY_ATTR_NO_160MHZ,
+	NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
 
 	/* keep last */
 	__NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -2412,12 +2445,14 @@
  * 	in KHz. This is not a center a frequency but an actual regulatory
  * 	band edge.
  * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
- * 	frequency range, in KHz.
+ *	frequency range, in KHz.
  * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
  * 	for a given frequency range. The value is in mBi (100 * dBi).
  * 	If you don't have one then don't send this.
  * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
  * 	a given frequency range. The value is in mBm (100 * dBm).
+ * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
+ *	If not present or 0 default CAC time will be used.
  * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number
  *	currently defined
  * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use
@@ -2433,6 +2468,8 @@
 	NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN,
 	NL80211_ATTR_POWER_RULE_MAX_EIRP,
 
+	NL80211_ATTR_DFS_CAC_TIME,
+
 	/* keep last */
 	__NL80211_REG_RULE_ATTR_AFTER_LAST,
 	NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1
@@ -2442,9 +2479,15 @@
  * enum nl80211_sched_scan_match_attr - scheduled scan match attributes
  * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved
  * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching,
- * only report BSS with matching SSID.
+ *	only report BSS with matching SSID.
  * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a
- *	BSS in scan results. Filtering is turned off if not specified.
+ *	BSS in scan results. Filtering is turned off if not specified. Note that
+ *	if this attribute is in a match set of its own, then it is treated as
+ *	the default value for all matchsets with an SSID, rather than being a
+ *	matchset of its own without an RSSI filter. This is due to problems with
+ *	how this API was implemented in the past. Also, due to the same problem,
+ *	the only way to create a matchset with only an RSSI filter (with this
+ *	attribute) is if there's only a single matchset with the RSSI attribute.
  * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
  *	attribute number currently defined
  * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -2477,6 +2520,9 @@
  * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
  * 	this includes probe requests or modes of operation that require
  * 	beaconing.
+ * @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.
  */
 enum nl80211_reg_rule_flags {
 	NL80211_RRF_NO_OFDM		= 1<<0,
@@ -2488,6 +2534,7 @@
 	NL80211_RRF_PTMP_ONLY		= 1<<6,
 	NL80211_RRF_NO_IR		= 1<<7,
 	__NL80211_RRF_NO_IBSS		= 1<<8,
+	NL80211_RRF_AUTO_BW		= 1<<11,
 };
 
 #define NL80211_RRF_PASSIVE_SCAN	NL80211_RRF_NO_IR
@@ -3131,6 +3178,7 @@
  *	in an array of MCS numbers.
  * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
  *	see &struct nl80211_txrate_vht
+ * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi
  * @__NL80211_TXRATE_AFTER_LAST: internal
  * @NL80211_TXRATE_MAX: highest TX rate attribute
  */
@@ -3139,6 +3187,7 @@
 	NL80211_TXRATE_LEGACY,
 	NL80211_TXRATE_HT,
 	NL80211_TXRATE_VHT,
+	NL80211_TXRATE_GI,
 
 	/* keep last */
 	__NL80211_TXRATE_AFTER_LAST,
@@ -3154,6 +3203,12 @@
  */
 struct nl80211_txrate_vht {
 	__u16 mcs[NL80211_VHT_NSS_MAX];
+};
+
+enum nl80211_txrate_gi {
+	NL80211_TXRATE_DEFAULT_GI,
+	NL80211_TXRATE_FORCE_SGI,
+	NL80211_TXRATE_FORCE_LGI,
 };
 
 /**
@@ -3801,11 +3856,8 @@
  * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
  *	to work properly to suppport receiving regulatory hints from
  *	cellular base stations.
- * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active
- *	P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel
- *	in the interface combinations, even when it's only used for scan
- *	and remain-on-channel. This could be due to, for example, the
- *	remain-on-channel implementation requiring a channel context.
+ * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: (no longer available, only
+ *	here to reserve the value for API/ABI compatibility)
  * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of
  *	equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station
  *	mode
@@ -4037,4 +4089,20 @@
 	__u32 subcmd;
 };
 
+/**
+ * enum nl80211_tdls_peer_capability - TDLS peer flags.
+ *
+ * Used by tdls_mgmt() to determine which conditional elements need
+ * to be added to TDLS Setup frames.
+ *
+ * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
+ * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
+ * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
+ */
+enum nl80211_tdls_peer_capability {
+	NL80211_TDLS_PEER_HT = 1<<0,
+	NL80211_TDLS_PEER_VHT = 1<<1,
+	NL80211_TDLS_PEER_WMM = 1<<2,
+};
+
 #endif /* __LINUX_NL80211_H */

Modified: iw/branches/upstream/current/phy.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/phy.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/phy.c	(original)
+++ iw/branches/upstream/current/phy.c	Thu May 29 18:39:47 2014
@@ -232,6 +232,70 @@
 	NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_rts,
 	"Set rts threshold.");
 
+static int handle_retry(struct nl80211_state *state,
+			struct nl_cb *cb, struct nl_msg *msg,
+			int argc, char **argv, enum id_input id)
+{
+	unsigned int retry_short = 0, retry_long = 0;
+	bool have_retry_s = false, have_retry_l = false;
+	int i;
+	enum {
+		S_NONE,
+		S_SHORT,
+		S_LONG,
+	} parser_state = S_NONE;
+
+	if (!argc || (argc != 2 && argc != 4))
+		return 1;
+
+	for (i = 0; i < argc; i++) {
+		char *end;
+		unsigned int tmpul;
+
+		if (strcmp(argv[i], "short") == 0) {
+			if (have_retry_s)
+				return 1;
+			parser_state = S_SHORT;
+			have_retry_s = true;
+		} else if (strcmp(argv[i], "long") == 0) {
+			if (have_retry_l)
+				return 1;
+			parser_state = S_LONG;
+			have_retry_l = true;
+		} else {
+			tmpul = strtoul(argv[i], &end, 10);
+			if (*end != '\0')
+				return 1;
+			if (!tmpul || tmpul > 255)
+				return -EINVAL;
+			switch (parser_state) {
+			case S_SHORT:
+				retry_short = tmpul;
+				break;
+			case S_LONG:
+				retry_long = tmpul;
+				break;
+			default:
+				return 1;
+			}
+		}
+	}
+
+	if (!have_retry_s && !have_retry_l)
+		return 1;
+	if (have_retry_s)
+		NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_RETRY_SHORT, retry_short);
+	if (have_retry_l)
+		NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_RETRY_LONG, retry_long);
+
+	return 0;
+ nla_put_failure:
+	return -ENOBUFS;
+}
+COMMAND(set, retry, "[short <limit>] [long <limit>]",
+	NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_retry,
+	"Set retry limit.");
+
 static int handle_netns(struct nl80211_state *state,
 			struct nl_cb *cb,
 			struct nl_msg *msg,

Modified: iw/branches/upstream/current/reg.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/reg.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/reg.c	(original)
+++ iw/branches/upstream/current/reg.c	Thu May 29 18:39:47 2014
@@ -134,6 +134,7 @@
 		[NL80211_ATTR_FREQ_RANGE_MAX_BW]	= { .type = NLA_U32 },
 		[NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN]	= { .type = NLA_U32 },
 		[NL80211_ATTR_POWER_RULE_MAX_EIRP]	= { .type = NLA_U32 },
+		[NL80211_ATTR_DFS_CAC_TIME]		= { .type = NLA_U32 },
 	};
 
 	nla_parse(tb_msg, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
@@ -180,6 +181,11 @@
 			printf("N/A");
 
 		printf(", %d)", MBM_TO_DBM(max_eirp_mbm));
+
+		if ((flags & NL80211_RRF_DFS) && tb_rule[NL80211_ATTR_DFS_CAC_TIME])
+			printf(", (%u ms)", nla_get_u32(tb_rule[NL80211_ATTR_DFS_CAC_TIME]));
+		else
+			printf(", (N/A)");
 
 		if (!flags) {
 			printf("\n");

Modified: iw/branches/upstream/current/util.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/util.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/util.c	(original)
+++ iw/branches/upstream/current/util.c	Thu May 29 18:39:47 2014
@@ -671,8 +671,8 @@
 	PRINT_VHT_CAPA(22, "+HTC-VHT");
 	/* max A-MPDU */
 	/* VHT link adaptation */
-	PRINT_VHT_CAPA(29, "RX antenna pattern consistency");
-	PRINT_VHT_CAPA(30, "TX antenna pattern consistency");
+	PRINT_VHT_CAPA(28, "RX antenna pattern consistency");
+	PRINT_VHT_CAPA(29, "TX antenna pattern consistency");
 
 	printf("\t\tVHT RX MCS set:\n");
 	tmp = mcs[0] | (mcs[1] << 8);

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

Modified: iw/branches/upstream/current/wowlan.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/wowlan.c?rev=1863&op=diff
==============================================================================
--- iw/branches/upstream/current/wowlan.c	(original)
+++ iw/branches/upstream/current/wowlan.c	Thu May 29 18:39:47 2014
@@ -357,25 +357,26 @@
 				    trig[NL80211_WOWLAN_TRIG_PKT_PATTERN],
 				    rem_pattern) {
 			struct nlattr *patattr[NUM_NL80211_PKTPAT];
-			int i, patlen, masklen, pkt_offset;
+			int i, patlen, masklen;
 			uint8_t *mask, *pat;
 			nla_parse(patattr, MAX_NL80211_PKTPAT,
 				  nla_data(pattern), nla_len(pattern), NULL);
 			if (!patattr[NL80211_PKTPAT_MASK] ||
-			    !patattr[NL80211_PKTPAT_PATTERN] ||
-			    !patattr[NL80211_PKTPAT_OFFSET]) {
+			    !patattr[NL80211_PKTPAT_PATTERN]) {
 				printf(" * (invalid pattern specification)\n");
 				continue;
 			}
 			masklen = nla_len(patattr[NL80211_PKTPAT_MASK]);
 			patlen = nla_len(patattr[NL80211_PKTPAT_PATTERN]);
-			pkt_offset =
-				nla_get_u32(patattr[NL80211_PKTPAT_OFFSET]);
 			if (DIV_ROUND_UP(patlen, 8) != masklen) {
 				printf(" * (invalid pattern specification)\n");
 				continue;
 			}
-			printf(" * wake up on packet offset: %d", pkt_offset);
+			if (patattr[NL80211_PKTPAT_OFFSET]) {
+				int pkt_offset =
+					nla_get_u32(patattr[NL80211_PKTPAT_OFFSET]);
+				printf(" * wake up on packet offset: %d", pkt_offset);
+			}
 			printf(" pattern: ");
 			pat = nla_data(patattr[NL80211_PKTPAT_PATTERN]);
 			mask = nla_data(patattr[NL80211_PKTPAT_MASK]);




More information about the Pkg-wpa-devel mailing list