[pkg-wpa-devel] r1336 - in /iw/trunk: COPYING Makefile debian/changelog genl.c info.c interface.c iw.c iw.h mesh.c nl80211.h reg.c scan.c station.c version.sh
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Thu Mar 12 17:58:49 UTC 2009
Author: kelmo-guest
Date: Thu Mar 12 17:58:48 2009
New Revision: 1336
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1336
Log:
New upstream release.
Added:
iw/trunk/scan.c
- copied unchanged from r1335, iw/branches/upstream/current/scan.c
Modified:
iw/trunk/COPYING
iw/trunk/Makefile
iw/trunk/debian/changelog
iw/trunk/genl.c
iw/trunk/info.c
iw/trunk/interface.c
iw/trunk/iw.c
iw/trunk/iw.h
iw/trunk/mesh.c
iw/trunk/nl80211.h
iw/trunk/reg.c
iw/trunk/station.c
iw/trunk/version.sh
Modified: iw/trunk/COPYING
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/COPYING?rev=1336&op=diff
==============================================================================
--- iw/trunk/COPYING (original)
+++ iw/trunk/COPYING Thu Mar 12 17:58:48 2009
@@ -1,7 +1,7 @@
Copyright (c) 2007, 2008 Johannes Berg
Copyright (c) 2007 Andy Lutomirski
Copyright (c) 2007 Mike Kershaw
-Copyright (c) 2008 Luis R. Rodriguez
+Copyright (c) 2008-2009 Luis R. Rodriguez
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Modified: iw/trunk/Makefile
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/Makefile?rev=1336&op=diff
==============================================================================
--- iw/trunk/Makefile (original)
+++ iw/trunk/Makefile Thu Mar 12 17:58:48 2009
@@ -13,7 +13,7 @@
CFLAGS ?= -O2 -g
CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-OBJS = iw.o info.o phy.o interface.o station.o util.o mpath.o reg.o mesh.o genl.o
+OBJS = iw.o genl.o info.o phy.o interface.o station.o util.o mesh.o mpath.o scan.o reg.o
ALL = iw
NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
@@ -27,6 +27,10 @@
CFLAGS += -DCONFIG_LIBNL20
LIBS += -lnl-genl
NLLIBNAME = libnl-2.0
+endif
+
+ifeq ($(NLLIBNAME),)
+$(error Cannot find development files for any supported version of libnl)
endif
LIBS += $(shell pkg-config --libs $(NLLIBNAME))
@@ -55,7 +59,7 @@
@$(NQ) ' GEN version.h'
$(Q)./version.sh
-%.o: %.c iw.h version.h
+%.o: %.c iw.h version.h nl80211.h
@$(NQ) ' CC ' $@
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
Modified: iw/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/changelog?rev=1336&op=diff
==============================================================================
--- iw/trunk/debian/changelog (original)
+++ iw/trunk/debian/changelog Thu Mar 12 17:58:48 2009
@@ -1,3 +1,9 @@
+iw (0.9.10-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Kel Modderman <kel at otaku42.de> Fri, 13 Mar 2009 03:56:49 +1000
+
iw (0.9.9-2) unstable; urgency=low
* Change Priority to extra from optional to avoid override disparity.
Modified: iw/trunk/genl.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/genl.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/genl.c (original)
+++ iw/trunk/genl.c Thu Mar 12 17:58:48 2009
@@ -64,7 +64,7 @@
return NL_SKIP;
}
-int nl_get_multicast_id(struct nl_handle *handle, const char *family, const char *group)
+int nl_get_multicast_id(struct nl_sock *sock, const char *family, const char *group)
{
struct nl_msg *msg;
struct nl_cb *cb;
@@ -84,7 +84,7 @@
goto out_fail_cb;
}
- ctrlid = genl_ctrl_resolve(handle, "nlctrl");
+ ctrlid = genl_ctrl_resolve(sock, "nlctrl");
genlmsg_put(msg, 0, 0, ctrlid, 0,
0, CTRL_CMD_GETFAMILY, 0);
@@ -92,7 +92,7 @@
ret = -ENOBUFS;
NLA_PUT_STRING(msg, CTRL_ATTR_FAMILY_NAME, family);
- ret = nl_send_auto_complete(handle, msg);
+ ret = nl_send_auto_complete(sock, msg);
if (ret < 0)
goto out;
@@ -103,7 +103,7 @@
nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, family_handler, &grp);
while (ret > 0)
- nl_recvmsgs(handle, cb);
+ nl_recvmsgs(sock, cb);
if (ret == 0)
ret = grp.id;
Modified: iw/trunk/info.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/info.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/info.c (original)
+++ iw/trunk/info.c Thu Mar 12 17:58:48 2009
@@ -1,3 +1,4 @@
+#include <stdbool.h>
#include <errno.h>
#include <net/if.h>
@@ -18,6 +19,24 @@
printf(", ");
printf("%s", name);
*open = 1;
+}
+
+static void print_mcs_index(unsigned char *mcs)
+{
+ unsigned int mcs_bit;
+
+ for (mcs_bit = 0; mcs_bit <= 76; mcs_bit++) {
+ unsigned int mcs_octet = mcs_bit/8;
+ unsigned int MCS_RATE_BIT = 1 << mcs_bit % 8;
+ bool mcs_rate_idx_set;
+
+ mcs_rate_idx_set = !!(mcs[mcs_octet] & MCS_RATE_BIT);
+
+ if (!mcs_rate_idx_set)
+ continue;
+
+ printf("\t\t\tMCS index %d\n", mcs_bit);
+ }
}
static int print_phy_handler(struct nl_msg *msg, void *arg)
@@ -35,6 +54,7 @@
[NL80211_FREQUENCY_ATTR_NO_IBSS] = { .type = NLA_FLAG },
[NL80211_FREQUENCY_ATTR_RADAR] = { .type = NLA_FLAG },
[NL80211_FREQUENCY_ATTR_MAX_TX_POWER] = { .type = NLA_U32 },
+ [NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH] = { .type = NLA_U32 },
};
struct nlattr *tb_rate[NL80211_BITRATE_ATTR_MAX + 1];
@@ -70,7 +90,7 @@
#ifdef NL80211_BAND_ATTR_HT_CAPA
if (tb_band[NL80211_BAND_ATTR_HT_CAPA]) {
unsigned short cap = nla_get_u16(tb_band[NL80211_BAND_ATTR_HT_CAPA]);
-#define PCOM(fmt, args...) do { printf("\t\t\t * " fmt "\n", ##args); } while (0)
+#define PCOM(fmt, args...) do { printf("\t\t\t* " fmt "\n", ##args); } while (0)
#define PBCOM(bit, args...) if (cap & (bit)) PCOM(args)
printf("\t\tHT capabilities: 0x%.4x\n", cap);
PBCOM(0x0001, "LPDC coding");
@@ -128,10 +148,50 @@
}
if (tb_band[NL80211_BAND_ATTR_HT_MCS_SET] &&
nla_len(tb_band[NL80211_BAND_ATTR_HT_MCS_SET]) == 16) {
+ /* As defined in 7.3.2.57.4 Supported MCS Set field */
+ unsigned int tx_max_num_spatial_streams, max_rx_supp_data_rate;
unsigned char *mcs = nla_data(tb_band[NL80211_BAND_ATTR_HT_MCS_SET]);
+ bool tx_mcs_set_defined, tx_mcs_set_equal, tx_unequal_modulation;
+
printf("\t\tHT MCS set: %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x\n",
mcs[0], mcs[1], mcs[2], mcs[3], mcs[4], mcs[5], mcs[6], mcs[7],
mcs[8], mcs[9], mcs[10], mcs[11], mcs[12], mcs[13], mcs[14], mcs[15]);
+
+ max_rx_supp_data_rate = ((mcs[10] >> 8) & ((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] | ((1 << 3) | (1 << 4))) + 1;
+ tx_unequal_modulation = !!(mcs[12] & (1 << 5));
+
+ if (max_rx_supp_data_rate)
+ printf("\t\tHT Max RX data rate: %d Mbps\n", max_rx_supp_data_rate);
+ /* XXX: else see 9.6.0e.5.3 how to get this I think */
+
+ if (tx_mcs_set_defined) {
+ if (tx_mcs_set_equal) {
+ printf("\t\tHT TX/RX MCS rate indexes supported:\n");
+ print_mcs_index(&mcs[0]);
+ } else {
+ printf("\t\tHT RX MCS rate indexes supported:\n");
+ print_mcs_index(&mcs[0]);
+
+ if (tx_unequal_modulation)
+ printf("TX unequal modulation supported\n");
+ else
+ printf("TX unequal modulation not supported\n");
+
+ printf("\t\tHT TX Max spatiel streams: %d\n",
+ tx_max_num_spatial_streams);
+
+ printf("\t\tHT TX MCS rate indexes supported may differ\n");
+ }
+ }
+ else {
+ printf("\t\tHT RX MCS rate indexes supported:\n");
+ print_mcs_index(&mcs[0]);
+ printf("\t\tHT TX MCS rates indexes are undefined\n");
+ }
+
}
#endif
@@ -146,9 +206,19 @@
freq = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_FREQ]);
printf("\t\t\t* %d MHz [%d]", freq, ieee80211_frequency_to_channel(freq));
- if (tb_freq[NL80211_FREQUENCY_ATTR_MAX_TX_POWER] &&
- !tb_freq[NL80211_FREQUENCY_ATTR_DISABLED])
- printf(" (%.1f dBm)", 0.01 * nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_MAX_TX_POWER]));
+ if (!tb_freq[NL80211_FREQUENCY_ATTR_DISABLED]) {
+ bool set_freq_pow_bw = false;
+ if (tb_freq[NL80211_FREQUENCY_ATTR_MAX_TX_POWER]) {
+ printf(" (%.1f dBm", 0.01 * nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_MAX_TX_POWER]));
+ set_freq_pow_bw = true;
+ }
+ if (tb_freq[NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH]) {
+ printf(" / %d MHz", nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH]));
+ set_freq_pow_bw = true;
+ }
+ if (set_freq_pow_bw)
+ printf(")");
+ }
open = 0;
if (tb_freq[NL80211_FREQUENCY_ATTR_DISABLED]) {
@@ -184,6 +254,10 @@
}
}
+ if (tb_msg[NL80211_ATTR_MAX_NUM_SCAN_SSIDS])
+ printf("\tmax # scan SSIDs: %d\n",
+ nla_get_u8(tb_msg[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]));
+
if (!tb_msg[NL80211_ATTR_SUPPORTED_IFTYPES])
return NL_SKIP;
Modified: iw/trunk/interface.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/interface.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/interface.c (original)
+++ iw/trunk/interface.c Thu Mar 12 17:58:48 2009
@@ -36,7 +36,7 @@
while (argc) {
int ok = 0;
for (flag = __NL80211_MNTR_FLAG_INVALID;
- flag < NL80211_MNTR_FLAG_MAX; flag++) {
+ flag <= NL80211_MNTR_FLAG_MAX; flag++) {
if (strcmp(*argv, mntr_flags[flag]) == 0) {
ok = 1;
/*
Modified: iw/trunk/iw.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/iw.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/iw.c (original)
+++ iw/trunk/iw.c Thu Mar 12 17:58:48 2009
@@ -31,12 +31,12 @@
return nl_handle_alloc();
}
-static inline void nl_socket_free(struct nl_handle *h)
+static inline void nl_socket_free(struct nl_sock *h)
{
nl_handle_destroy(h);
}
-static inline int __genl_ctrl_alloc_cache(struct nl_handle *h, struct nl_cache **cache)
+static inline int __genl_ctrl_alloc_cache(struct nl_sock *h, struct nl_cache **cache)
{
struct nl_cache *tmp = genl_ctrl_alloc_cache(h);
if (!tmp)
@@ -53,19 +53,19 @@
{
int err;
- state->nl_handle = nl_socket_alloc();
- if (!state->nl_handle) {
- fprintf(stderr, "Failed to allocate netlink handle.\n");
+ state->nl_sock = nl_socket_alloc();
+ if (!state->nl_sock) {
+ fprintf(stderr, "Failed to allocate netlink socket.\n");
return -ENOMEM;
}
- if (genl_connect(state->nl_handle)) {
+ if (genl_connect(state->nl_sock)) {
fprintf(stderr, "Failed to connect to generic netlink.\n");
err = -ENOLINK;
goto out_handle_destroy;
}
- if (genl_ctrl_alloc_cache(state->nl_handle, &state->nl_cache)) {
+ if (genl_ctrl_alloc_cache(state->nl_sock, &state->nl_cache)) {
fprintf(stderr, "Failed to allocate generic netlink cache.\n");
err = -ENOMEM;
goto out_handle_destroy;
@@ -83,7 +83,7 @@
out_cache_free:
nl_cache_free(state->nl_cache);
out_handle_destroy:
- nl_socket_free(state->nl_handle);
+ nl_socket_free(state->nl_sock);
return err;
}
@@ -91,7 +91,7 @@
{
genl_family_put(state->nl80211);
nl_cache_free(state->nl_cache);
- nl_socket_free(state->nl_handle);
+ nl_socket_free(state->nl_sock);
}
__COMMAND(NULL, NULL, NULL, 0, 0, 0, CIB_NONE, NULL);
@@ -271,7 +271,7 @@
if (err)
goto out;
- err = nl_send_auto_complete(state->nl_handle, msg);
+ err = nl_send_auto_complete(state->nl_sock, msg);
if (err < 0)
goto out;
@@ -282,7 +282,7 @@
nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_handler, &err);
while (err > 0)
- nl_recvmsgs(state->nl_handle, cb);
+ nl_recvmsgs(state->nl_sock, cb);
out:
nl_cb_put(cb);
out_free_msg:
@@ -302,6 +302,8 @@
{
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ char ifname[100];
+ __u8 reg_type;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
@@ -312,6 +314,52 @@
nla_get_u32(tb[NL80211_ATTR_WIPHY]),
nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
break;
+ case NL80211_CMD_NEW_SCAN_RESULTS:
+ if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname);
+ printf("scan finished on %s (phy #%d)\n",
+ ifname, nla_get_u32(tb[NL80211_ATTR_WIPHY]));
+ break;
+ case NL80211_CMD_SCAN_ABORTED:
+ if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname);
+ printf("scan aborted on %s (phy #%d)\n",
+ ifname, nla_get_u32(tb[NL80211_ATTR_WIPHY]));
+ break;
+ case NL80211_CMD_REG_CHANGE:
+
+ printf("regulatory domain change: ");
+
+ reg_type = nla_get_u8(tb[NL80211_ATTR_REG_TYPE]);
+
+ switch (reg_type) {
+ case NL80211_REGDOM_TYPE_COUNTRY:
+ printf("set to %s by %s request",
+ nla_get_string(tb[NL80211_ATTR_REG_ALPHA2]),
+ reg_initiator_to_string(nla_get_u8(tb[NL80211_ATTR_REG_INITIATOR])));
+ if (tb[NL80211_ATTR_WIPHY])
+ printf(" on phy%d", nla_get_u32(tb[NL80211_ATTR_WIPHY]));
+ break;
+ case NL80211_REGDOM_TYPE_WORLD:
+ printf("set to world roaming by %s request",
+ reg_initiator_to_string(nla_get_u8(tb[NL80211_ATTR_REG_INITIATOR])));
+ break;
+ case NL80211_REGDOM_TYPE_CUSTOM_WORLD:
+ printf("custom world roaming rules in place on phy%d by %s request",
+ nla_get_u32(tb[NL80211_ATTR_WIPHY]),
+ reg_initiator_to_string(nla_get_u32(tb[NL80211_ATTR_REG_INITIATOR])));
+ break;
+ case NL80211_REGDOM_TYPE_INTERSECTION:
+ printf("intersection used due to a request made by %s",
+ reg_initiator_to_string(nla_get_u32(tb[NL80211_ATTR_REG_INITIATOR])));
+ if (tb[NL80211_ATTR_WIPHY])
+ printf(" on phy%d", nla_get_u32(tb[NL80211_ATTR_WIPHY]));
+ break;
+ default:
+ printf("unknown source (upgrade this utility)");
+ break;
+ }
+
+ printf("\n");
+ break;
default:
printf("unknown event: %d\n", gnlh->cmd);
break;
@@ -331,20 +379,37 @@
return -ENOMEM;
}
- mcid = nl_get_multicast_id(state->nl_handle, "nl80211", "config");
+ /* Configuration multicast group */
+ mcid = nl_get_multicast_id(state->nl_sock, "nl80211", "config");
if (mcid < 0)
return mcid;
- ret = nl_socket_add_membership(state->nl_handle, mcid);
+ ret = nl_socket_add_membership(state->nl_sock, mcid);
if (ret)
return ret;
-
+
+ /* Scan multicast group */
+ mcid = nl_get_multicast_id(state->nl_sock, "nl80211", "scan");
+ if (mcid >= 0) {
+ ret = nl_socket_add_membership(state->nl_sock, mcid);
+ if (ret)
+ return ret;
+ }
+
+ /* Regulatory multicast group */
+ mcid = nl_get_multicast_id(state->nl_sock, "nl80211", "regulatory");
+ if (mcid >= 0) {
+ ret = nl_socket_add_membership(state->nl_sock, mcid);
+ if (ret)
+ return ret;
+ }
+
/* no sequence checking for multicast messages */
nl_cb_set(cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);
nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_event, NULL);
while (1)
- nl_recvmsgs(state->nl_handle, cb);
+ nl_recvmsgs(state->nl_sock, cb);
nl_cb_put(cb);
Modified: iw/trunk/iw.h
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/iw.h?rev=1336&op=diff
==============================================================================
--- iw/trunk/iw.h (original)
+++ iw/trunk/iw.h Thu Mar 12 17:58:48 2009
@@ -10,12 +10,12 @@
#define ETH_ALEN 6
+#ifndef CONFIG_LIBNL20
+# define nl_sock nl_handle
+#endif
+
struct nl80211_state {
-#ifdef CONFIG_LIBNL20
- struct nl_sock *nl_handle;
-#else
- struct nl_handle *nl_handle;
-#endif
+ struct nl_sock *nl_sock;
struct nl_cache *nl_cache;
struct genl_family *nl80211;
};
@@ -67,6 +67,8 @@
int ieee80211_channel_to_frequency(int chan);
int ieee80211_frequency_to_channel(int freq);
-int nl_get_multicast_id(struct nl_handle *handle, const char *family, const char *group);
+int nl_get_multicast_id(struct nl_sock *sock, const char *family, const char *group);
+
+char *reg_initiator_to_string(__u8 initiator);
#endif /* __IW_H */
Modified: iw/trunk/mesh.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/mesh.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/mesh.c (original)
+++ iw/trunk/mesh.c Thu Mar 12 17:58:48 2009
@@ -170,12 +170,11 @@
static void print_all_mesh_param_descr(void)
{
int i;
- const char *comma = "";
-
- for (i = 0; i < ARRAY_SIZE(_mesh_param_descrs); i++) {
- printf("%s%s", comma, _mesh_param_descrs[i].name);
- comma = ", ";
- }
+
+ printf("Possible mesh parameters are:\n");
+
+ for (i = 0; i < ARRAY_SIZE(_mesh_param_descrs); i++)
+ printf(" - %s\n", _mesh_param_descrs[i].name);
}
static const struct mesh_param_descr* find_mesh_param(int argc, char **argv,
@@ -187,6 +186,7 @@
if (argc < 1) {
printf("You must specify which mesh parameter to %s.\n",
action_name);
+ print_all_mesh_param_descr();
return NULL;
}
@@ -198,9 +198,7 @@
}
if (!mdescr) {
- printf("Mesh_param must be one of: ");
print_all_mesh_param_descr();
- printf("\n");
return NULL;
}
return mdescr;
Modified: iw/trunk/nl80211.h
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/nl80211.h?rev=1336&op=diff
==============================================================================
--- iw/trunk/nl80211.h (original)
+++ iw/trunk/nl80211.h Thu Mar 12 17:58:48 2009
@@ -47,7 +47,7 @@
* @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
* %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
* %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or
- * %NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET.
+ * %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
* @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
* or rename notification. Has attributes %NL80211_ATTR_WIPHY and
* %NL80211_ATTR_WIPHY_NAME.
@@ -72,8 +72,8 @@
*
* @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
* by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
- * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or
- * %NL80211_ATTR_KEY_THRESHOLD.
+ * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
+ * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
* @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
* %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER
* attributes.
@@ -84,7 +84,7 @@
* %NL80222_CMD_NEW_BEACON message)
* @NL80211_CMD_SET_BEACON: set the beacon on an access point interface
* using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD,
- * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes.
+ * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes.
* @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface,
* parameters are like for %NL80211_CMD_SET_BEACON.
* @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it
@@ -113,6 +113,8 @@
* @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by
* %NL80211_ATTR_IFINDEX.
*
+ * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set
+ * regulatory domain.
* @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command
* after being queried by the kernel. CRDA replies by sending a regulatory
* domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our
@@ -133,6 +135,32 @@
* @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the
* interface identified by %NL80211_ATTR_IFINDEX
*
+ * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The
+ * interface is identified with %NL80211_ATTR_IFINDEX and the management
+ * frame subtype with %NL80211_ATTR_MGMT_SUBTYPE. The extra IE data to be
+ * added to the end of the specified management frame is specified with
+ * %NL80211_ATTR_IE. If the command succeeds, the requested data will be
+ * added to all specified management frames generated by
+ * kernel/firmware/driver.
+ *
+ * @NL80211_CMD_GET_SCAN: get scan results
+ * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
+ * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
+ * NL80211_CMD_GET_SCAN and on the "scan" multicast group)
+ * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
+ * partial scan results may be available
+ *
+ * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
+ * has been changed and provides details of the request information
+ * that caused the change such as who initiated the regulatory request
+ * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
+ * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
+ * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
+ * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
+ * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
+ * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
+ * to (%NL80211_ATTR_REG_ALPHA2).
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -178,6 +206,17 @@
NL80211_CMD_GET_MESH_PARAMS,
NL80211_CMD_SET_MESH_PARAMS,
+ NL80211_CMD_SET_MGMT_EXTRA_IE,
+
+ NL80211_CMD_GET_REG,
+
+ NL80211_CMD_GET_SCAN,
+ NL80211_CMD_TRIGGER_SCAN,
+ NL80211_CMD_NEW_SCAN_RESULTS,
+ NL80211_CMD_SCAN_ABORTED,
+
+ NL80211_CMD_REG_CHANGE,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -190,6 +229,9 @@
* here
*/
#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS
+#define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE
+
+#define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE
/**
* enum nl80211_attrs - nl80211 netlink attributes
@@ -284,6 +326,29 @@
* supported interface types, each a flag attribute with the number
* of the interface mode.
*
+ * @NL80211_ATTR_MGMT_SUBTYPE: Management frame subtype for
+ * %NL80211_CMD_SET_MGMT_EXTRA_IE.
+ *
+ * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with
+ * %NL80211_CMD_SET_MGMT_EXTRA_IE).
+ *
+ * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with
+ * a single scan request, a wiphy attribute.
+ *
+ * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
+ * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
+ * scanning and include a zero-length SSID (wildcard) for wildcard scan
+ * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the
+ * scan result list changes (BSS expired or added) so that applications
+ * can verify that they got a single, consistent snapshot (when all dump
+ * messages carried the same generation number)
+ * @NL80211_ATTR_BSS: scan result BSS
+ *
+ * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
+ * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
+ * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently
+ * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -346,6 +411,21 @@
NL80211_ATTR_WIPHY_FREQ,
NL80211_ATTR_WIPHY_CHANNEL_TYPE,
+ NL80211_ATTR_KEY_DEFAULT_MGMT,
+
+ NL80211_ATTR_MGMT_SUBTYPE,
+ NL80211_ATTR_IE,
+
+ NL80211_ATTR_MAX_NUM_SCAN_SSIDS,
+
+ NL80211_ATTR_SCAN_FREQUENCIES,
+ NL80211_ATTR_SCAN_SSIDS,
+ NL80211_ATTR_SCAN_GENERATION,
+ NL80211_ATTR_BSS,
+
+ NL80211_ATTR_REG_INITIATOR,
+ NL80211_ATTR_REG_TYPE,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -360,7 +440,11 @@
#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES
#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS
#define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ
-#define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET
+#define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE
+#define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE
+#define NL80211_ATTR_IE NL80211_ATTR_IE
+#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR
+#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE
#define NL80211_MAX_SUPP_RATES 32
#define NL80211_MAX_SUPP_REG_RULES 32
@@ -412,12 +496,14 @@
* @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
* with short barker preamble
* @NL80211_STA_FLAG_WME: station is WME/QoS capable
+ * @NL80211_STA_FLAG_MFP: station uses management frame protection
*/
enum nl80211_sta_flags {
__NL80211_STA_FLAG_INVALID,
NL80211_STA_FLAG_AUTHORIZED,
NL80211_STA_FLAG_SHORT_PREAMBLE,
NL80211_STA_FLAG_WME,
+ NL80211_STA_FLAG_MFP,
/* keep last */
__NL80211_STA_FLAG_AFTER_LAST,
@@ -465,6 +551,9 @@
* @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
* @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
* containing info as possible, see &enum nl80211_sta_info_txrate.
+ * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station)
+ * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
+ * station)
*/
enum nl80211_sta_info {
__NL80211_STA_INFO_INVALID,
@@ -476,6 +565,8 @@
NL80211_STA_INFO_PLINK_STATE,
NL80211_STA_INFO_SIGNAL,
NL80211_STA_INFO_TX_BITRATE,
+ NL80211_STA_INFO_RX_PACKETS,
+ NL80211_STA_INFO_TX_PACKETS,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
@@ -573,6 +664,7 @@
* on this channel in current regulatory domain.
* @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
* (100 * dBm).
+ * @NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH: max bandwidth allowed, given in MHz
*/
enum nl80211_frequency_attr {
__NL80211_FREQUENCY_ATTR_INVALID,
@@ -582,6 +674,7 @@
NL80211_FREQUENCY_ATTR_NO_IBSS,
NL80211_FREQUENCY_ATTR_RADAR,
NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
+ NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH,
/* keep last */
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -589,6 +682,7 @@
};
#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
+#define NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH
/**
* enum nl80211_bitrate_attr - bitrate attributes
@@ -604,6 +698,48 @@
/* keep last */
__NL80211_BITRATE_ATTR_AFTER_LAST,
NL80211_BITRATE_ATTR_MAX = __NL80211_BITRATE_ATTR_AFTER_LAST - 1
+};
+
+/**
+ * enum nl80211_initiator - Indicates the initiator of a reg domain request
+ * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world
+ * regulatory domain.
+ * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the
+ * regulatory domain.
+ * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the
+ * wireless core it thinks its knows the regulatory domain we should be in.
+ * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
+ * 802.11 country information element with regulatory information it
+ * thinks we should consider.
+ */
+enum nl80211_reg_initiator {
+ NL80211_REGDOM_SET_BY_CORE,
+ NL80211_REGDOM_SET_BY_USER,
+ NL80211_REGDOM_SET_BY_DRIVER,
+ NL80211_REGDOM_SET_BY_COUNTRY_IE,
+};
+
+/**
+ * enum nl80211_reg_type - specifies the type of regulatory domain
+ * @NL80211_REGDOM_TYPE_COUNTRY: the regulatory domain set is one that pertains
+ * to a specific country. When this is set you can count on the
+ * ISO / IEC 3166 alpha2 country code being valid.
+ * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory
+ * domain.
+ * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom
+ * driver specific world regulatory domain. These do not apply system-wide
+ * and are only applicable to the individual devices which have requested
+ * them to be applied.
+ * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product
+ * of an intersection between two regulatory domains -- the previously
+ * set regulatory domain on the system and the last accepted regulatory
+ * domain request to be processed.
+ */
+enum nl80211_reg_type {
+ NL80211_REGDOM_TYPE_COUNTRY,
+ NL80211_REGDOM_TYPE_WORLD,
+ NL80211_REGDOM_TYPE_CUSTOM_WORLD,
+ NL80211_REGDOM_TYPE_INTERSECTION,
};
/**
@@ -811,4 +947,38 @@
NL80211_CHAN_HT40MINUS,
NL80211_CHAN_HT40PLUS
};
+
+/**
+ * enum nl80211_bss - netlink attributes for a BSS
+ *
+ * @__NL80211_BSS_INVALID: invalid
+ * @NL80211_BSS_FREQUENCY: frequency in MHz (u32)
+ * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64)
+ * @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)
+ * @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
+ * in unspecified units, scaled to 0..100 (u8)
+ * @__NL80211_BSS_AFTER_LAST: internal
+ * @NL80211_BSS_MAX: highest BSS attribute
+ */
+enum nl80211_bss {
+ __NL80211_BSS_INVALID,
+ NL80211_BSS_BSSID,
+ NL80211_BSS_FREQUENCY,
+ NL80211_BSS_TSF,
+ NL80211_BSS_BEACON_INTERVAL,
+ NL80211_BSS_CAPABILITY,
+ NL80211_BSS_INFORMATION_ELEMENTS,
+ NL80211_BSS_SIGNAL_MBM,
+ NL80211_BSS_SIGNAL_UNSPEC,
+
+ /* keep last */
+ __NL80211_BSS_AFTER_LAST,
+ NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
+};
+
#endif /* __LINUX_NL80211_H */
Modified: iw/trunk/reg.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/reg.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/reg.c (original)
+++ iw/trunk/reg.c Thu Mar 12 17:58:48 2009
@@ -1,6 +1,7 @@
#include <net/if.h>
#include <errno.h>
#include <string.h>
+#include <stdbool.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
@@ -11,26 +12,49 @@
#include "nl80211.h"
#include "iw.h"
-static int isalpha_upper(char letter)
+#define MHZ_TO_KHZ(freq) ((freq) * 1000)
+#define KHZ_TO_MHZ(freq) ((freq) / 1000)
+#define DBI_TO_MBI(gain) ((gain) * 100)
+#define MBI_TO_DBI(gain) ((gain) / 100)
+#define DBM_TO_MBM(gain) ((gain) * 100)
+#define MBM_TO_DBM(gain) ((gain) / 100)
+
+static bool isalpha_upper(char letter)
{
if (letter >= 65 && letter <= 90)
- return 1;
- return 0;
+ return true;
+ return false;
}
-static int is_alpha2(char *alpha2)
+static bool is_alpha2(char *alpha2)
{
if (isalpha_upper(alpha2[0]) && isalpha_upper(alpha2[1]))
- return 1;
- return 0;
+ return true;
+ return false;
}
-static int is_world_regdom(char *alpha2)
+static bool is_world_regdom(char *alpha2)
{
/* ASCII 0 */
if (alpha2[0] == 48 && alpha2[1] == 48)
- return 1;
- return 0;
+ return true;
+ return false;
+}
+
+char *reg_initiator_to_string(__u8 initiator)
+{
+ switch (initiator) {
+ case NL80211_REGDOM_SET_BY_CORE:
+ return "the wireless core upon initialization";
+ case NL80211_REGDOM_SET_BY_USER:
+ return "a user";
+ case NL80211_REGDOM_SET_BY_DRIVER:
+ return "a driver";
+ case NL80211_REGDOM_SET_BY_COUNTRY_IE:
+ return "a country IE";
+ default:
+ return "BUG";
+ }
}
static int handle_reg_set(struct nl_cb *cb,
@@ -67,3 +91,95 @@
}
COMMAND(reg, set, "<ISO/IEC 3166-1 alpha2>",
NL80211_CMD_REQ_SET_REG, 0, CIB_NONE, handle_reg_set);
+
+static int print_reg_handler(struct nl_msg *msg, void *arg)
+
+{
+#define PARSE_FLAG(nl_flag, string_value) do { \
+ if ((flags & nl_flag)) { \
+ printf(", %s", string_value); \
+ } \
+ } while (0)
+ struct nlattr *tb_msg[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
+ char *alpha2;
+ struct nlattr *nl_rule;
+ int rem_rule;
+ static struct nla_policy reg_rule_policy[NL80211_FREQUENCY_ATTR_MAX + 1] = {
+ [NL80211_ATTR_REG_RULE_FLAGS] = { .type = NLA_U32 },
+ [NL80211_ATTR_FREQ_RANGE_START] = { .type = NLA_U32 },
+ [NL80211_ATTR_FREQ_RANGE_END] = { .type = NLA_U32 },
+ [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 },
+ };
+
+ nla_parse(tb_msg, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
+ genlmsg_attrlen(gnlh, 0), NULL);
+
+ if (!tb_msg[NL80211_ATTR_REG_ALPHA2]) {
+ printf("No alpha2\n");
+ return NL_SKIP;
+ }
+
+ if (!tb_msg[NL80211_ATTR_REG_RULES]) {
+ printf("No reg rules\n");
+ return NL_SKIP;
+ }
+
+ alpha2 = nla_data(tb_msg[NL80211_ATTR_REG_ALPHA2]);
+ printf("country %s:\n", alpha2);
+
+ nla_for_each_nested(nl_rule, tb_msg[NL80211_ATTR_REG_RULES], rem_rule) {
+ struct nlattr *tb_rule[NL80211_FREQUENCY_ATTR_MAX + 1];
+ __u32 flags, start_freq_khz, end_freq_khz, max_bw_khz, max_ant_gain_mbi, max_eirp_mbm;
+
+ nla_parse(tb_rule, NL80211_FREQUENCY_ATTR_MAX, nla_data(nl_rule), nla_len(nl_rule), reg_rule_policy);
+
+ flags = nla_get_u32(tb_rule[NL80211_ATTR_REG_RULE_FLAGS]);
+ start_freq_khz = nla_get_u32(tb_rule[NL80211_ATTR_FREQ_RANGE_START]);
+ end_freq_khz = nla_get_u32(tb_rule[NL80211_ATTR_FREQ_RANGE_END]);
+ max_bw_khz = nla_get_u32(tb_rule[NL80211_ATTR_FREQ_RANGE_MAX_BW]);
+ max_ant_gain_mbi = nla_get_u32(tb_rule[NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN]);
+ max_eirp_mbm = nla_get_u32(tb_rule[NL80211_ATTR_POWER_RULE_MAX_EIRP]);
+
+
+ printf("\t(%d - %d @ %d), (",
+ KHZ_TO_MHZ(start_freq_khz), KHZ_TO_MHZ(end_freq_khz), KHZ_TO_MHZ(max_bw_khz));
+
+ if (MBI_TO_DBI(max_ant_gain_mbi))
+ printf("%d", MBI_TO_DBI(max_ant_gain_mbi));
+ else
+ printf("N/A");
+
+ printf(", %d)", MBM_TO_DBM(max_eirp_mbm));
+
+ if (!flags) {
+ printf("\n");
+ continue;
+ }
+
+ /* Sync this output format to match that of dbparse.py from wireless-regdb.git */
+ PARSE_FLAG(NL80211_RRF_NO_OFDM, "NO-OFDM");
+ PARSE_FLAG(NL80211_RRF_NO_CCK, "NO-CCK");
+ PARSE_FLAG(NL80211_RRF_NO_INDOOR, "NO-INDOOR");
+ PARSE_FLAG(NL80211_RRF_NO_OUTDOOR, "NO-OUTDOOR");
+ PARSE_FLAG(NL80211_RRF_DFS, "DFS");
+ PARSE_FLAG(NL80211_RRF_PTP_ONLY, "PTP-ONLY");
+ PARSE_FLAG(NL80211_RRF_PASSIVE_SCAN, "PASSIVE-SCAN");
+ PARSE_FLAG(NL80211_RRF_NO_IBSS, "NO-IBSS");
+
+ printf("\n");
+ }
+ return NL_OK;
+#undef PARSE_FLAG
+}
+
+static int handle_reg_get(struct nl_cb *cb,
+ struct nl_msg *msg,
+ int argc, char **argv)
+{
+ nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_reg_handler, NULL);
+ return 0;
+}
+COMMAND(reg, get, NULL, NL80211_CMD_GET_REG, 0, CIB_NONE, handle_reg_get);
Modified: iw/trunk/station.c
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/station.c?rev=1336&op=diff
==============================================================================
--- iw/trunk/station.c (original)
+++ iw/trunk/station.c Thu Mar 12 17:58:48 2009
@@ -39,6 +39,8 @@
[NL80211_STA_INFO_INACTIVE_TIME] = { .type = NLA_U32 },
[NL80211_STA_INFO_RX_BYTES] = { .type = NLA_U32 },
[NL80211_STA_INFO_TX_BYTES] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_RX_PACKETS] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_TX_PACKETS] = { .type = NLA_U32 },
[NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
[NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
[NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
@@ -83,9 +85,15 @@
if (sinfo[NL80211_STA_INFO_RX_BYTES])
printf("\n\trx bytes:\t%d",
nla_get_u32(sinfo[NL80211_STA_INFO_RX_BYTES]));
+ if (sinfo[NL80211_STA_INFO_RX_PACKETS])
+ printf("\n\trx packets:\t%d",
+ nla_get_u32(sinfo[NL80211_STA_INFO_RX_PACKETS]));
if (sinfo[NL80211_STA_INFO_TX_BYTES])
printf("\n\ttx bytes:\t%d",
nla_get_u32(sinfo[NL80211_STA_INFO_TX_BYTES]));
+ if (sinfo[NL80211_STA_INFO_TX_PACKETS])
+ printf("\n\ttx packets:\t%d",
+ nla_get_u32(sinfo[NL80211_STA_INFO_TX_PACKETS]));
if (sinfo[NL80211_STA_INFO_SIGNAL])
printf("\n\tsignal: \t%d dBm",
(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
Modified: iw/trunk/version.sh
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/version.sh?rev=1336&op=diff
==============================================================================
--- iw/trunk/version.sh (original)
+++ iw/trunk/version.sh Thu Mar 12 17:58:48 2009
@@ -1,6 +1,6 @@
#!/bin/sh
-VERSION="0.9.9"
+VERSION="0.9.10"
OUT="version.h"
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
More information about the Pkg-wpa-devel
mailing list