Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 17 commits
  • 17 files changed
  • 0 commit comments
  • 7 contributors
Commits on Nov 29, 2011
@greearb iw: Support ht-capability overrides mask.
Let user know which capabilities are supported.
a82abc2
Commits on Dec 06, 2011
@jmberg jmberg update nl80211.h 564eb40
Simon Wunderlich iw: add support for NoAck per tid
This adds support for the new NoAck feature in nl80211/mac80211

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
83a7bd0
Commits on Dec 07, 2011
@dankamongmen dankamongmen use signed int where negative values are used 9fea977
@dankamongmen dankamongmen whitespace cleanups 3f362f8
@jmberg jmberg whitespace cleanups c551449
Commits on Dec 14, 2011
@jmberg jmberg update nl80211.h 6539cbf
Simon Wunderlich iw: add HT options for ibss
Allow to set a specific HT mode for ibss_join.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
135cb52
@jmberg jmberg parse NL80211_ATTR_FEATURE_FLAGS 632004a
Commits on Jan 08, 2012
Antonio Quartulli iw: add support for NL80211_CMD_DEL_STATION event
Actually iw event does not recognise the NL80211_CMD_DEL_STATION event. This
patch makes it print the appropriate message.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
27bf109
Commits on Jan 17, 2012
@jmberg jmberg update version to 3.3
The merge window for 3.3 is open, so
it will be feature-complete now.
f22e79f
@chunyeow chunyeow iw: allow setting mesh mcast-rate
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
7d01a09
Commits on Feb 16, 2012
@jmberg jmberg update nl80211.h d456ac6
Simon Wunderlich iw: remove ifdefs for mcs mask
These are enums, not defines. Therefore the ifdef check can never be
true.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
135e65d
Commits on Mar 13, 2012
@jmberg jmberg shorten TX/RX frame type output 58e3434
Commits on Mar 20, 2012
@pof2 pof2 Fix typo in print_iface_handler.
print_iface_handler printed the interface type at the phy number.
5b050af
Commits on Mar 23, 2012
@greearb iw: Support can_scan_one flag.
Signed-off-by: Ben Greear <greearb@candelatech.com>
1b8af39
Showing with 238 additions and 48 deletions.
  1. +2 −18 bitrate.c
  2. +4 −0 event.c
  3. +4 −4 genl.c
  4. +29 −1 ibss.c
  5. +49 −0 ieee80211.h
  6. +40 −2 info.c
  7. +28 −1 interface.c
  8. +1 −1 iw.8
  9. +2 −2 iw.c
  10. +2 −0 iw.h
  11. +18 −2 mesh.c
  12. +32 −1 nl80211.h
  13. +1 −1 phy.c
  14. +6 −6 reg.c
  15. +15 −4 scan.c
  16. +4 −4 util.c
  17. +1 −1 version.sh
