diff options
Diffstat (limited to 'package/network/utils/iw')
| -rw-r--r-- | package/network/utils/iw/Makefile | 8 | ||||
| -rw-r--r-- | package/network/utils/iw/patches/001-nl80211_h_sync.patch | 96 | ||||
| -rw-r--r-- | package/network/utils/iw/patches/100-rx_rate.patch | 135 | ||||
| -rw-r--r-- | package/network/utils/iw/patches/110-per_chain_signal_strength.patch | 14 | ||||
| -rw-r--r-- | package/network/utils/iw/patches/120-antenna_gain.patch (renamed from package/network/utils/iw/patches/130-antenna_gain.patch) | 2 | ||||
| -rw-r--r-- | package/network/utils/iw/patches/120-tdls_peer_indentation.patch | 11 |
6 files changed, 73 insertions, 193 deletions
diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index b63a61cec..1ee886164 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iw -PKG_VERSION:=3.6 +PKG_VERSION:=3.10 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/ -PKG_MD5SUM:=1c18bfbbc8773629e5e8ac733a39540c +PKG_SOURCE_URL:=https://www.kernel.org/pub/software/network/iw +PKG_MD5SUM:=0dc736963455937278b10fe8a2157e47 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> @@ -24,7 +24,7 @@ define Package/iw CATEGORY:=Network TITLE:=cfg80211 interface configuration utility URL:=http://wireless.kernel.org/en/users/Documentation/iw - DEPENDS:= +libnl-tiny @(!(TARGET_avr32||TARGET_etrax)||BROKEN) + DEPENDS:= +libnl-tiny @(!TARGET_avr32||BROKEN) endef define Build/Configure diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch b/package/network/utils/iw/patches/001-nl80211_h_sync.patch index 8e776643b..e20484ac2 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,96 +1,32 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -565,6 +565,14 @@ - * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with - * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. - * -+ * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by -+ * its %NL80211_ATTR_WDEV identifier. It must have been created with -+ * %NL80211_CMD_NEW_INTERFACE previously. After it has been started, the -+ * P2P Device can be used for P2P operations, e.g. remain-on-channel and -+ * public action frame TX. -+ * @NL80211_CMD_STOP_P2P_DEVICE: Stop the given P2P Device, identified by -+ * its %NL80211_ATTR_WDEV identifier. -+ * - * @NL80211_CMD_MAX: highest used command number - * @__NL80211_CMD_AFTER_LAST: internal use - */ -@@ -708,6 +716,9 @@ enum nl80211_commands { - - NL80211_CMD_CH_SWITCH_NOTIFY, - -+ NL80211_CMD_START_P2P_DEVICE, -+ NL80211_CMD_STOP_P2P_DEVICE, -+ - /* add new commands above here */ - - /* used to define NL80211_CMD_MAX below */ -@@ -1506,6 +1517,8 @@ enum nl80211_attrs { - - NL80211_ATTR_USER_REG_HINT_TYPE, +@@ -1724,8 +1724,7 @@ enum nl80211_attrs { + NL80211_ATTR_MDID, + NL80211_ATTR_IE_RIC, +- NL80211_ATTR_CRIT_PROT_ID, +- NL80211_ATTR_MAX_CRIT_PROT_DURATION, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, -+ - /* add attributes here, update the policy in nl80211.c */ - __NL80211_ATTR_AFTER_LAST, -@@ -1575,6 +1588,10 @@ enum nl80211_attrs { - * @NL80211_IFTYPE_MESH_POINT: mesh point - * @NL80211_IFTYPE_P2P_CLIENT: P2P client - * @NL80211_IFTYPE_P2P_GO: P2P group owner -+ * @NL80211_IFTYPE_P2P_DEVICE: P2P device interface type, this is not a netdev -+ * and therefore can't be created in the normal ways, use the -+ * %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE -+ * commands to create and destroy one - * @NL80211_IFTYPE_MAX: highest interface type number currently defined - * @NUM_NL80211_IFTYPES: number of defined interface types - * -@@ -1593,6 +1610,7 @@ enum nl80211_iftype { - NL80211_IFTYPE_MESH_POINT, - NL80211_IFTYPE_P2P_CLIENT, - NL80211_IFTYPE_P2P_GO, -+ NL80211_IFTYPE_P2P_DEVICE, + /* add attributes here, update the policy in nl80211.c */ - /* keep last */ - NUM_NL80211_IFTYPES, -@@ -1744,6 +1762,8 @@ enum nl80211_sta_bss_param { - * @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_T_OFFSET: timing offset with respect to this STA (s64) +@@ -1991,6 +1990,10 @@ enum nl80211_sta_bss_param { + * @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 */ -@@ -1768,6 +1788,8 @@ enum nl80211_sta_info { - NL80211_STA_INFO_STA_FLAGS, - NL80211_STA_INFO_BEACON_LOSS, - NL80211_STA_INFO_T_OFFSET, +@@ -2020,6 +2023,8 @@ enum nl80211_sta_info { + 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, -@@ -2994,12 +3016,18 @@ enum nl80211_ap_sme_features { - * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested - * to work properly to suppport receiving regulatory hints from - * cellular base stations. -+ * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active -+ * P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel -+ * in the interface combinations, even when it's only used for scan -+ * and remain-on-channel. This could be due to, for example, the -+ * remain-on-channel implementation requiring a channel context. - */ - enum nl80211_feature_flags { -- NL80211_FEATURE_SK_TX_STATUS = 1 << 0, -- NL80211_FEATURE_HT_IBSS = 1 << 1, -- NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, -- NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, -+ NL80211_FEATURE_SK_TX_STATUS = 1 << 0, -+ NL80211_FEATURE_HT_IBSS = 1 << 1, -+ NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, -+ NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, -+ NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4, - }; - - /** diff --git a/package/network/utils/iw/patches/100-rx_rate.patch b/package/network/utils/iw/patches/100-rx_rate.patch index 642b9f357..cc23e0750 100644 --- a/package/network/utils/iw/patches/100-rx_rate.patch +++ b/package/network/utils/iw/patches/100-rx_rate.patch @@ -1,55 +1,15 @@ --- a/station.c +++ b/station.c -@@ -29,13 +29,47 @@ enum plink_actions { - PLINK_ACTION_BLOCK, - }; +@@ -43,7 +43,7 @@ static void print_power_mode(struct nlat + } + } -+static void print_sta_bitrate(struct nlattr *nla, const char *name) -+{ -+ struct nlattr *rinfo[NL80211_RATE_INFO_MAX + 1]; -+ -+ static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = { -+ [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 }, -+ [NL80211_RATE_INFO_BITRATE32] = { .type = NLA_U32 }, -+ [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 }, -+ [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG }, -+ [NL80211_RATE_INFO_SHORT_GI] = { .type = NLA_FLAG }, -+ }; -+ -+ if (!nla) -+ return; -+ -+ if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX, nla, rate_policy)) { -+ fprintf(stderr, "failed to parse nested rate attributes!\n"); -+ } else { -+ int rate = 0; -+ printf("\n\t%s:\t", name); -+ if (rinfo[NL80211_RATE_INFO_BITRATE32]) -+ rate = nla_get_u32(rinfo[NL80211_RATE_INFO_BITRATE32]); -+ else if (rinfo[NL80211_RATE_INFO_BITRATE]) -+ rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]); -+ if (rate > 0) -+ 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"); -+ } -+} - - static int print_sta_handler(struct nl_msg *msg, void *arg) +-void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen) ++void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen) { - 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]; - struct nl80211_sta_flag_update *sta_flags; - static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = { -@@ -47,6 +81,7 @@ static int print_sta_handler(struct nl_m + int rate = 0; + char *pos = buf; +@@ -107,6 +107,7 @@ static int print_sta_handler(struct nl_m [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 }, [NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 }, [NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED }, @@ -57,49 +17,44 @@ [NL80211_STA_INFO_LLID] = { .type = NLA_U16 }, [NL80211_STA_INFO_PLID] = { .type = NLA_U16 }, [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 }, -@@ -56,14 +91,6 @@ static int print_sta_handler(struct nl_m - { .minlen = sizeof(struct nl80211_sta_flag_update) }, - }; - -- static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = { -- [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 }, -- [NL80211_RATE_INFO_BITRATE32] = { .type = NLA_U32 }, -- [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), - genlmsg_attrlen(gnlh, 0), NULL); - -@@ -119,28 +146,8 @@ static int print_sta_handler(struct nl_m - printf("\n\tToffset:\t%lld us", - (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET])); +@@ -177,10 +178,17 @@ static int print_sta_handler(struct nl_m + if (sinfo[NL80211_STA_INFO_TX_BITRATE]) { + char buf[100]; -- 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!\n"); -- } else { -- int rate = 0; -- printf("\n\ttx bitrate:\t"); -- if (rinfo[NL80211_RATE_INFO_BITRATE32]) -- rate = nla_get_u32(rinfo[NL80211_RATE_INFO_BITRATE32]); -- else if (rinfo[NL80211_RATE_INFO_BITRATE]) -- rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]); -- if (rate > 0) -- 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"); -- } -- } -+ print_sta_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], "tx bitrate"); -+ print_sta_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE], "rx bitrate"); +- 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]) printf("\n\tmesh llid:\t%d", + nla_get_u16(sinfo[NL80211_STA_INFO_LLID])); +--- a/iw.h ++++ b/iw.h +@@ -170,7 +170,7 @@ enum print_ie_type { + 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); +--- a/link.c ++++ b/link.c +@@ -165,7 +165,7 @@ static int print_link_sta(struct nl_msg + 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); + } + diff --git a/package/network/utils/iw/patches/110-per_chain_signal_strength.patch b/package/network/utils/iw/patches/110-per_chain_signal_strength.patch index 813a7d916..e519a86c6 100644 --- a/package/network/utils/iw/patches/110-per_chain_signal_strength.patch +++ b/package/network/utils/iw/patches/110-per_chain_signal_strength.patch @@ -1,7 +1,7 @@ --- a/station.c +++ b/station.c -@@ -65,6 +65,33 @@ static void print_sta_bitrate(struct nla - } +@@ -91,6 +91,33 @@ void parse_bitrate(struct nlattr *bitrat + " VHT-NSS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_VHT_NSS])); } +static char *get_chain_signal(struct nlattr *attr_list) @@ -34,10 +34,10 @@ static int print_sta_handler(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; -@@ -89,7 +116,10 @@ static int print_sta_handler(struct nl_m - [NL80211_STA_INFO_TX_FAILED] = { .type = NLA_U32 }, - [NL80211_STA_INFO_STA_FLAGS] = - { .minlen = sizeof(struct nl80211_sta_flag_update) }, +@@ -118,7 +145,10 @@ static int print_sta_handler(struct nl_m + [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 }, }; @@ -45,7 +45,7 @@ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); -@@ -136,12 +166,19 @@ static int print_sta_handler(struct nl_m +@@ -165,12 +195,19 @@ static int print_sta_handler(struct nl_m if (sinfo[NL80211_STA_INFO_TX_FAILED]) printf("\n\ttx failed:\t%u", nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED])); diff --git a/package/network/utils/iw/patches/130-antenna_gain.patch b/package/network/utils/iw/patches/120-antenna_gain.patch index f3ca691e5..36043611d 100644 --- a/package/network/utils/iw/patches/130-antenna_gain.patch +++ b/package/network/utils/iw/patches/120-antenna_gain.patch @@ -1,6 +1,6 @@ --- a/phy.c +++ b/phy.c -@@ -359,3 +359,31 @@ COMMAND(set, antenna, "<bitmap> | all | +@@ -421,3 +421,31 @@ COMMAND(set, antenna, "<bitmap> | all | NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna, "Set a bitmap of allowed antennas to use for TX and RX.\n" "The driver may reject antenna configurations it cannot support."); diff --git a/package/network/utils/iw/patches/120-tdls_peer_indentation.patch b/package/network/utils/iw/patches/120-tdls_peer_indentation.patch deleted file mode 100644 index 68368734e..000000000 --- a/package/network/utils/iw/patches/120-tdls_peer_indentation.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/station.c -+++ b/station.c -@@ -267,7 +267,7 @@ static int print_sta_handler(struct nl_m - } - - if (sta_flags->mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) { -- printf("\n\tTDLS peer:\t\t"); -+ printf("\n\tTDLS peer:\t"); - if (sta_flags->set & BIT(NL80211_STA_FLAG_TDLS_PEER)) - printf("yes"); - else |
