[pkg-wpa-devel] r1808 - in /iw/branches/upstream/current: Makefile coalesce.c connect.c info.c interface.c iw.h link.c mesh.c nl80211.h scan.c station.c util.c version.sh wowlan.c
slh-guest at users.alioth.debian.org
slh-guest at users.alioth.debian.org
Tue Sep 24 22:43:54 UTC 2013
Author: slh-guest
Date: Tue Sep 24 22:43:53 2013
New Revision: 1808
URL: http://svn.debian.org/wsvn/?sc=1&rev=1808
Log:
[svn-upgrade] new version iw (3.11)
Added:
iw/branches/upstream/current/coalesce.c
Modified:
iw/branches/upstream/current/Makefile
iw/branches/upstream/current/connect.c
iw/branches/upstream/current/info.c
iw/branches/upstream/current/interface.c
iw/branches/upstream/current/iw.h
iw/branches/upstream/current/link.c
iw/branches/upstream/current/mesh.c
iw/branches/upstream/current/nl80211.h
iw/branches/upstream/current/scan.c
iw/branches/upstream/current/station.c
iw/branches/upstream/current/util.c
iw/branches/upstream/current/version.sh
iw/branches/upstream/current/wowlan.c
Modified: iw/branches/upstream/current/Makefile
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/Makefile?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/Makefile (original)
+++ iw/branches/upstream/current/Makefile Tue Sep 24 22:43:53 2013
@@ -16,7 +16,7 @@
interface.o ibss.o station.o survey.o util.o \
mesh.o mpath.o scan.o reg.o version.o \
reason.o status.o connect.o link.o offch.o ps.o cqm.o \
- bitrate.o wowlan.o roc.o p2p.o
+ bitrate.o wowlan.o coalesce.o roc.o p2p.o
OBJS += sections.o
OBJS-$(HWSIM) += hwsim.o
Added: iw/branches/upstream/current/coalesce.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/coalesce.c?rev=1808&op=file
==============================================================================
--- iw/branches/upstream/current/coalesce.c (added)
+++ iw/branches/upstream/current/coalesce.c Tue Sep 24 22:43:53 2013
@@ -0,0 +1,285 @@
+#include <net/if.h>
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <netlink/genl/genl.h>
+#include <netlink/genl/family.h>
+#include <netlink/genl/ctrl.h>
+#include <netlink/msg.h>
+#include <netlink/attr.h>
+
+#include <arpa/inet.h>
+
+#include "nl80211.h"
+#include "iw.h"
+
+SECTION(coalesce);
+
+static int handle_coalesce_enable(struct nl80211_state *state, struct nl_cb *cb,
+ struct nl_msg *msg, int argc, char **argv,
+ enum id_input id)
+{
+ struct nlattr *nl_rules, *nl_rule = NULL, *nl_pats, *nl_pat;
+ unsigned char *pat, *mask;
+ size_t patlen;
+ int patnum = 0, pkt_offset, err = 1;
+ char *eptr, *value1, *value2, *sptr = NULL, *end, buf[16768];
+ enum nl80211_coalesce_condition condition;
+ FILE *f = fopen(argv[0], "r");
+ enum {
+ PS_DELAY,
+ PS_CONDITION,
+ PS_PATTERNS
+ } parse_state = PS_DELAY;
+ int rule_num = 0;
+
+ if (!f)
+ return 1;
+
+ nl_rules = nla_nest_start(msg, NL80211_ATTR_COALESCE_RULE);
+ if (!nl_rules)
+ return -ENOBUFS;
+
+ while (!feof(f)) {
+ char *eol;
+
+ if (!fgets(buf, sizeof(buf), f))
+ break;
+
+ eol = strchr(buf + 5, '\r');
+ if (eol)
+ *eol = 0;
+ eol = strchr(buf + 5, '\n');
+ if (eol)
+ *eol = 0;
+
+ switch (parse_state) {
+ case PS_DELAY:
+ if (strncmp(buf, "delay=", 6) == 0) {
+ char *delay = buf + 6;
+
+ rule_num++;
+ nl_rule = nla_nest_start(msg, rule_num);
+ if (!nl_rule)
+ goto close;
+
+ NLA_PUT_U32(msg, NL80211_ATTR_COALESCE_RULE_DELAY,
+ strtoul(delay, &end, 10));
+ if (*end != '\0')
+ goto close;
+ parse_state = PS_CONDITION;
+ } else {
+ goto close;
+ }
+ break;
+ case PS_CONDITION:
+ if (strncmp(buf, "condition=", 10) == 0) {
+ char *cond = buf + 10;
+
+ condition = strtoul(cond, &end, 10);
+ if (*end != '\0')
+ goto close;
+ NLA_PUT_U32(msg, NL80211_ATTR_COALESCE_RULE_CONDITION,
+ condition);
+ parse_state = PS_PATTERNS;
+ } else {
+ goto close;
+ }
+ break;
+ case PS_PATTERNS:
+ if (strncmp(buf, "patterns=", 9) == 0) {
+ char *cur_pat = buf + 9;
+ char *next_pat = strchr(buf + 9, ',');
+
+ if (next_pat) {
+ *next_pat = 0;
+ next_pat++;
+ }
+
+ nl_pats = nla_nest_start(msg, NL80211_ATTR_COALESCE_RULE_PKT_PATTERN);
+ while (1) {
+ value1 = strtok_r(cur_pat, "+", &sptr);
+ value2 = strtok_r(NULL, "+", &sptr);
+
+ if (!value2) {
+ pkt_offset = 0;
+ if (!value1)
+ goto close;
+ value2 = value1;
+ } else {
+ pkt_offset = strtoul(value1, &eptr, 10);
+ if (eptr != value1 + strlen(value1))
+ goto close;
+ }
+
+ if (parse_hex_mask(value2, &pat, &patlen, &mask))
+ goto close;
+
+ nl_pat = nla_nest_start(msg, ++patnum);
+ NLA_PUT(msg, NL80211_PKTPAT_MASK,
+ DIV_ROUND_UP(patlen, 8), mask);
+ NLA_PUT(msg, NL80211_PKTPAT_PATTERN, patlen, pat);
+ NLA_PUT_U32(msg, NL80211_PKTPAT_OFFSET,
+ pkt_offset);
+ nla_nest_end(msg, nl_pat);
+ free(mask);
+ free(pat);
+
+ if (!next_pat)
+ break;
+ cur_pat = next_pat;
+ next_pat = strchr(cur_pat, ',');
+ if (next_pat) {
+ *next_pat = 0;
+ next_pat++;
+ }
+ }
+ nla_nest_end(msg, nl_pats);
+ nla_nest_end(msg, nl_rule);
+ parse_state = PS_DELAY;
+
+ } else {
+ goto close;
+ }
+ break;
+ default:
+ if (buf[0] == '#')
+ continue;
+ goto close;
+ }
+ }
+
+ if (parse_state == PS_DELAY)
+ err = 0;
+ else
+ err = 1;
+ goto close;
+nla_put_failure:
+ err = -ENOBUFS;
+close:
+ fclose(f);
+ nla_nest_end(msg, nl_rules);
+ return err;
+}
+
+COMMAND(coalesce, enable, "<config-file>",
+ NL80211_CMD_SET_COALESCE, 0, CIB_PHY, handle_coalesce_enable,
+ "Enable coalesce with given configuration.\n"
+ "The configuration file contains coalesce rules:\n"
+ " delay=<delay>\n"
+ " condition=<condition>\n"
+ " patterns=<[offset1+]<pattern1>,<[offset2+]<pattern2>,...>\n"
+ " delay=<delay>\n"
+ " condition=<condition>\n"
+ " patterns=<[offset1+]<pattern1>,<[offset2+]<pattern2>,...>\n"
+ " ...\n"
+ "delay: maximum coalescing delay in msec.\n"
+ "condition: 1/0 i.e. 'not match'/'match' the patterns\n"
+ "patterns: each pattern is given as a bytestring with '-' in\n"
+ "places where any byte may be present, e.g. 00:11:22:-:44 will\n"
+ "match 00:11:22:33:44 and 00:11:22:33:ff:44 etc. Offset and\n"
+ "pattern should be separated by '+', e.g. 18+43:34:00:12 will\n"
+ "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,
+ struct nl_msg *msg, int argc, char **argv,
+ enum id_input id)
+{
+ /* just a set w/o coalesce attribute */
+ return 0;
+}
+COMMAND(coalesce, disable, "", NL80211_CMD_SET_COALESCE, 0, CIB_PHY,
+ handle_coalesce_disable, "Disable coalesce.");
+
+static int print_coalesce_handler(struct nl_msg *msg, void *arg)
+{
+ struct nlattr *attrs[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
+ struct nlattr *pattern, *rule;
+ int rem_pattern, rem_rule;
+ enum nl80211_coalesce_condition condition;
+ int delay;
+
+ nla_parse(attrs, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
+ genlmsg_attrlen(gnlh, 0), NULL);
+
+ if (!attrs[NL80211_ATTR_COALESCE_RULE]) {
+ printf("Coalesce is disabled.\n");
+ return NL_SKIP;
+ }
+
+ printf("Coalesce is enabled:\n");
+
+ nla_for_each_nested(rule, attrs[NL80211_ATTR_COALESCE_RULE], rem_rule) {
+ struct nlattr *ruleattr[NUM_NL80211_ATTR_COALESCE_RULE];
+
+ nla_parse(ruleattr, NL80211_ATTR_COALESCE_RULE_MAX,
+ nla_data(rule), nla_len(rule), NULL);
+
+ delay = nla_get_u32(ruleattr[NL80211_ATTR_COALESCE_RULE_DELAY]);
+ condition =
+ nla_get_u32(ruleattr[NL80211_ATTR_COALESCE_RULE_CONDITION]);
+
+ printf("Rule - max coalescing delay: %dmsec condition:", delay);
+ if (condition)
+ printf("not match\n");
+ else
+ printf("match\n");
+
+ if (ruleattr[NL80211_ATTR_COALESCE_RULE_PKT_PATTERN]) {
+ nla_for_each_nested(pattern,
+ ruleattr[NL80211_ATTR_COALESCE_RULE_PKT_PATTERN],
+ rem_pattern) {
+ struct nlattr *patattr[NUM_NL80211_PKTPAT];
+ int i, patlen, masklen, pkt_offset;
+ 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]) {
+ 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(" * packet offset: %d", pkt_offset);
+ printf(" pattern: ");
+ pat = nla_data(patattr[NL80211_PKTPAT_PATTERN]);
+ mask = nla_data(patattr[NL80211_PKTPAT_MASK]);
+ for (i = 0; i < patlen; i++) {
+ if (mask[i / 8] & (1 << (i % 8)))
+ printf("%.2x", pat[i]);
+ else
+ printf("--");
+ if (i != patlen - 1)
+ printf(":");
+ }
+ printf("\n");
+ }
+ }
+ }
+
+ return NL_SKIP;
+}
+
+static int handle_coalesce_show(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_coalesce_handler, NULL);
+
+ return 0;
+}
+COMMAND(coalesce, show, "", NL80211_CMD_GET_COALESCE, 0, CIB_PHY, handle_coalesce_show,
+ "Show coalesce status.");
Modified: iw/branches/upstream/current/connect.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/connect.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/connect.c (original)
+++ iw/branches/upstream/current/connect.c Tue Sep 24 22:43:53 2013
@@ -94,14 +94,14 @@
argv++;
}
+ err = __prepare_listen_events(state);
+ if (err)
+ return err;
+
conn_argc = 3 + argc;
conn_argv = calloc(conn_argc, sizeof(*conn_argv));
if (!conn_argv)
return -ENOMEM;
-
- err = __prepare_listen_events(state);
- if (err)
- return err;
conn_argv[0] = dev;
conn_argv[1] = "connect";
Modified: iw/branches/upstream/current/info.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/info.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/info.c (original)
+++ iw/branches/upstream/current/info.c Tue Sep 24 22:43:53 2013
@@ -432,7 +432,7 @@
[NL80211_WOWLAN_TRIG_RFKILL_RELEASE] = { .type = NLA_FLAG },
[NL80211_WOWLAN_TRIG_TCP_CONNECTION] = { .type = NLA_NESTED },
};
- struct nl80211_wowlan_pattern_support *pat;
+ struct nl80211_pattern_support *pat;
int err;
err = nla_parse_nested(tb_wowlan, MAX_NL80211_WOWLAN_TRIG,
@@ -528,6 +528,21 @@
printf("\tDevice supports AP scan.\n");
}
+ if (tb_msg[NL80211_ATTR_COALESCE_RULE]) {
+ struct nl80211_coalesce_rule_support *rule;
+ struct nl80211_pattern_support *pat;
+
+ printf("\tCoalesce support:\n");
+ rule = nla_data(tb_msg[NL80211_ATTR_COALESCE_RULE]);
+ pat = &rule->pat;
+ printf("\t\t * Maximum %u coalesce rules supported\n"
+ "\t\t * Each rule contains upto %u patterns of %u-%u bytes,\n"
+ "\t\t maximum packet offset %u bytes\n"
+ "\t\t * Maximum supported coalescing delay %u msecs\n",
+ rule->max_rules, pat->max_patterns, pat->min_pattern_len,
+ pat->max_pattern_len, pat->max_pkt_offset, rule->max_delay);
+ }
+
return NL_SKIP;
}
Modified: iw/branches/upstream/current/interface.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/interface.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/interface.c (original)
+++ iw/branches/upstream/current/interface.c Tue Sep 24 22:43:53 2013
@@ -16,7 +16,8 @@
"fcsfail: show frames with FCS errors\n"\
"control: show control frames\n"\
"otherbss: show frames from other BSSes\n"\
- "cook: use cooked mode"
+ "cook: use cooked mode\n"\
+ "active: use active mode (ACK incoming unicast packets)"
SECTION(interface);
@@ -27,6 +28,7 @@
"control",
"otherbss",
"cook",
+ "active",
};
static int parse_mntr_flags(int *_argc, char ***_argv,
Modified: iw/branches/upstream/current/iw.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/iw.h?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/iw.h (original)
+++ iw/branches/upstream/current/iw.h Tue Sep 24 22:43:53 2013
@@ -170,7 +170,7 @@
void print_ies(unsigned char *ie, int ielen, bool unknown,
enum print_ie_type ptype);
-void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
+void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
DECLARE_SECTION(set);
DECLARE_SECTION(get);
Modified: iw/branches/upstream/current/link.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/link.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/link.c (original)
+++ iw/branches/upstream/current/link.c Tue Sep 24 22:43:53 2013
@@ -165,7 +165,7 @@
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
char buf[100];
- parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
+ parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
printf("\ttx bitrate: %s\n", buf);
}
Modified: iw/branches/upstream/current/mesh.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/mesh.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/mesh.c (original)
+++ iw/branches/upstream/current/mesh.c Tue Sep 24 22:43:53 2013
@@ -155,6 +155,11 @@
static void _print_u32_timeout(struct nlattr *a)
{
printf("%u milliseconds", nla_get_u32(a));
+}
+
+static void _print_u32_in_seconds(struct nlattr *a)
+{
+ printf("%d seconds", nla_get_u32(a));
}
static void _print_u32_in_TUs(struct nlattr *a)
@@ -258,6 +263,8 @@
_my_nla_put_u32, _parse_u32_power_mode, _print_u32_power_mode},
{"mesh_awake_window", NL80211_MESHCONF_AWAKE_WINDOW,
_my_nla_put_u16, _parse_u16, _print_u16_in_TUs},
+ {"mesh_plink_timeout", NL80211_MESHCONF_PLINK_TIMEOUT,
+ _my_nla_put_u32, _parse_u32, _print_u32_in_seconds},
};
static void print_all_mesh_param_descr(void)
Modified: iw/branches/upstream/current/nl80211.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/nl80211.h?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/nl80211.h (original)
+++ iw/branches/upstream/current/nl80211.h Tue Sep 24 22:43:53 2013
@@ -26,6 +26,8 @@
*/
#include <linux/types.h>
+
+#define NL80211_GENL_NAME "nl80211"
/**
* DOC: Station handling
@@ -121,6 +123,31 @@
*
* All together, these attributes define the concurrency of virtual
* interfaces that a given device supports.
+ */
+
+/**
+ * DOC: packet coalesce support
+ *
+ * In most cases, host that receives IPv4 and IPv6 multicast/broadcast
+ * packets does not do anything with these packets. Therefore the
+ * reception of these unwanted packets causes unnecessary processing
+ * and power consumption.
+ *
+ * Packet coalesce feature helps to reduce number of received interrupts
+ * to host by buffering these packets in firmware/hardware for some
+ * predefined time. Received interrupt will be generated when one of the
+ * following events occur.
+ * a) Expiration of hardware timer whose expiration time is set to maximum
+ * coalescing delay of matching coalesce rule.
+ * b) Coalescing buffer in hardware reaches it's limit.
+ * c) Packet doesn't match any of the configured coalesce rules.
+ *
+ * User needs to configure following parameters for creating a coalesce
+ * rule.
+ * a) Maximum coalescing delay
+ * b) List of packet patterns which needs to be matched
+ * c) Condition for coalescence. pattern 'match' or 'no match'
+ * Multiple such rules can be created.
*/
/**
@@ -646,6 +673,9 @@
* @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can
* return back to normal.
*
+ * @NL80211_CMD_GET_COALESCE: Get currently supported coalesce rules.
+ * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -807,6 +837,9 @@
NL80211_CMD_CRIT_PROTOCOL_START,
NL80211_CMD_CRIT_PROTOCOL_STOP,
+
+ NL80211_CMD_GET_COALESCE,
+ NL80211_CMD_SET_COALESCE,
/* add new commands above here */
@@ -1429,6 +1462,13 @@
* @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which
* the connection should have increased reliability (u16).
*
+ * @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16).
+ * This is similar to @NL80211_ATTR_STA_AID but with a difference of being
+ * allowed to be used with the first @NL80211_CMD_SET_STATION command to
+ * update a TDLS peer STA entry.
+ *
+ * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1726,6 +1766,10 @@
NL80211_ATTR_CRIT_PROT_ID,
NL80211_ATTR_MAX_CRIT_PROT_DURATION,
+
+ NL80211_ATTR_PEER_AID,
+
+ NL80211_ATTR_COALESCE_RULE,
/* add attributes here, update the policy in nl80211.c */
@@ -1991,6 +2035,10 @@
* @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
* @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
* non-peer STA
+ * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
+ * 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_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -2020,6 +2068,8 @@
NL80211_STA_INFO_NONPEER_PM,
NL80211_STA_INFO_RX_BYTES64,
NL80211_STA_INFO_TX_BYTES64,
+ NL80211_STA_INFO_CHAIN_SIGNAL,
+ NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
@@ -2413,6 +2463,8 @@
* @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering
* @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing.
* overrides all other flags.
+ * @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address
+ * and ACK incoming unicast packets.
*
* @__NL80211_MNTR_FLAG_AFTER_LAST: internal use
* @NL80211_MNTR_FLAG_MAX: highest possible monitor flag
@@ -2424,6 +2476,7 @@
NL80211_MNTR_FLAG_CONTROL,
NL80211_MNTR_FLAG_OTHER_BSS,
NL80211_MNTR_FLAG_COOK_FRAMES,
+ NL80211_MNTR_FLAG_ACTIVE,
/* keep last */
__NL80211_MNTR_FLAG_AFTER_LAST,
@@ -2558,6 +2611,10 @@
* type &enum nl80211_mesh_power_mode (u32)
*
* @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
+ *
+ * @NL80211_MESHCONF_PLINK_TIMEOUT: If no tx activity is seen from a STA we've
+ * established peering with for longer than this time (in seconds), then
+ * remove it from the STA's list of peers. Default is 30 minutes.
*
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
*/
@@ -2590,6 +2647,7 @@
NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
NL80211_MESHCONF_POWER_MODE,
NL80211_MESHCONF_AWAKE_WINDOW,
+ NL80211_MESHCONF_PLINK_TIMEOUT,
/* keep last */
__NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -2637,6 +2695,10 @@
* @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
* implement an MPM which handles peer allocation and state.
*
+ * @NL80211_MESH_SETUP_AUTH_PROTOCOL: Inform the kernel of the authentication
+ * method (u8, as defined in IEEE 8.4.2.100.6, e.g. 0x1 for SAE).
+ * Default is no authentication method required.
+ *
* @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
*
* @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -2650,6 +2712,7 @@
NL80211_MESH_SETUP_USERSPACE_AMPE,
NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
NL80211_MESH_SETUP_USERSPACE_MPM,
+ NL80211_MESH_SETUP_AUTH_PROTOCOL,
/* keep last */
__NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -2730,6 +2793,8 @@
* and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well
* @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
* attribute must be provided as well
+ * @NL80211_CHAN_WIDTH_5: 5 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_10: 10 MHz OFDM channel
*/
enum nl80211_chan_width {
NL80211_CHAN_WIDTH_20_NOHT,
@@ -2738,6 +2803,8 @@
NL80211_CHAN_WIDTH_80,
NL80211_CHAN_WIDTH_80P80,
NL80211_CHAN_WIDTH_160,
+ NL80211_CHAN_WIDTH_5,
+ NL80211_CHAN_WIDTH_10,
};
/**
@@ -3028,11 +3095,11 @@
};
/**
- * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute
- * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute
- * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has
+ * enum nl80211_packet_pattern_attr - packet pattern attribute
+ * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute
+ * @NL80211_PKTPAT_PATTERN: the pattern, values where the mask has
* a zero bit are ignored
- * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have
+ * @NL80211_PKTPAT_MASK: pattern mask, must be long enough to have
* a bit for each byte in the pattern. The lowest-order bit corresponds
* to the first byte of the pattern, but the bytes of the pattern are
* in a little-endian-like format, i.e. the 9th byte of the pattern
@@ -3043,38 +3110,49 @@
* Note that the pattern matching is done as though frames were not
* 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
* first (including SNAP header unpacking) and then matched.
- * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
+ * @NL80211_PKTPAT_OFFSET: packet offset, pattern is matched after
* these fixed number of bytes of received packet
- * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
- * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
- */
-enum nl80211_wowlan_packet_pattern_attr {
- __NL80211_WOWLAN_PKTPAT_INVALID,
- NL80211_WOWLAN_PKTPAT_MASK,
- NL80211_WOWLAN_PKTPAT_PATTERN,
- NL80211_WOWLAN_PKTPAT_OFFSET,
-
- NUM_NL80211_WOWLAN_PKTPAT,
- MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
-};
-
-/**
- * struct nl80211_wowlan_pattern_support - pattern support information
+ * @NUM_NL80211_PKTPAT: number of attributes
+ * @MAX_NL80211_PKTPAT: max attribute number
+ */
+enum nl80211_packet_pattern_attr {
+ __NL80211_PKTPAT_INVALID,
+ NL80211_PKTPAT_MASK,
+ NL80211_PKTPAT_PATTERN,
+ NL80211_PKTPAT_OFFSET,
+
+ NUM_NL80211_PKTPAT,
+ MAX_NL80211_PKTPAT = NUM_NL80211_PKTPAT - 1,
+};
+
+/**
+ * struct nl80211_pattern_support - packet pattern support information
* @max_patterns: maximum number of patterns supported
* @min_pattern_len: minimum length of each pattern
* @max_pattern_len: maximum length of each pattern
* @max_pkt_offset: maximum Rx packet offset
*
* This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
- * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
- * capability information given by the kernel to userspace.
- */
-struct nl80211_wowlan_pattern_support {
+ * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED or in
+ * %NL80211_ATTR_COALESCE_RULE_PKT_PATTERN when that is part of
+ * %NL80211_ATTR_COALESCE_RULE in the capability information given
+ * by the kernel to userspace.
+ */
+struct nl80211_pattern_support {
__u32 max_patterns;
__u32 min_pattern_len;
__u32 max_pattern_len;
__u32 max_pkt_offset;
} __attribute__((packed));
+
+/* only for backward compatibility */
+#define __NL80211_WOWLAN_PKTPAT_INVALID __NL80211_PKTPAT_INVALID
+#define NL80211_WOWLAN_PKTPAT_MASK NL80211_PKTPAT_MASK
+#define NL80211_WOWLAN_PKTPAT_PATTERN NL80211_PKTPAT_PATTERN
+#define NL80211_WOWLAN_PKTPAT_OFFSET NL80211_PKTPAT_OFFSET
+#define NUM_NL80211_WOWLAN_PKTPAT NUM_NL80211_PKTPAT
+#define MAX_NL80211_WOWLAN_PKTPAT MAX_NL80211_PKTPAT
+#define nl80211_wowlan_pattern_support nl80211_pattern_support
/**
* enum nl80211_wowlan_triggers - WoWLAN trigger definitions
@@ -3095,7 +3173,7 @@
* pattern matching is done after the packet is converted to the MSDU.
*
* In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
- * carrying a &struct nl80211_wowlan_pattern_support.
+ * carrying a &struct nl80211_pattern_support.
*
* When reporting wakeup. it is a u32 attribute containing the 0-based
* index of the pattern that caused the wakeup, in the patterns passed
@@ -3252,7 +3330,7 @@
* @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
* u32 attribute holding the maximum length
* @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
- * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
+ * feature advertising. The mask works like @NL80211_PKTPAT_MASK
* but on the TCP payload only.
* @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
* @MAX_NL80211_WOWLAN_TCP: highest attribute number
@@ -3274,6 +3352,55 @@
/* keep last */
NUM_NL80211_WOWLAN_TCP,
MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
+};
+
+/**
+ * struct nl80211_coalesce_rule_support - coalesce rule support information
+ * @max_rules: maximum number of rules supported
+ * @pat: packet pattern support information
+ * @max_delay: maximum supported coalescing delay in msecs
+ *
+ * This struct is carried in %NL80211_ATTR_COALESCE_RULE in the
+ * capability information given by the kernel to userspace.
+ */
+struct nl80211_coalesce_rule_support {
+ __u32 max_rules;
+ struct nl80211_pattern_support pat;
+ __u32 max_delay;
+} __attribute__((packed));
+
+/**
+ * enum nl80211_attr_coalesce_rule - coalesce rule attribute
+ * @__NL80211_COALESCE_RULE_INVALID: invalid number for nested attribute
+ * @NL80211_ATTR_COALESCE_RULE_DELAY: delay in msecs used for packet coalescing
+ * @NL80211_ATTR_COALESCE_RULE_CONDITION: condition for packet coalescence,
+ * see &enum nl80211_coalesce_condition.
+ * @NL80211_ATTR_COALESCE_RULE_PKT_PATTERN: packet offset, pattern is matched
+ * after these fixed number of bytes of received packet
+ * @NUM_NL80211_ATTR_COALESCE_RULE: number of attributes
+ * @NL80211_ATTR_COALESCE_RULE_MAX: max attribute number
+ */
+enum nl80211_attr_coalesce_rule {
+ __NL80211_COALESCE_RULE_INVALID,
+ NL80211_ATTR_COALESCE_RULE_DELAY,
+ NL80211_ATTR_COALESCE_RULE_CONDITION,
+ NL80211_ATTR_COALESCE_RULE_PKT_PATTERN,
+
+ /* keep last */
+ NUM_NL80211_ATTR_COALESCE_RULE,
+ NL80211_ATTR_COALESCE_RULE_MAX = NUM_NL80211_ATTR_COALESCE_RULE - 1
+};
+
+/**
+ * enum nl80211_coalesce_condition - coalesce rule conditions
+ * @NL80211_COALESCE_CONDITION_MATCH: coalaesce Rx packets when patterns
+ * in a rule are matched.
+ * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns
+ * in a rule are not matched.
+ */
+enum nl80211_coalesce_condition {
+ NL80211_COALESCE_CONDITION_MATCH,
+ NL80211_COALESCE_CONDITION_NO_MATCH
};
/**
@@ -3556,6 +3683,10 @@
* Peering Management entity which may be implemented by registering for
* beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is
* still generated by the driver.
+ * @NL80211_FEATURE_ACTIVE_MONITOR: This driver supports an active monitor
+ * 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.
*/
enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3575,6 +3706,7 @@
NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
+ NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17,
};
/**
Modified: iw/branches/upstream/current/scan.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/scan.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/scan.c (original)
+++ iw/branches/upstream/current/scan.c Tue Sep 24 22:43:53 2013
@@ -85,12 +85,13 @@
FREQ,
IES,
SSID,
+ MESHID,
DONE,
} parse = NONE;
int freq;
bool passive = false, have_ssids = false, have_freqs = false;
- size_t tmp;
- unsigned char *ies;
+ size_t ies_len = 0, meshid_len = 0;
+ unsigned char *ies = NULL, *meshid = NULL, *tmpies;
int flags = 0;
ssids = nlmsg_alloc();
@@ -133,6 +134,9 @@
parse = DONE;
passive = true;
break;
+ } else if (strcmp(argv[i], "meshid") == 0) {
+ parse = MESHID;
+ break;
}
case DONE:
return 1;
@@ -147,17 +151,42 @@
NLA_PUT_U32(freqs, i, freq);
break;
case IES:
- ies = parse_hex(argv[i], &tmp);
+ ies = parse_hex(argv[i], &ies_len);
if (!ies)
goto nla_put_failure;
- NLA_PUT(msg, NL80211_ATTR_IE, tmp, ies);
- free(ies);
parse = NONE;
break;
case SSID:
NLA_PUT(ssids, i, strlen(argv[i]), argv[i]);
break;
- }
+ case MESHID:
+ meshid_len = strlen(argv[i]);
+ meshid = (unsigned char *) malloc(meshid_len + 2);
+ if (!meshid)
+ goto nla_put_failure;
+ meshid[0] = 114; /* mesh element id */
+ meshid[1] = meshid_len;
+ memcpy(&meshid[2], argv[i], meshid_len);
+ meshid_len += 2;
+ parse = NONE;
+ break;
+ }
+ }
+
+ if (ies || meshid) {
+ tmpies = (unsigned char *) malloc(ies_len + meshid_len);
+ if (!tmpies)
+ goto nla_put_failure;
+ if (ies) {
+ memcpy(tmpies, ies, ies_len);
+ free(ies);
+ }
+ if (meshid) {
+ memcpy(&tmpies[ies_len], meshid, meshid_len);
+ free(meshid);
+ }
+ NLA_PUT(msg, NL80211_ATTR_IE, ies_len + meshid_len, tmpies);
+ free(tmpies);
}
if (!have_ssids)
@@ -395,6 +424,9 @@
break;
case 6:
printf("PSK/SHA-256");
+ break;
+ case 7:
+ printf("TDLS/TPK");
break;
default:
printf("%.02x-%.02x-%.02x:%d",
@@ -487,6 +519,7 @@
printf(" NoPairwise");
switch ((capa & 0x000c) >> 2) {
case 0:
+ printf(" 1-PTKSA-RC");
break;
case 1:
printf(" 2-PTKSA-RC");
@@ -500,6 +533,7 @@
}
switch ((capa & 0x0030) >> 4) {
case 0:
+ printf(" 1-GTKSA-RC");
break;
case 1:
printf(" 2-GTKSA-RC");
@@ -758,6 +792,37 @@
printf("\t\t * available admission capacity: %d [*32us]\n", (data[4] << 8) | data[3]);
}
+static void print_mesh_conf(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+ printf("\n");
+ printf("\t\t * Active Path Selection Protocol ID: %d\n", data[0]);
+ printf("\t\t * Active Path Selection Metric ID: %d\n", data[1]);
+ printf("\t\t * Congestion Control Mode ID: %d\n", data[2]);
+ printf("\t\t * Synchronization Method ID: %d\n", data[3]);
+ printf("\t\t * Authentication Protocol ID: %d\n", data[4]);
+ printf("\t\t * Mesh Formation Info:\n");
+ printf("\t\t\t Number of Peerings: %d\n", (data[5] & 0x7E) >> 1);
+ if (data[5] & 0x01)
+ printf("\t\t\t Connected to Mesh Gate\n");
+ if (data[5] & 0x80)
+ printf("\t\t\t Connected to AS\n");
+ printf("\t\t * Mesh Capability\n");
+ if (data[6] & 0x01)
+ printf("\t\t\t Accepting Additional Mesh Peerings\n");
+ if (data[6] & 0x02)
+ printf("\t\t\t MCCA Supported\n");
+ if (data[6] & 0x04)
+ printf("\t\t\t MCCA Enabled\n");
+ if (data[6] & 0x08)
+ printf("\t\t\t Forwarding\n");
+ if (data[6] & 0x10)
+ printf("\t\t\t MBCA Supported\n");
+ if (data[6] & 0x20)
+ printf("\t\t\t TBTT Adjusting\n");
+ if (data[6] & 0x40)
+ printf("\t\t\t Mesh Power Save Level\n");
+}
+
struct ie_print {
const char *name;
void (*print)(const uint8_t type, uint8_t len, const uint8_t *data);
@@ -817,6 +882,7 @@
[192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
[48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
[50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
+ [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), },
[114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
[127] = { "Extended capabilities", print_capabilities, 0, 255, BIT(PRINT_SCAN), },
};
@@ -1535,7 +1601,7 @@
dump_argv[0] = argv[0];
return handle_cmd(state, id, dump_argc, dump_argv);
}
-TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]", 0, 0,
+TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]", 0, 0,
CIB_NETDEV, handle_scan_combined,
"Scan on the given frequencies and probe for the given SSIDs\n"
"(or wildcard if not given) unless passive scanning is requested.\n"
@@ -1545,7 +1611,7 @@
NL80211_CMD_GET_SCAN, NLM_F_DUMP, CIB_NETDEV, handle_scan_dump,
"Dump the current scan results. If -u is specified, print unknown\n"
"data in scan results.");
-COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]",
+COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]",
NL80211_CMD_TRIGGER_SCAN, 0, CIB_NETDEV, handle_scan,
"Trigger a scan on the given frequencies with probing for the given\n"
"SSIDs (or wildcard if not given) unless passive scanning is requested.");
Modified: iw/branches/upstream/current/station.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/station.c?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/station.c (original)
+++ iw/branches/upstream/current/station.c Tue Sep 24 22:43:53 2013
@@ -43,7 +43,7 @@
}
}
-void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
+void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
{
int rate = 0;
char *pos = buf;
@@ -91,6 +91,33 @@
" VHT-NSS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_VHT_NSS]));
}
+static char *get_chain_signal(struct nlattr *attr_list)
+{
+ struct nlattr *attr;
+ static char buf[64];
+ char *cur = buf;
+ int i = 0, rem;
+ const char *prefix;
+
+ if (!attr_list)
+ return "";
+
+ nla_for_each_nested(attr, attr_list, rem) {
+ if (i++ > 0)
+ prefix = ", ";
+ else
+ prefix = "[";
+
+ cur += snprintf(cur, sizeof(buf) - (cur - buf), "%s%d", prefix,
+ (int8_t) nla_get_u8(attr));
+ }
+
+ if (i)
+ snprintf(cur, sizeof(buf) - (cur - buf), "] ");
+
+ return buf;
+}
+
static int print_sta_handler(struct nl_msg *msg, void *arg)
{
struct nlattr *tb[NL80211_ATTR_MAX + 1];
@@ -107,6 +134,7 @@
[NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
[NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 },
[NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
+ [NL80211_STA_INFO_RX_BITRATE] = { .type = NLA_NESTED },
[NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
[NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
[NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
@@ -117,7 +145,10 @@
[NL80211_STA_INFO_LOCAL_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_PEER_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_NONPEER_PM] = { .type = NLA_U32},
+ [NL80211_STA_INFO_CHAIN_SIGNAL] = { .type = NLA_NESTED },
+ [NL80211_STA_INFO_CHAIN_SIGNAL_AVG] = { .type = NLA_NESTED },
};
+ char *chain;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
@@ -164,12 +195,19 @@
if (sinfo[NL80211_STA_INFO_TX_FAILED])
printf("\n\ttx failed:\t%u",
nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED]));
+
+ chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL]);
if (sinfo[NL80211_STA_INFO_SIGNAL])
- printf("\n\tsignal: \t%d dBm",
- (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
+ printf("\n\tsignal: \t%d %sdBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]),
+ chain);
+
+ chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL_AVG]);
if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
- printf("\n\tsignal avg:\t%d dBm",
- (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
+ printf("\n\tsignal avg:\t%d %sdBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]),
+ chain);
+
if (sinfo[NL80211_STA_INFO_T_OFFSET])
printf("\n\tToffset:\t%lld us",
(unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]));
@@ -177,8 +215,15 @@
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
char buf[100];
- parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
+ parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
printf("\n\ttx bitrate:\t%s", buf);
+ }
+
+ if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
+ char buf[100];
+
+ parse_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE], buf, sizeof(buf));
+ printf("\n\trx bitrate:\t%s", buf);
}
if (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=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/util.c (original)
+++ iw/branches/upstream/current/util.c Tue Sep 24 22:43:53 2013
@@ -240,6 +240,14 @@
[NL80211_CMD_START_P2P_DEVICE] = "start_p2p_device",
[NL80211_CMD_STOP_P2P_DEVICE] = "stop_p2p_device",
[NL80211_CMD_CONN_FAILED] = "conn_failed",
+ [NL80211_CMD_SET_MCAST_RATE] = "set_mcast_rate",
+ [NL80211_CMD_SET_MAC_ACL] = "set_mac_acl",
+ [NL80211_CMD_RADAR_DETECT] = "radar_detect",
+ [NL80211_CMD_GET_PROTOCOL_FEATURES] = "get_protocol_features",
+ [NL80211_CMD_UPDATE_FT_IES] = "update_ft_ies",
+ [NL80211_CMD_FT_EVENT] = "ft_event",
+ [NL80211_CMD_CRIT_PROTOCOL_START] = "crit_protocol_start",
+ [NL80211_CMD_CRIT_PROTOCOL_STOP] = "crit_protocol_stop",
};
static char cmdbuf[100];
@@ -566,7 +574,7 @@
unsigned int tx_max_num_spatial_streams, max_rx_supp_data_rate;
bool tx_mcs_set_defined, tx_mcs_set_equal, tx_unequal_modulation;
- max_rx_supp_data_rate = ((mcs[10] >> 8) & ((mcs[11] & 0x3) << 8));
+ max_rx_supp_data_rate = (mcs[10] & ((mcs[11] & 0x3) << 8));
tx_mcs_set_defined = !!(mcs[12] & (1 << 0));
tx_mcs_set_equal = !(mcs[12] & (1 << 1));
tx_max_num_spatial_streams = ((mcs[12] >> 2) & 3) + 1;
Modified: iw/branches/upstream/current/version.sh
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/version.sh?rev=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/version.sh (original)
+++ iw/branches/upstream/current/version.sh Tue Sep 24 22:43:53 2013
@@ -1,6 +1,6 @@
#!/bin/sh
-VERSION="3.10"
+VERSION="3.11"
OUT="$1"
if 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=1808&op=diff
==============================================================================
--- iw/branches/upstream/current/wowlan.c (original)
+++ iw/branches/upstream/current/wowlan.c Tue Sep 24 22:43:53 2013
@@ -261,11 +261,11 @@
}
pattern = nla_nest_start(patterns, ++patnum);
- NLA_PUT(patterns, NL80211_WOWLAN_PKTPAT_MASK,
+ NLA_PUT(patterns, NL80211_PKTPAT_MASK,
DIV_ROUND_UP(patlen, 8), mask);
- NLA_PUT(patterns, NL80211_WOWLAN_PKTPAT_PATTERN,
- patlen, pat);
- NLA_PUT_U32(patterns, NL80211_WOWLAN_PKTPAT_OFFSET, pkt_offset);
+ NLA_PUT(patterns, NL80211_PKTPAT_PATTERN, patlen, pat);
+ NLA_PUT_U32(patterns, NL80211_PKTPAT_OFFSET,
+ pkt_offset);
nla_nest_end(patterns, pattern);
free(mask);
free(pat);
@@ -356,29 +356,29 @@
nla_for_each_nested(pattern,
trig[NL80211_WOWLAN_TRIG_PKT_PATTERN],
rem_pattern) {
- struct nlattr *patattr[NUM_NL80211_WOWLAN_PKTPAT];
+ struct nlattr *patattr[NUM_NL80211_PKTPAT];
int i, patlen, masklen, pkt_offset;
uint8_t *mask, *pat;
- nla_parse(patattr, MAX_NL80211_WOWLAN_PKTPAT,
- nla_data(pattern), nla_len(pattern),
- NULL);
- if (!patattr[NL80211_WOWLAN_PKTPAT_MASK] ||
- !patattr[NL80211_WOWLAN_PKTPAT_PATTERN] ||
- !patattr[NL80211_WOWLAN_PKTPAT_OFFSET]) {
+ 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]) {
printf(" * (invalid pattern specification)\n");
continue;
}
- masklen = nla_len(patattr[NL80211_WOWLAN_PKTPAT_MASK]);
- patlen = nla_len(patattr[NL80211_WOWLAN_PKTPAT_PATTERN]);
- pkt_offset = nla_get_u32(patattr[NL80211_WOWLAN_PKTPAT_OFFSET]);
+ 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);
printf(" pattern: ");
- pat = nla_data(patattr[NL80211_WOWLAN_PKTPAT_PATTERN]);
- mask = nla_data(patattr[NL80211_WOWLAN_PKTPAT_MASK]);
+ pat = nla_data(patattr[NL80211_PKTPAT_PATTERN]);
+ mask = nla_data(patattr[NL80211_PKTPAT_MASK]);
for (i = 0; i < patlen; i++) {
if (mask[i / 8] & (1 << (i % 8)))
printf("%.2x", pat[i]);
More information about the Pkg-wpa-devel
mailing list