View
20 bitrate.c
@@ -17,12 +17,10 @@ static int handle_bitrates(struct nl80211_state *state,
uint8_t *legacy = NULL;
int *n_legacy = NULL;
bool have_mcs_24 = false, have_mcs_5 = false;
-#ifdef NL80211_TXRATE_MCS
uint8_t mcs_24[77], mcs_5[77];
int n_mcs_24 = 0, n_mcs_5 = 0;
uint8_t *mcs = NULL;
int *n_mcs = NULL;
-#endif
enum {
S_NONE,
S_LEGACY,
@@ -32,9 +30,7 @@ static int handle_bitrates(struct nl80211_state *state,
for (i = 0; i < argc; i++) {
char *end;
double tmpd;
-#ifdef NL80211_TXRATE_MCS
long tmpl;
-#endif
if (strcmp(argv[i], "legacy-2.4") == 0) {
if (have_legacy_24)
@@ -51,7 +47,6 @@ static int handle_bitrates(struct nl80211_state *state,
n_legacy = &n_legacy_5;
have_legacy_5 = true;
}
-#ifdef NL80211_TXRATE_MCS
else if (strcmp(argv[i], "mcs-2.4") == 0) {
if (have_mcs_24)
return 1;
@@ -67,7 +62,6 @@ static int handle_bitrates(struct nl80211_state *state,
n_mcs = &n_mcs_5;
have_mcs_5 = true;
}
-#endif
else switch (parser_state) {
case S_LEGACY:
tmpd = strtod(argv[i], &end);
@@ -78,15 +72,13 @@ static int handle_bitrates(struct nl80211_state *state,
legacy[(*n_legacy)++] = tmpd * 2;
break;
case S_MCS:
-#ifdef NL80211_TXRATE_MCS
tmpl = strtol(argv[i], &end, 0);
if (*end != '\0')
return 1;
if (tmpl < 0 || tmpl > 255)
return 1;
mcs[(*n_mcs)++] = tmpl;
break;
-#endif
default:
return 1;
}
@@ -102,10 +94,8 @@ static int handle_bitrates(struct nl80211_state *state,
goto nla_put_failure;
if (have_legacy_24)
nla_put(msg, NL80211_TXRATE_LEGACY, n_legacy_24, legacy_24);
-#ifdef NL80211_TXRATE_MCS
if (have_mcs_24)
nla_put(msg, NL80211_TXRATE_MCS, n_mcs_24, mcs_24);
-#endif
nla_nest_end(msg, nl_band);
}
@@ -115,10 +105,8 @@ static int handle_bitrates(struct nl80211_state *state,
goto nla_put_failure;
if (have_legacy_5)
nla_put(msg, NL80211_TXRATE_LEGACY, n_legacy_5, legacy_5);
-#ifdef NL80211_TXRATE_MCS
if (have_mcs_5)
nla_put(msg, NL80211_TXRATE_MCS, n_mcs_5, mcs_5);
-#endif
nla_nest_end(msg, nl_band);
}
@@ -130,13 +118,9 @@ static int handle_bitrates(struct nl80211_state *state,
}
#define DESCR_LEGACY "[legacy-<2.4|5> <legacy rate in Mbps>*]"
-#ifdef NL80211_TXRATE_MCS
#define DESCR DESCR_LEGACY " [mcs-<2.4|5> <MCS index>*]"
-#else
-#define DESCR DESCR_LEGACY
-#endif
-COMMAND(set, bitrates, DESCR, NL80211_CMD_SET_TX_BITRATE_MASK, 0, CIB_NETDEV,
- handle_bitrates,
+COMMAND(set, bitrates, "[legacy-<2.4|5> <legacy rate in Mbps>*] [mcs-<2.4|5> <MCS index>*]",
+ NL80211_CMD_SET_TX_BITRATE_MASK, 0, CIB_NETDEV, handle_bitrates,
"Sets up the specified rate masks.\n"
"Not passing any arguments would clear the existing mask (if any).");
View
4 event.c
@@ -321,6 +321,10 @@ static int print_event(struct nl_msg *msg, void *arg)
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("new station %s\n", macbuf);
break;
+ case NL80211_CMD_DEL_STATION:
+ mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
+ printf("del station %s\n", macbuf);
+ break;
case NL80211_CMD_JOIN_IBSS:
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("IBSS %s joined\n", macbuf);
View
8 genl.c
@@ -5,7 +5,7 @@
#include <asm/errno.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
-#include <netlink/genl/ctrl.h>
+#include <netlink/genl/ctrl.h>
#include <netlink/msg.h>
#include <netlink/attr.h>
#include <linux/genetlink.h>
@@ -43,7 +43,7 @@ static int family_handler(struct nl_msg *msg, void *arg)
nla_parse(tb, CTRL_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
- if (!tb[CTRL_ATTR_MCAST_GROUPS])
+ if (!tb[CTRL_ATTR_MCAST_GROUPS])
return NL_SKIP;
nla_for_each_nested(mcgrp, tb[CTRL_ATTR_MCAST_GROUPS], rem_mcgrp) {
@@ -61,7 +61,7 @@ static int family_handler(struct nl_msg *msg, void *arg)
grp->id = nla_get_u32(tb_mcgrp[CTRL_ATTR_MCAST_GRP_ID]);
break;
}
-
+
return NL_SKIP;
}
@@ -87,7 +87,7 @@ int nl_get_multicast_id(struct nl_sock *sock, const char *family, const char *gr
ctrlid = genl_ctrl_resolve(sock, "nlctrl");
- genlmsg_put(msg, 0, 0, ctrlid, 0,
+ genlmsg_put(msg, 0, 0, ctrlid, 0,
0, CTRL_CMD_GETFAMILY, 0);
ret = -ENOBUFS;
View
30 ibss.c
@@ -3,6 +3,7 @@
#endif
#include <errno.h>
#include <string.h>
+#include <strings.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
@@ -27,6 +28,17 @@ static int join_ibss(struct nl80211_state *state,
char *value = NULL, *sptr = NULL;
float rate;
int bintval;
+ int i;
+ static const struct {
+ const char *name;
+ unsigned int val;
+ } htmap[] = {
+ { .name = "HT20", .val = NL80211_CHAN_HT20, },
+ { .name = "HT40+", .val = NL80211_CHAN_HT40PLUS, },
+ { .name = "HT40-", .val = NL80211_CHAN_HT40MINUS, },
+ { .name = "NOHT", .val = NL80211_CHAN_NO_HT, },
+ };
+ unsigned int htval;
if (argc < 2)
return 1;
@@ -44,6 +56,22 @@ static int join_ibss(struct nl80211_state *state,
argv++;
argc--;
+ if (argc) {
+ for (i = 0; i < ARRAY_SIZE(htmap); i++) {
+ if (strcasecmp(htmap[i].name, argv[0]) == 0) {
+ htval = htmap[i].val;
+ break;
+ }
+ }
+ if (i != ARRAY_SIZE(htmap)) {
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE,
+ htval);
+ argv++;
+ argc--;
+ }
+
+ }
+
if (argc && strcmp(argv[0], "fixed-freq") == 0) {
NLA_PUT_FLAG(msg, NL80211_ATTR_FREQ_FIXED);
argv++;
@@ -134,7 +162,7 @@ COMMAND(ibss, leave, NULL,
NL80211_CMD_LEAVE_IBSS, 0, CIB_NETDEV, leave_ibss,
"Leave the current IBSS cell.");
COMMAND(ibss, join,
- "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [beacon-interval <TU>]"
+ "<SSID> <freq in MHz> [HT20|HT40+|HT40-|NOHT] [fixed-freq] [<fixed bssid>] [beacon-interval <TU>]"
" [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] "
"[key d:0:abcde]",
NL80211_CMD_JOIN_IBSS, 0, CIB_NETDEV, join_ibss,
View
49 ieee80211.h
@@ -0,0 +1,49 @@
+#ifndef __IEEE80211
+#define __IEEE80211
+
+/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
+#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
+#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
+
+#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
+#define IEEE80211_HT_CAP_SGI_40 0x0040
+#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
+
+#define IEEE80211_HT_MCS_MASK_LEN 10
+
+/**
+ * struct ieee80211_mcs_info - MCS information
+ * @rx_mask: RX mask
+ * @rx_highest: highest supported RX rate. If set represents
+ * the highest supported RX data rate in units of 1 Mbps.
+ * If this field is 0 this value should not be used to
+ * consider the highest RX data rate supported.
+ * @tx_params: TX parameters
+ */
+struct ieee80211_mcs_info {
+ __u8 rx_mask[IEEE80211_HT_MCS_MASK_LEN];
+ __u16 rx_highest;
+ __u8 tx_params;
+ __u8 reserved[3];
+} __attribute__ ((packed));
+
+
+/**
+ * struct ieee80211_ht_cap - HT capabilities
+ *
+ * This structure is the "HT capabilities element" as
+ * described in 802.11n D5.0 7.3.2.57
+ */
+struct ieee80211_ht_cap {
+ __u16 cap_info;
+ __u8 ampdu_params_info;
+
+ /* 16 bytes MCS information */
+ struct ieee80211_mcs_info mcs;
+
+ __u16 extended_ht_cap_info;
+ __u32 tx_BF_cap_info;
+ __u8 antenna_selection_info;
+} __attribute__ ((packed));
+
+#endif /* __IEEE80211 */
View
42 info.c
@@ -319,7 +319,7 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
if (!printed)
printf("\t\t * %s:", iftype_name(nla_type(nl_if)));
printed = true;
- printf(" 0x%.4x", nla_get_u16(nl_ftype));
+ printf(" 0x%.2x", nla_get_u16(nl_ftype));
}
if (printed)
printf("\n");
@@ -334,7 +334,7 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
if (!printed)
printf("\t\t * %s:", iftype_name(nla_type(nl_if)));
printed = true;
- printf(" 0x%.4x", nla_get_u16(nl_ftype));
+ printf(" 0x%.2x", nla_get_u16(nl_ftype));
}
if (printed)
printf("\n");
@@ -400,6 +400,44 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
if (tb_msg[NL80211_ATTR_SUPPORT_AP_UAPSD])
printf("\tDevice supports AP-side u-APSD.\n");
+ if (tb_msg[NL80211_ATTR_HT_CAPABILITY_MASK]) {
+ struct ieee80211_ht_cap *cm;
+ printf("\tHT Capability overrides:\n");
+ if (nla_len(tb_msg[NL80211_ATTR_HT_CAPABILITY_MASK]) >= sizeof(*cm)) {
+ cm = nla_data(tb_msg[NL80211_ATTR_HT_CAPABILITY_MASK]);
+ printf("\t\t * MCS: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx"
+ " %02hhx %02hhx %02hhx %02hhx\n",
+ cm->mcs.rx_mask[0], cm->mcs.rx_mask[1],
+ cm->mcs.rx_mask[2], cm->mcs.rx_mask[3],
+ cm->mcs.rx_mask[4], cm->mcs.rx_mask[5],
+ cm->mcs.rx_mask[6], cm->mcs.rx_mask[7],
+ cm->mcs.rx_mask[8], cm->mcs.rx_mask[9]);
+ if (cm->cap_info & htole16(IEEE80211_HT_CAP_MAX_AMSDU))
+ printf("\t\t * maximum A-MSDU length\n");
+ if (cm->cap_info & htole16(IEEE80211_HT_CAP_SUP_WIDTH_20_40))
+ printf("\t\t * supported channel width\n");
+ if (cm->cap_info & htole16(IEEE80211_HT_CAP_SGI_40))
+ printf("\t\t * short GI for 40 MHz\n");
+ if (cm->ampdu_params_info & IEEE80211_HT_AMPDU_PARM_FACTOR)
+ printf("\t\t * max A-MPDU length exponent\n");
+ if (cm->ampdu_params_info & IEEE80211_HT_AMPDU_PARM_DENSITY)
+ printf("\t\t * min MPDU start spacing\n");
+ } else {
+ printf("\tERROR: capabilities mask is too short, expected: %d, received: %d\n",
+ (int)(sizeof(*cm)),
+ (int)(nla_len(tb_msg[NL80211_ATTR_HT_CAPABILITY_MASK])));
+ }
+ }
+
+ if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
+ if (nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]) &
+ NL80211_FEATURE_SK_TX_STATUS)
+ printf("\tDevice supports TX status socket option.\n");
+ if (nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]) &
+ NL80211_FEATURE_HT_IBSS)
+ printf("\tDevice supports HT-IBSS.\n");
+ }
+
return NL_SKIP;
}
View
29 interface.c
@@ -266,7 +266,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
if (tb_msg[NL80211_ATTR_IFTYPE])
printf("%s\ttype %s\n", indent, iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
if (!wiphy && tb_msg[NL80211_ATTR_WIPHY])
- printf("%s\twiphy %d\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE]));
+ printf("%s\twiphy %d\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_WIPHY]));
return NL_SKIP;
}
@@ -386,6 +386,33 @@ COMMAND(set, 4addr, "<on|off>",
NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_4addr,
"Set interface 4addr (WDS) mode.");
+static int handle_interface_noack_map(struct nl80211_state *state,
+ struct nl_cb *cb,
+ struct nl_msg *msg,
+ int argc, char **argv)
+{
+ uint16_t noack_map;
+ char *end;
+
+ if (argc != 1)
+ return 1;
+
+ noack_map = strtoul(argv[0], &end, 16);
+ if (*end)
+ return 1;
+
+ NLA_PUT_U16(msg, NL80211_ATTR_NOACK_MAP, noack_map);
+
+ return 0;
+ nla_put_failure:
+ return -ENOBUFS;
+
+}
+COMMAND(set, noack_map, "<map>",
+ NL80211_CMD_SET_NOACK_MAP, 0, CIB_NETDEV, handle_interface_noack_map,
+ "Set the NoAck map for the TIDs. (0x0009 = BE, 0x0006 = BK, 0x0030 = VI, 0x00C0 = VO)");
+
+
static int handle_interface_wds_peer(struct nl80211_state *state,
struct nl_cb *cb,
struct nl_msg *msg,
View
2 iw.8
@@ -7,7 +7,7 @@ iw \- show / manipulate wireless devices and their configuration
.in +8
.ti -8
.B iw
-.RI [ " OPTIONS " ] " " { "
+.RI [ " OPTIONS " ] " " { "
.BR help " |"
.RI ""OBJECT " " COMMAND " }"
.sp
View
4 iw.c
@@ -13,10 +13,10 @@
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
-
+
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
-#include <netlink/genl/ctrl.h>
+#include <netlink/genl/ctrl.h>
#include <netlink/msg.h>
#include <netlink/attr.h>
View
2 iw.h
@@ -6,8 +6,10 @@
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
+#include <endian.h>
#include "nl80211.h"
+#include "ieee80211.h"
#define ETH_ALEN 6
View
20 mesh.c
@@ -342,22 +342,38 @@ COMMAND(get, mesh_param, "[<param>]",
static int join_mesh(struct nl80211_state *state, struct nl_cb *cb,
struct nl_msg *msg, int argc, char **argv)
{
+ float rate;
+ char *end;
+
if (argc < 1)
return 1;
NLA_PUT(msg, NL80211_ATTR_MESH_ID, strlen(argv[0]), argv[0]);
argc--;
argv++;
+ if (argc > 1 && strcmp(argv[0], "mcast-rate") == 0) {
+ argv++;
+ argc--;
+
+ rate = strtod(argv[0], &end);
+ if (*end != '\0')
+ return 1;
+
+ NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, (int)(rate * 10));
+ argv++;
+ argc--;
+ }
+
if (!argc)
return 0;
return set_interface_meshparam(state, cb, msg, argc, argv);
nla_put_failure:
return -ENOBUFS;
}
-COMMAND(mesh, join, "<mesh ID> [<param>=<value>]*",
+COMMAND(mesh, join, "<mesh ID> [mcast-rate <rate in Mbps>] [<param>=<value>]*",
NL80211_CMD_JOIN_MESH, 0, CIB_NETDEV, join_mesh,
- "Join a mesh with the given mesh ID and mesh parameters.");
+ "Join a mesh with the given mesh ID with mcast-rate and mesh parameters.");
static int leave_mesh(struct nl80211_state *state, struct nl_cb *cb,
struct nl_msg *msg, int argc, char **argv)
View
33 nl80211.h
@@ -538,6 +538,9 @@
* OLBC handling in hostapd. Beacons are reported in %NL80211_CMD_FRAME
* messages. Note that per PHY only one application may register.
*
+ * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
+ * No Acknowledgement Policy should be applied.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -675,6 +678,8 @@ enum nl80211_commands {
NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
+ NL80211_CMD_SET_NOACK_MAP,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -1185,6 +1190,9 @@ enum nl80211_commands {
* abides to when initiating radiation on DFS channels. A country maps
* to one DFS region.
*
+ * @NL80211_ATTR_NOACK_MAP: This u16 bitmap contains the No Ack Policy of
+ * up to 16 TIDs.
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1428,6 +1436,8 @@ enum nl80211_attrs {
NL80211_ATTR_DISABLE_HT,
NL80211_ATTR_HT_CAPABILITY_MASK,
+ NL80211_ATTR_NOACK_MAP,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -1465,6 +1475,7 @@ enum nl80211_attrs {
#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
#define NL80211_MAX_SUPP_RATES 32
+#define NL80211_MAX_SUPP_HT_RATES 77
#define NL80211_MAX_SUPP_REG_RULES 32
#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
@@ -1526,7 +1537,11 @@ enum nl80211_iftype {
* @NL80211_STA_FLAG_WME: station is WME/QoS capable
* @NL80211_STA_FLAG_MFP: station uses management frame protection
* @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
- * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer
+ * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer -- this flag should
+ * only be used in managed mode (even in the flags mask). Note that the
+ * flag can't be changed, it is only valid while adding a station, and
+ * attempts to change it will silently be ignored (rather than rejected
+ * as errors.)
* @NL80211_STA_FLAG_MAX: highest station flag number currently defined
* @__NL80211_STA_FLAG_AFTER_LAST: internal use
*/
@@ -1641,6 +1656,7 @@ enum nl80211_sta_bss_param {
* containing info as possible, see &enum nl80211_sta_bss_param
* @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
+ * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -1663,6 +1679,7 @@ enum nl80211_sta_info {
NL80211_STA_INFO_BSS_PARAM,
NL80211_STA_INFO_CONNECTED_TIME,
NL80211_STA_INFO_STA_FLAGS,
+ NL80211_STA_INFO_BEACON_LOSS,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
@@ -2084,6 +2101,13 @@ enum nl80211_mntr_flags {
* access to a broader network beyond the MBSS. This is done via Root
* Announcement frames.
*
+ * @NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL: The minimum interval of time (in
+ * TUs) during which a mesh STA can send only one Action frame containing a
+ * PERR element.
+ *
+ * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding
+ * or forwarding entity (default is TRUE - forwarding entity)
+ *
* @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
*
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
@@ -2107,6 +2131,8 @@ enum nl80211_meshconf_params {
NL80211_MESHCONF_ELEMENT_TTL,
NL80211_MESHCONF_HWMP_RANN_INTERVAL,
NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
+ NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
+ NL80211_MESHCONF_FORWARDING,
/* keep last */
__NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -2380,12 +2406,15 @@ enum nl80211_key_attributes {
* in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
* 1 = 500 kbps) but without the IE length restriction (at most
* %NL80211_MAX_SUPP_RATES in a single array).
+ * @NL80211_TXRATE_MCS: HT (MCS) rates allowed for TX rate selection
+ * in an array of MCS numbers.
* @__NL80211_TXRATE_AFTER_LAST: internal
* @NL80211_TXRATE_MAX: highest TX rate attribute
*/
enum nl80211_tx_rate_attributes {
__NL80211_TXRATE_INVALID,
NL80211_TXRATE_LEGACY,
+ NL80211_TXRATE_MCS,
/* keep last */
__NL80211_TXRATE_AFTER_LAST,
@@ -2770,9 +2799,11 @@ enum nl80211_ap_sme_features {
* @NL80211_FEATURE_SK_TX_STATUS: This driver supports reflecting back
* TX status to the socket error queue when requested with the
* socket option.
+ * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates.
*/
enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
+ NL80211_FEATURE_HT_IBSS = 1 << 1,
};
/**
View
2 phy.c
@@ -176,7 +176,7 @@ static int handle_netns(struct nl80211_state *state,
return 1;
NLA_PUT_U32(msg, NL80211_ATTR_PID,
- strtoul(argv[0], &end, 10));
+ strtoul(argv[0], &end, 10));
if (*end != '\0')
return 1;
View
12 reg.c
@@ -110,12 +110,12 @@ static int print_reg_handler(struct nl_msg *msg, void *arg)
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 },
+ [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),
View
19 scan.c
@@ -70,6 +70,7 @@ static int handle_scan(struct nl80211_state *state,
} parse = NONE;
int freq;
bool passive = false, have_ssids = false, have_freqs = false;
+ bool can_scan_one = false;
size_t tmp;
unsigned char *ies;
@@ -97,6 +98,10 @@ static int handle_scan(struct nl80211_state *state,
parse = SSID;
have_ssids = true;
break;
+ } else if (strcmp(argv[i], "can_scan_one") == 0) {
+ can_scan_one = true;
+ parse = NONE;
+ break;
} else if (strcmp(argv[i], "passive") == 0) {
parse = DONE;
passive = true;
@@ -132,7 +137,13 @@ static int handle_scan(struct nl80211_state *state,
NLA_PUT(ssids, 1, 0, "");
if (!passive)
nla_put_nested(msg, NL80211_ATTR_SCAN_SSIDS, ssids);
-
+ if (can_scan_one) {
+ /* HACK: Use freq of -1 to mean 'scan only active channel
+ * if any other VIFS on this phy are active.
+ */
+ NLA_PUT_U32(freqs, i, -1);
+ have_freqs = true;
+ }
if (have_freqs)
nla_put_nested(msg, NL80211_ATTR_SCAN_FREQUENCIES, freqs);
@@ -1219,7 +1230,7 @@ static int print_bss_handler(struct nl_msg *msg, void *arg)
int age = nla_get_u32(bss[NL80211_BSS_SEEN_MS_AGO]);
printf("\tlast seen: %d ms ago\n", age);
}
-
+
if (bss[NL80211_BSS_INFORMATION_ELEMENTS] && show--) {
if (bss[NL80211_BSS_BEACON_IES])
printf("\tInformation elements from Probe Response "
@@ -1337,7 +1348,7 @@ static int handle_scan_combined(struct nl80211_state *state,
dump_argv[0] = argv[0];
return handle_cmd(state, II_NETDEV, dump_argc, dump_argv);
}
-TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|passive]", 0, 0,
+TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|can_scan_one|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"
@@ -1347,7 +1358,7 @@ COMMAND(scan, dump, "[-u]",
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:..>] [ssid <ssid>*|passive]",
+COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|can_scan_one|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.");
View
8 util.c
@@ -387,7 +387,7 @@ int parse_keys(struct nl_msg *msg, char **argv, int argc)
static void print_mcs_index(const __u8 *mcs)
{
- unsigned int mcs_bit, prev_bit = -2, prev_cont = 0;
+ int mcs_bit, prev_bit = -2, prev_cont = 0;
for (mcs_bit = 0; mcs_bit <= 76; mcs_bit++) {
unsigned int mcs_octet = mcs_bit/8;
@@ -461,16 +461,16 @@ void print_ampdu_length(__u8 exponent)
if (max_ampdu_length) {
printf("\t\tMaximum RX AMPDU length %d bytes (exponent: 0x0%02x)\n",
max_ampdu_length, exponent);
- } else {
+ } else {
printf("\t\tMaximum RX AMPDU length: unrecognized bytes "
"(exponent: %d)\n", exponent);
}
}
void print_ampdu_spacing(__u8 spacing)
{
- printf("\t\tMinimum RX AMPDU time spacing: %s (0x%02x)\n",
- print_ampdu_space(spacing), spacing);
+ printf("\t\tMinimum RX AMPDU time spacing: %s (0x%02x)\n",
+ print_ampdu_space(spacing), spacing);
}
void print_ht_capability(__u16 cap)
View
2 version.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-VERSION="3.2"
+VERSION="3.3"
OUT="$1"
if head=`git rev-parse --verify HEAD 2>/dev/null`; then

No commit comments for this range

Something went wrong with that request. Please try again.