[pkg-wpa-devel] r1310 - in /iw/branches/upstream/current: Makefile genl.c info.c interface.c iw.8 iw.c iw.h mesh.c nl80211.h phy.c reg.c station.c version.sh
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Sun Jan 25 20:23:16 UTC 2009
Author: kelmo-guest
Date: Sun Jan 25 20:23:16 2009
New Revision: 1310
URL: http://svn.debian.org/wsvn/?sc=1&rev=1310
Log:
[svn-upgrade] Integrating new upstream version, iw (0.9.9)
Modified:
iw/branches/upstream/current/Makefile
iw/branches/upstream/current/genl.c
iw/branches/upstream/current/info.c
iw/branches/upstream/current/interface.c
iw/branches/upstream/current/iw.8
iw/branches/upstream/current/iw.c
iw/branches/upstream/current/iw.h
iw/branches/upstream/current/mesh.c
iw/branches/upstream/current/nl80211.h
iw/branches/upstream/current/phy.c
iw/branches/upstream/current/reg.c
iw/branches/upstream/current/station.c
iw/branches/upstream/current/version.sh
Modified: iw/branches/upstream/current/Makefile
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/Makefile?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/Makefile (original)
+++ iw/branches/upstream/current/Makefile Sun Jan 25 20:23:16 2009
@@ -10,13 +10,27 @@
INSTALL ?= install
CC ?= "gcc"
-CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration `pkg-config --cflags libnl-1`
-CFLAGS += -O2 -g
-LDFLAGS += `pkg-config --libs libnl-1`
-NLVERSION = 1.0
+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
ALL = iw
+
+NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
+NL2FOUND := $(shell pkg-config --atleast-version=2 libnl-2.0 && echo Y)
+
+ifeq ($(NL1FOUND),Y)
+NLLIBNAME = libnl-1
+endif
+
+ifeq ($(NL2FOUND),Y)
+CFLAGS += -DCONFIG_LIBNL20
+LIBS += -lnl-genl
+NLLIBNAME = libnl-2.0
+endif
+
+LIBS += $(shell pkg-config --libs $(NLLIBNAME))
+CFLAGS += $(shell pkg-config --cflags $(NLLIBNAME))
ifeq ($(V),1)
Q=
@@ -29,8 +43,13 @@
all: version_check $(ALL)
version_check:
- @if ! pkg-config --atleast-version=$(NLVERSION) libnl-1; then echo "You need at least libnl version $(NLVERSION)"; exit 1; fi
-
+ifeq ($(NL2FOUND),Y)
+else
+ifeq ($(NL1FOUND),Y)
+else
+ $(error No libnl found)
+endif
+endif
version.h: version.sh
@$(NQ) ' GEN version.h'
@@ -42,7 +61,7 @@
iw: $(OBJS)
@$(NQ) ' CC ' iw
- $(Q)$(CC) $(LDFLAGS) $(OBJS) -o iw
+ $(Q)$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o iw
check:
$(Q)$(MAKE) all CC="REAL_CC=$(CC) CHECK=\"sparse -Wall\" cgcc"
Modified: iw/branches/upstream/current/genl.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/genl.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/genl.c (original)
+++ iw/branches/upstream/current/genl.c Sun Jan 25 20:23:16 2009
@@ -8,6 +8,8 @@
#include <netlink/genl/ctrl.h>
#include <netlink/msg.h>
#include <netlink/attr.h>
+
+#include "iw.h"
static int error_handler(struct sockaddr_nl *nla, struct nlmsgerr *err,
void *arg)
Modified: iw/branches/upstream/current/info.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/info.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/info.c (original)
+++ iw/branches/upstream/current/info.c Sun Jan 25 20:23:16 2009
@@ -151,14 +151,17 @@
printf(" (%.1f dBm)", 0.01 * nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_MAX_TX_POWER]));
open = 0;
- if (tb_freq[NL80211_FREQUENCY_ATTR_DISABLED])
+ if (tb_freq[NL80211_FREQUENCY_ATTR_DISABLED]) {
print_flag("disabled", &open);
+ goto next;
+ }
if (tb_freq[NL80211_FREQUENCY_ATTR_PASSIVE_SCAN])
print_flag("passive scanning", &open);
if (tb_freq[NL80211_FREQUENCY_ATTR_NO_IBSS])
print_flag("no IBSS", &open);
if (tb_freq[NL80211_FREQUENCY_ATTR_RADAR])
print_flag("radar detection", &open);
+ next:
if (open)
printf(")");
printf("\n");
Modified: iw/branches/upstream/current/interface.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/interface.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/interface.c (original)
+++ iw/branches/upstream/current/interface.c Sun Jan 25 20:23:16 2009
@@ -92,6 +92,14 @@
} else if (strcmp(tpstr, "monitor") == 0) {
*type = NL80211_IFTYPE_MONITOR;
return 1;
+ } else if (strcmp(tpstr, "master") == 0) {
+ *type = NL80211_IFTYPE_UNSPECIFIED;
+ fprintf(stderr, "See http://wireless.kernel.org/RTFM-AP.\n");
+ return 2;
+ } else if (strcmp(tpstr, "ap") == 0) {
+ *type = NL80211_IFTYPE_UNSPECIFIED;
+ fprintf(stderr, "See http://wireless.kernel.org/RTFM-AP.\n");
+ return 2;
} else if (strcmp(tpstr, "__ap") == 0) {
*type = NL80211_IFTYPE_AP;
return 1;
@@ -132,8 +140,8 @@
argv++;
tpset = get_if_type(&argc, &argv, &type);
- if (tpset <= 0)
- return 1;
+ if (tpset != 1)
+ return tpset;
if (argc) {
if (strcmp(argv[0], "mesh_id") == 0) {
Modified: iw/branches/upstream/current/iw.8
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/iw.8?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/iw.8 (original)
+++ iw/branches/upstream/current/iw.8 Sun Jan 25 20:23:16 2009
@@ -6,9 +6,10 @@
.ad l
.in +8
.ti -8
-.B ip
-.RI [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
-.BR help " }"
+.B iw
+.RI [ " OPTIONS " ] " " { "
+.BR help " |"
+.RI ""OBJECT " " COMMAND " }"
.sp
.ti -8
@@ -17,9 +18,13 @@
.sp
.ti -8
-.IR OPTIONS " := { --debug }"
+.IR OPTIONS " := { --version | --debug }"
.SH OPTIONS
+
+.TP
+.BR " --version"
+print version information and exit.
.TP
.BR " --debug"
@@ -31,12 +36,16 @@
.I OBJECT
.TP
-.B dev
+.B dev <interface name>
- network interface.
.TP
-.B phy
+.B phy <phy name>
- wireless hardware device.
+
+.TP
+.B reg
+- regulatory agent.
.SS
.I COMMAND
@@ -47,4 +56,9 @@
will print all supported commands.
.SH SEE ALSO
-.BR ip (8)
+.BR ip (8),
+.BR crda (8),
+.BR regdbdump (8),
+.BR regulatory.bin (5)
+
+.BR http://wireless.kernel.org/en/users/Documentation/iw
Modified: iw/branches/upstream/current/iw.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/iw.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/iw.c (original)
+++ iw/branches/upstream/current/iw.c Sun Jan 25 20:23:16 2009
@@ -23,13 +23,37 @@
#include "iw.h"
#include "version.h"
-int debug = 0;
+#ifndef CONFIG_LIBNL20
+/* libnl 2.0 compatibility code */
+
+static inline struct nl_handle *nl_socket_alloc(void)
+{
+ return nl_handle_alloc();
+}
+
+static inline void nl_socket_free(struct nl_handle *h)
+{
+ nl_handle_destroy(h);
+}
+
+static inline int __genl_ctrl_alloc_cache(struct nl_handle *h, struct nl_cache **cache)
+{
+ struct nl_cache *tmp = genl_ctrl_alloc_cache(h);
+ if (!tmp)
+ return -ENOMEM;
+ *cache = tmp;
+ return 0;
+}
+#define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
+#endif /* CONFIG_LIBNL20 */
+
+static int debug = 0;
static int nl80211_init(struct nl80211_state *state)
{
int err;
- state->nl_handle = nl_handle_alloc();
+ state->nl_handle = nl_socket_alloc();
if (!state->nl_handle) {
fprintf(stderr, "Failed to allocate netlink handle.\n");
return -ENOMEM;
@@ -41,8 +65,7 @@
goto out_handle_destroy;
}
- state->nl_cache = genl_ctrl_alloc_cache(state->nl_handle);
- if (!state->nl_cache) {
+ if (genl_ctrl_alloc_cache(state->nl_handle, &state->nl_cache)) {
fprintf(stderr, "Failed to allocate generic netlink cache.\n");
err = -ENOMEM;
goto out_handle_destroy;
@@ -60,7 +83,7 @@
out_cache_free:
nl_cache_free(state->nl_cache);
out_handle_destroy:
- nl_handle_destroy(state->nl_handle);
+ nl_socket_free(state->nl_handle);
return err;
}
@@ -68,7 +91,7 @@
{
genl_family_put(state->nl80211);
nl_cache_free(state->nl_cache);
- nl_handle_destroy(state->nl_handle);
+ nl_socket_free(state->nl_handle);
}
__COMMAND(NULL, NULL, NULL, 0, 0, 0, CIB_NONE, NULL);
@@ -284,12 +307,14 @@
genlmsg_attrlen(gnlh, 0), NULL);
switch (gnlh->cmd) {
- case NL80211_CMD_NEW_WIPHY: {
+ case NL80211_CMD_NEW_WIPHY:
printf("wiphy rename: phy #%d to %s\n",
nla_get_u32(tb[NL80211_ATTR_WIPHY]),
nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
break;
- }
+ default:
+ printf("unknown event: %d\n", gnlh->cmd);
+ break;
}
return NL_SKIP;
Modified: iw/branches/upstream/current/iw.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/iw.h?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/iw.h (original)
+++ iw/branches/upstream/current/iw.h Sun Jan 25 20:23:16 2009
@@ -1,6 +1,7 @@
#ifndef __IW_H
#define __IW_H
+#include <netlink/netlink.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
@@ -10,7 +11,11 @@
#define ETH_ALEN 6
struct nl80211_state {
+#ifdef CONFIG_LIBNL20
+ struct nl_sock *nl_handle;
+#else
struct nl_handle *nl_handle;
+#endif
struct nl_cache *nl_cache;
struct genl_family *nl80211;
};
Modified: iw/branches/upstream/current/mesh.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/mesh.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/mesh.c (original)
+++ iw/branches/upstream/current/mesh.c Sun Jan 25 20:23:16 2009
@@ -93,32 +93,32 @@
return 0;
}
-void _print_u8(struct nlattr *a)
+static void _print_u8(struct nlattr *a)
{
printf("%d", nla_get_u8(a));
}
-void _print_u16(struct nlattr *a)
+static void _print_u16(struct nlattr *a)
{
printf("%d", nla_get_u16(a));
}
-void _print_u16_timeout(struct nlattr *a)
+static void _print_u16_timeout(struct nlattr *a)
{
printf("%d milliseconds", nla_get_u16(a));
}
-void _print_u16_in_TUs(struct nlattr *a)
+static void _print_u16_in_TUs(struct nlattr *a)
{
printf("%d TUs", nla_get_u16(a));
}
-void _print_u32_timeout(struct nlattr *a)
+static void _print_u32_timeout(struct nlattr *a)
{
printf("%u milliseconds", nla_get_u32(a));
}
-void _print_u32_in_TUs(struct nlattr *a)
+static void _print_u32_in_TUs(struct nlattr *a)
{
printf("%d TUs", nla_get_u32(a));
}
@@ -192,9 +192,10 @@
/* Find out what mesh parameter we want to change. */
mdescr = NULL;
- for (i = 0; ARRAY_SIZE(_mesh_param_descrs); i++)
+ for (i = 0; i < ARRAY_SIZE(_mesh_param_descrs); i++) {
if (!strcmp(_mesh_param_descrs[i].name, argv[0]))
return _mesh_param_descrs + i;
+ }
if (!mdescr) {
printf("Mesh_param must be one of: ");
@@ -213,6 +214,7 @@
int err;
uint32_t ret;
const struct mesh_param_descr *mdescr;
+ struct nlattr *container;
_any any;
mdescr = find_mesh_param(argc, argv, "change");
@@ -233,8 +235,7 @@
}
/* Construct a netlink message */
- struct nlattr *container =
- nla_nest_start(msg, NL80211_ATTR_MESH_PARAMS);
+ container = nla_nest_start(msg, NL80211_ATTR_MESH_PARAMS);
if (!container)
return -ENOBUFS;
err = mdescr->nla_put_fn(msg, mdescr->mesh_param_num, &any);
Modified: iw/branches/upstream/current/nl80211.h
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/nl80211.h?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/nl80211.h (original)
+++ iw/branches/upstream/current/nl80211.h Sun Jan 25 20:23:16 2009
@@ -201,13 +201,13 @@
* @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
* @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
* @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
- * @NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET: included with NL80211_ATTR_WIPHY_FREQ
+ * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
* if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
- * NL80211_SEC_CHAN_NO_HT = HT not allowed (i.e., same as not including
+ * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
* this attribute)
- * NL80211_SEC_CHAN_DISABLED = HT20 only
- * NL80211_SEC_CHAN_BELOW = secondary channel is below the primary channel
- * NL80211_SEC_CHAN_ABOVE = secondary channel is above the primary channel
+ * NL80211_CHAN_HT20 = HT20 only
+ * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
+ * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
*
* @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
* @NL80211_ATTR_IFNAME: network interface name
@@ -344,7 +344,7 @@
NL80211_ATTR_WIPHY_TXQ_PARAMS,
NL80211_ATTR_WIPHY_FREQ,
- NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
+ NL80211_ATTR_WIPHY_CHANNEL_TYPE,
/* add attributes here, update the policy in nl80211.c */
@@ -425,6 +425,32 @@
};
/**
+ * enum nl80211_rate_info - bitrate information
+ *
+ * These attribute types are used with %NL80211_STA_INFO_TXRATE
+ * when getting information about the bitrate of a station.
+ *
+ * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved
+ * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s)
+ * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8)
+ * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate
+ * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval
+ * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined
+ * @__NL80211_RATE_INFO_AFTER_LAST: internal use
+ */
+enum nl80211_rate_info {
+ __NL80211_RATE_INFO_INVALID,
+ NL80211_RATE_INFO_BITRATE,
+ NL80211_RATE_INFO_MCS,
+ NL80211_RATE_INFO_40_MHZ_WIDTH,
+ NL80211_RATE_INFO_SHORT_GI,
+
+ /* keep last */
+ __NL80211_RATE_INFO_AFTER_LAST,
+ NL80211_RATE_INFO_MAX = __NL80211_RATE_INFO_AFTER_LAST - 1
+};
+
+/**
* enum nl80211_sta_info - station information
*
* These attribute types are used with %NL80211_ATTR_STA_INFO
@@ -436,6 +462,9 @@
* @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
+ * @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.
*/
enum nl80211_sta_info {
__NL80211_STA_INFO_INVALID,
@@ -445,6 +474,8 @@
NL80211_STA_INFO_LLID,
NL80211_STA_INFO_PLID,
NL80211_STA_INFO_PLINK_STATE,
+ NL80211_STA_INFO_SIGNAL,
+ NL80211_STA_INFO_TX_BITRATE,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
@@ -774,10 +805,10 @@
NL80211_TXQ_Q_BK
};
-enum nl80211_sec_chan_offset {
- NL80211_SEC_CHAN_NO_HT /* No HT */,
- NL80211_SEC_CHAN_DISABLED /* HT20 only */,
- NL80211_SEC_CHAN_BELOW /* HT40- */,
- NL80211_SEC_CHAN_ABOVE /* HT40+ */
+enum nl80211_channel_type {
+ NL80211_CHAN_NO_HT,
+ NL80211_CHAN_HT20,
+ NL80211_CHAN_HT40MINUS,
+ NL80211_CHAN_HT40PLUS
};
#endif /* __LINUX_NL80211_H */
Modified: iw/branches/upstream/current/phy.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/phy.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/phy.c (original)
+++ iw/branches/upstream/current/phy.c Sun Jan 25 20:23:16 2009
@@ -33,11 +33,11 @@
const char *name;
unsigned int val;
} htmap[] = {
- { .name = "HT20", .val = NL80211_SEC_CHAN_DISABLED, },
- { .name = "HT40+", .val = NL80211_SEC_CHAN_ABOVE, },
- { .name = "HT40-", .val = NL80211_SEC_CHAN_BELOW, },
+ { .name = "HT20", .val = NL80211_CHAN_HT20, },
+ { .name = "HT40+", .val = NL80211_CHAN_HT40PLUS, },
+ { .name = "HT40-", .val = NL80211_CHAN_HT40MINUS, },
};
- unsigned int htval = NL80211_SEC_CHAN_NO_HT;
+ unsigned int htval = NL80211_CHAN_NO_HT;
unsigned int freq;
int i;
@@ -51,7 +51,7 @@
break;
}
}
- if (htval == NL80211_SEC_CHAN_NO_HT)
+ if (htval == NL80211_CHAN_NO_HT)
return 1;
}
@@ -60,7 +60,7 @@
freq = ieee80211_channel_to_frequency(freq);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
- NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET, htval);
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, htval);
return 0;
nla_put_failure:
Modified: iw/branches/upstream/current/reg.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/reg.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/reg.c (original)
+++ iw/branches/upstream/current/reg.c Sun Jan 25 20:23:16 2009
@@ -11,7 +11,7 @@
#include "nl80211.h"
#include "iw.h"
-int isalpha_upper(char letter)
+static int isalpha_upper(char letter)
{
if (letter >= 65 && letter <= 90)
return 1;
Modified: iw/branches/upstream/current/station.c
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/station.c?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/station.c (original)
+++ iw/branches/upstream/current/station.c Sun Jan 25 20:23:16 2009
@@ -33,14 +33,24 @@
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *sinfo[NL80211_STA_INFO_MAX + 1];
+ struct nlattr *rinfo[NL80211_RATE_INFO_MAX + 1];
char mac_addr[20], state_name[10], dev[20];
static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = {
[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_SIGNAL] = { .type = NLA_U8 },
+ [NL80211_STA_INFO_TX_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 },
+ };
+
+ static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = {
+ [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 },
+ [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 },
+ [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG },
+ [NL80211_RATE_INFO_SHORT_GI] = { .type = NLA_FLAG },
};
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
@@ -76,6 +86,30 @@
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_SIGNAL])
+ printf("\n\tsignal: \t%d dBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
+
+ if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
+ if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,
+ sinfo[NL80211_STA_INFO_TX_BITRATE], rate_policy)) {
+ fprintf(stderr, "failed to parse nested rate attributes!");
+ } else {
+ printf("\n\ttx bitrate:\t");
+ if (rinfo[NL80211_RATE_INFO_BITRATE]) {
+ int rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]);
+ printf("%d.%d MBit/s", rate / 10, rate % 10);
+ }
+
+ if (rinfo[NL80211_RATE_INFO_MCS])
+ printf(" MCS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_MCS]));
+ if (rinfo[NL80211_RATE_INFO_40_MHZ_WIDTH])
+ printf(" 40Mhz");
+ if (rinfo[NL80211_RATE_INFO_SHORT_GI])
+ printf(" short GI");
+ }
+ }
+
if (sinfo[NL80211_STA_INFO_LLID])
printf("\n\tmesh llid:\t%d",
nla_get_u16(sinfo[NL80211_STA_INFO_LLID]));
Modified: iw/branches/upstream/current/version.sh
URL: http://svn.debian.org/wsvn/iw/branches/upstream/current/version.sh?rev=1310&op=diff
==============================================================================
--- iw/branches/upstream/current/version.sh (original)
+++ iw/branches/upstream/current/version.sh Sun Jan 25 20:23:16 2009
@@ -1,6 +1,6 @@
#!/bin/sh
-VERSION="0.9.7"
+VERSION="0.9.9"
OUT="version.h"
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
More information about the Pkg-wpa-devel
mailing list