iw: update to version 4.9

This adds support for "channels" command which displays more details
about channels. It includes e.g. info about available widths.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
owl
Rafał Miłecki 2016-11-12 16:02:57 +01:00
parent 7305b55588
commit 7aff00ab19
5 changed files with 24 additions and 88 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=iw PKG_NAME:=iw
PKG_VERSION:=4.7 PKG_VERSION:=4.9
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/iw PKG_SOURCE_URL:=@KERNEL/software/network/iw
PKG_MD5SUM:=c70b4500255c816b202e3561c901af4a PKG_MD5SUM:=02d36655b45a0288feb0e87e461e365a
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0

View File

@ -1,8 +1,8 @@
--- a/nl80211.h --- a/nl80211.h
+++ b/nl80211.h +++ b/nl80211.h
@@ -1817,6 +1817,11 @@ enum nl80211_commands { @@ -1937,6 +1937,11 @@ enum nl80211_commands {
* @NL80211_ATTR_STA_SUPPORT_P2P_PS: whether P2P PS mechanism supported * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
* or not. u8, one of the values of &enum nl80211_sta_p2p_ps_status * See &enum nl80211_nan_match_attributes.
* *
+ * @NL80211_ATTR_PAD: attribute used for padding for 64-bit alignment + * @NL80211_ATTR_PAD: attribute used for padding for 64-bit alignment
+ * + *
@ -12,9 +12,9 @@
* @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined * @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2197,6 +2202,10 @@ enum nl80211_attrs { @@ -2336,6 +2341,10 @@ enum nl80211_attrs {
NL80211_ATTR_NAN_FUNC,
NL80211_ATTR_STA_SUPPORT_P2P_PS, NL80211_ATTR_NAN_MATCH,
+ NL80211_ATTR_PAD, + NL80211_ATTR_PAD,
+ +
@ -23,67 +23,3 @@
/* add attributes here, update the policy in nl80211.c */ /* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST, __NL80211_ATTR_AFTER_LAST,
@@ -2513,6 +2522,7 @@ enum nl80211_sta_bss_param {
* attributes carrying the actual values.
* @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames
* received from the station (u64, usec)
+ * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -2550,6 +2560,7 @@ enum nl80211_sta_info {
NL80211_STA_INFO_BEACON_SIGNAL_AVG,
NL80211_STA_INFO_TID_STATS,
NL80211_STA_INFO_RX_DURATION,
+ NL80211_STA_INFO_PAD,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
@@ -2566,6 +2577,7 @@ enum nl80211_sta_info {
* transmitted MSDUs (not counting the first attempt; u64)
* @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted
* MSDUs (u64)
+ * @NL80211_TID_STATS_PAD: attribute used for padding for 64-bit alignment
* @NUM_NL80211_TID_STATS: number of attributes here
* @NL80211_TID_STATS_MAX: highest numbered attribute here
*/
@@ -2575,6 +2587,7 @@ enum nl80211_tid_stats {
NL80211_TID_STATS_TX_MSDU,
NL80211_TID_STATS_TX_MSDU_RETRIES,
NL80211_TID_STATS_TX_MSDU_FAILED,
+ NL80211_TID_STATS_PAD,
/* keep last */
NUM_NL80211_TID_STATS,
@@ -3011,6 +3024,7 @@ enum nl80211_user_reg_hint_type {
* transmitting data (on channel or globally)
* @NL80211_SURVEY_INFO_TIME_SCAN: time the radio spent for scan
* (on this channel or globally)
+ * @NL80211_SURVEY_INFO_PAD: attribute used for padding for 64-bit alignment
* @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
* currently defined
* @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
@@ -3026,6 +3040,7 @@ enum nl80211_survey_info {
NL80211_SURVEY_INFO_TIME_RX,
NL80211_SURVEY_INFO_TIME_TX,
NL80211_SURVEY_INFO_TIME_SCAN,
+ NL80211_SURVEY_INFO_PAD,
/* keep last */
__NL80211_SURVEY_INFO_AFTER_LAST,
@@ -3451,6 +3466,7 @@ enum nl80211_bss_scan_width {
* @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry
* was last updated by a received frame. The value is expected to be
* accurate to about 10ms. (u64, nanoseconds)
+ * @NL80211_BSS_PAD: attribute used for padding for 64-bit alignment
* @__NL80211_BSS_AFTER_LAST: internal
* @NL80211_BSS_MAX: highest BSS attribute
*/
@@ -3471,6 +3487,7 @@ enum nl80211_bss {
NL80211_BSS_BEACON_TSF,
NL80211_BSS_PRESP_DATA,
NL80211_BSS_LAST_SEEN_BOOTTIME,
+ NL80211_BSS_PAD,
/* keep last */
__NL80211_BSS_AFTER_LAST,

View File

@ -1,6 +1,6 @@
--- a/phy.c --- a/phy.c
+++ b/phy.c +++ b/phy.c
@@ -523,3 +523,30 @@ COMMAND(set, antenna, "<bitmap> | all | @@ -675,3 +675,30 @@ COMMAND(set, antenna, "<bitmap> | all |
NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna, NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna,
"Set a bitmap of allowed antennas to use for TX and RX.\n" "Set a bitmap of allowed antennas to use for TX and RX.\n"
"The driver may reject antenna configurations it cannot support."); "The driver may reject antenna configurations it cannot support.");

View File

@ -37,7 +37,7 @@
case NL80211_CMD_JOIN_IBSS: case NL80211_CMD_JOIN_IBSS:
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("IBSS %s joined\n", macbuf); printf("IBSS %s joined\n", macbuf);
@@ -610,9 +613,9 @@ static int print_event(struct nl_msg *ms @@ -612,9 +615,9 @@ static int print_event(struct nl_msg *ms
case NL80211_CMD_DEL_WIPHY: case NL80211_CMD_DEL_WIPHY:
printf("delete wiphy\n"); printf("delete wiphy\n");
break; break;
@ -51,7 +51,7 @@
--- a/info.c --- a/info.c
+++ b/info.c +++ b/info.c
@@ -217,6 +217,7 @@ next: @@ -197,6 +197,7 @@ next:
} }
} }
@ -59,7 +59,7 @@
if (tb_band[NL80211_BAND_ATTR_RATES]) { if (tb_band[NL80211_BAND_ATTR_RATES]) {
printf("\t\tBitrates (non-HT):\n"); printf("\t\tBitrates (non-HT):\n");
nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
@@ -233,6 +234,7 @@ next: @@ -213,6 +214,7 @@ next:
printf("\n"); printf("\n");
} }
} }
@ -67,7 +67,7 @@
} }
} }
@@ -298,6 +300,7 @@ next: @@ -278,6 +280,7 @@ next:
printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
} }
@ -75,7 +75,7 @@
if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
int i; int i;
@@ -309,6 +312,7 @@ next: @@ -289,6 +292,7 @@ next:
cipher_name(ciphers[i])); cipher_name(ciphers[i]));
} }
} }
@ -83,7 +83,7 @@
if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
@@ -328,11 +332,13 @@ next: @@ -308,11 +312,13 @@ next:
printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
} }
@ -97,7 +97,7 @@
if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
struct nlattr *nl_combi; struct nlattr *nl_combi;
@@ -429,6 +435,7 @@ broken_combination: @@ -409,6 +415,7 @@ broken_combination:
printf("\tinterface combinations are not supported\n"); printf("\tinterface combinations are not supported\n");
} }
@ -105,7 +105,7 @@
if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
printf("\tSupported commands:\n"); printf("\tSupported commands:\n");
nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
@@ -526,6 +533,7 @@ broken_combination: @@ -506,6 +513,7 @@ broken_combination:
printf("\t\t * wake up on TCP connection\n"); printf("\t\t * wake up on TCP connection\n");
} }
} }
@ -113,7 +113,7 @@
if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
printf("\tDevice supports roaming.\n"); printf("\tDevice supports roaming.\n");
@@ -564,6 +572,7 @@ broken_combination: @@ -544,6 +552,7 @@ broken_combination:
} }
} }
@ -121,7 +121,7 @@
if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
@@ -622,6 +631,7 @@ broken_combination: @@ -602,6 +611,7 @@ broken_combination:
if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH) if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)
printf("\tDevice supports TDLS channel switching\n"); printf("\tDevice supports TDLS channel switching\n");
} }
@ -129,7 +129,7 @@
if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { if (tb_msg[NL80211_ATTR_EXT_FEATURES]) {
struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES];
@@ -678,6 +688,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP @@ -658,6 +668,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
"List all wireless devices and their capabilities."); "List all wireless devices and their capabilities.");
TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
@ -137,7 +137,7 @@
static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
int argc, char **argv, enum id_input id) int argc, char **argv, enum id_input id)
{ {
@@ -689,6 +700,7 @@ static int handle_commands(struct nl8021 @@ -669,6 +680,7 @@ static int handle_commands(struct nl8021
} }
TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
"list all known commands and their decimal & hex value"); "list all known commands and their decimal & hex value");
@ -237,7 +237,7 @@
printf("\tbeacon interval: %d TUs\n", printf("\tbeacon interval: %d TUs\n",
--- a/util.c --- a/util.c
+++ b/util.c +++ b/util.c
@@ -268,6 +268,7 @@ static const char *commands[NL80211_CMD_ @@ -275,6 +275,7 @@ static const char *commands[NL80211_CMD_
static char cmdbuf[100]; static char cmdbuf[100];
@ -245,7 +245,7 @@
const char *command_name(enum nl80211_commands cmd) const char *command_name(enum nl80211_commands cmd)
{ {
if (cmd <= NL80211_CMD_MAX && commands[cmd]) if (cmd <= NL80211_CMD_MAX && commands[cmd])
@@ -275,6 +276,7 @@ const char *command_name(enum nl80211_co @@ -282,6 +283,7 @@ const char *command_name(enum nl80211_co
sprintf(cmdbuf, "Unknown command (%d)", cmd); sprintf(cmdbuf, "Unknown command (%d)", cmd);
return cmdbuf; return cmdbuf;
} }

View File

@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/interface.c --- a/interface.c
+++ b/interface.c +++ b/interface.c
@@ -374,6 +374,13 @@ static int print_iface_handler(struct nl @@ -441,6 +441,13 @@ static int print_iface_handler(struct nl
indent, txp / 100, txp % 100); indent, txp / 100, txp % 100);
} }