From 7305b55588d698fa1496828a6cccfe729700eb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 12 Nov 2016 15:59:00 +0100 Subject: [PATCH] iw: update to version 4.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- package/network/utils/iw/Makefile | 4 +- .../utils/iw/patches/001-nl80211_h_sync.patch | 323 ++---------------- .../utils/iw/patches/120-antenna_gain.patch | 2 +- .../utils/iw/patches/200-reduce_size.patch | 46 +-- .../300-display_interface_TX_power.patch | 4 +- .../utils/iw/patches/301-ibss_add_VHT80.patch | 102 ------ .../302-ibss_use_MHz_instead_MHZ.patch | 39 --- .../utils/iw/patches/303-mesh_add_VHT80.patch | 162 --------- 8 files changed, 48 insertions(+), 634 deletions(-) delete mode 100644 package/network/utils/iw/patches/301-ibss_add_VHT80.patch delete mode 100644 package/network/utils/iw/patches/302-ibss_use_MHz_instead_MHZ.patch delete mode 100644 package/network/utils/iw/patches/303-mesh_add_VHT80.patch diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index d17cbca0df..6b2050facf 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:=4.3 +PKG_VERSION:=4.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/iw -PKG_MD5SUM:=7adec72e91ebdd9c55429fa34a23a6f5 +PKG_MD5SUM:=c70b4500255c816b202e3561c901af4a PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 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 e5ea8f7c8a..cf39a3e5fc 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,145 +1,9 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -10,6 +10,7 @@ - * Copyright 2008, 2009 Luis R. Rodriguez - * Copyright 2008 Jouni Malinen - * Copyright 2008 Colin McCabe -+ * Copyright 2015 Intel Deutschland GmbH +@@ -1817,6 +1817,11 @@ enum nl80211_commands { + * @NL80211_ATTR_STA_SUPPORT_P2P_PS: whether P2P PS mechanism supported + * or not. u8, one of the values of &enum nl80211_sta_p2p_ps_status * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -321,14 +322,24 @@ - * @NL80211_CMD_GET_SCAN: get scan results - * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters - * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the -- * probe requests at CCK rate or not. -+ * probe requests at CCK rate or not. %NL80211_ATTR_MAC can be used to -+ * specify a BSSID to scan for; if not included, the wildcard BSSID will -+ * be used. - * @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_START_SCHED_SCAN: start a scheduled scan at certain -- * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL. -+ * intervals and certain number of cycles, as specified by -+ * %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is -+ * not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified, -+ * scheduled scan will run in an infinite loop with the specified interval. -+ * These attributes are mutually exculsive, -+ * i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if -+ * NL80211_ATTR_SCHED_SCAN_PLANS is defined. -+ * If for some reason scheduled scan is aborted by the driver, all scan -+ * plans are canceled (including scan plans that did not start yet). - * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS) - * are passed, they are used in the probe requests. For - * broadcast, a broadcast SSID must be passed (ie. an empty -@@ -418,7 +429,11 @@ - * @NL80211_CMD_ASSOCIATE: association request and notification; like - * NL80211_CMD_AUTHENTICATE but for Association and Reassociation - * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, -- * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). -+ * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). The -+ * %NL80211_ATTR_PREV_BSSID attribute is used to specify whether the -+ * request is for the initial association to an ESS (that attribute not -+ * included) or for reassociation within the ESS (that attribute is -+ * included). - * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like - * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to - * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication -@@ -468,6 +483,9 @@ - * set of BSSID,frequency parameters is used (i.e., either the enforcing - * %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict - * %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT). -+ * %NL80211_ATTR_PREV_BSSID can be used to request a reassociation within -+ * the ESS in case the device is already associated and an association with -+ * a different BSS is desired. - * Background scan period can optionally be - * specified in %NL80211_ATTR_BG_SCAN_PERIOD, - * if not specified default background scan configuration -@@ -811,6 +829,10 @@ - * as an event to indicate changes for devices with wiphy-specific regdom - * management. - * -+ * @NL80211_CMD_ABORT_SCAN: Stop an ongoing scan. Returns -ENOENT if a scan is -+ * not running. The driver indicates the status of the scan through -+ * cfg80211_scan_done(). -+ * - * @NL80211_CMD_MAX: highest used command number - * @__NL80211_CMD_AFTER_LAST: internal use - */ -@@ -997,6 +1019,8 @@ enum nl80211_commands { - - NL80211_CMD_WIPHY_REG_CHANGE, - -+ NL80211_CMD_ABORT_SCAN, -+ - /* add new commands above here */ - - /* used to define NL80211_CMD_MAX below */ -@@ -1270,8 +1294,11 @@ enum nl80211_commands { - * @NL80211_ATTR_RESP_IE: (Re)association response information elements as - * sent by peer, for ROAM and successful CONNECT events. - * -- * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE -- * commands to specify using a reassociate frame -+ * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used in ASSOCIATE and CONNECT -+ * commands to specify a request to reassociate within an ESS, i.e., to use -+ * Reassociate Request frame (with the value of this attribute in the -+ * Current AP address field) instead of Association Request frame which is -+ * used for the initial association to an ESS. - * - * @NL80211_ATTR_KEY: key information in a nested attribute with - * %NL80211_KEY_* sub-attributes -@@ -1712,6 +1739,8 @@ enum nl80211_commands { - * underlying device supports these minimal RRM features: - * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES, - * %NL80211_FEATURE_QUIET, -+ * Or, if global RRM is supported, see: -+ * %NL80211_EXT_FEATURE_RRM - * If this flag is used, driver must add the Power Capabilities IE to the - * association request. In addition, it must also set the RRM capability - * flag in the association request's Capability Info field. -@@ -1755,12 +1784,44 @@ enum nl80211_commands { - * over all channels. - * - * @NL80211_ATTR_SCHED_SCAN_DELAY: delay before the first cycle of a -- * scheduled scan (or a WoWLAN net-detect scan) is started, u32 -- * in seconds. -+ * scheduled scan is started. Or the delay before a WoWLAN -+ * net-detect scan is started, counting from the moment the -+ * system is suspended. This value is a u32, in seconds. - - * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device - * is operating in an indoor environment. - * -+ * @NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS: maximum number of scan plans for -+ * scheduled scan supported by the device (u32), a wiphy attribute. -+ * @NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL: maximum interval (in seconds) for -+ * a scan plan (u32), a wiphy attribute. -+ * @NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS: maximum number of iterations in -+ * a scan plan (u32), a wiphy attribute. -+ * @NL80211_ATTR_SCHED_SCAN_PLANS: a list of scan plans for scheduled scan. -+ * Each scan plan defines the number of scan iterations and the interval -+ * between scans. The last scan plan will always run infinitely, -+ * thus it must not specify the number of iterations, only the interval -+ * between scans. The scan plans are executed sequentially. -+ * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan. -+ * @NL80211_ATTR_PBSS: flag attribute. If set it means operate -+ * in a PBSS. Specified in %NL80211_CMD_CONNECT to request -+ * connecting to a PCP, and in %NL80211_CMD_START_AP to start -+ * a PCP instead of AP. Relevant for DMG networks only. -+ * @NL80211_ATTR_BSS_SELECT: nested attribute for driver supporting the -+ * BSS selection feature. When used with %NL80211_CMD_GET_WIPHY it contains -+ * attributes according &enum nl80211_bss_select_attr to indicate what -+ * BSS selection behaviours are supported. When used with %NL80211_CMD_CONNECT -+ * it contains the behaviour-specific attribute containing the parameters for -+ * BSS selection to be done by driver and/or firmware. -+ * -+ * @NL80211_ATTR_STA_SUPPORT_P2P_PS: whether P2P PS mechanism supported -+ * or not. u8, one of the values of &enum nl80211_sta_p2p_ps_status -+ * + * @NL80211_ATTR_PAD: attribute used for padding for 64-bit alignment + * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce @@ -148,21 +12,10 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2130,6 +2191,21 @@ enum nl80211_attrs { +@@ -2197,6 +2202,10 @@ enum nl80211_attrs { - NL80211_ATTR_REG_INDOOR, + NL80211_ATTR_STA_SUPPORT_P2P_PS, -+ NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS, -+ NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL, -+ NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS, -+ NL80211_ATTR_SCHED_SCAN_PLANS, -+ -+ NL80211_ATTR_PBSS, -+ -+ NL80211_ATTR_BSS_SELECT, -+ -+ NL80211_ATTR_STA_SUPPORT_P2P_PS, -+ + NL80211_ATTR_PAD, + + NL80211_ATTR_WIPHY_ANTENNA_GAIN, @@ -170,47 +23,23 @@ /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -2273,6 +2349,20 @@ enum nl80211_sta_flags { - NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1 - }; - -+/** -+ * enum nl80211_sta_p2p_ps_status - station support of P2P PS -+ * -+ * @NL80211_P2P_PS_UNSUPPORTED: station doesn't support P2P PS mechanism -+ * @@NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism -+ * @NUM_NL80211_P2P_PS_STATUS: number of values -+ */ -+enum nl80211_sta_p2p_ps_status { -+ NL80211_P2P_PS_UNSUPPORTED = 0, -+ NL80211_P2P_PS_SUPPORTED, -+ -+ NUM_NL80211_P2P_PS_STATUS, -+}; -+ - #define NL80211_STA_FLAG_MAX_OLD_API NL80211_STA_FLAG_TDLS_PEER - - /** -@@ -2430,6 +2520,9 @@ enum nl80211_sta_bss_param { - * TID+1 and the special TID 16 (i.e. value 17) is used for non-QoS frames; - * each one of those is again nested with &enum nl80211_tid_stats +@@ -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_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 */ -@@ -2466,6 +2559,8 @@ enum nl80211_sta_info { - NL80211_STA_INFO_BEACON_RX, +@@ -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_RX_DURATION, + NL80211_STA_INFO_PAD, /* keep last */ __NL80211_STA_INFO_AFTER_LAST, -@@ -2482,6 +2577,7 @@ enum nl80211_sta_info { +@@ -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) @@ -218,7 +47,7 @@ * @NUM_NL80211_TID_STATS: number of attributes here * @NL80211_TID_STATS_MAX: highest numbered attribute here */ -@@ -2491,6 +2587,7 @@ enum nl80211_tid_stats { +@@ -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, @@ -226,7 +55,7 @@ /* keep last */ NUM_NL80211_TID_STATS, -@@ -2927,6 +3024,7 @@ enum nl80211_user_reg_hint_type { +@@ -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) @@ -234,7 +63,7 @@ * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number * currently defined * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use -@@ -2942,6 +3040,7 @@ enum nl80211_survey_info { +@@ -3026,6 +3040,7 @@ enum nl80211_survey_info { NL80211_SURVEY_INFO_TIME_RX, NL80211_SURVEY_INFO_TIME_TX, NL80211_SURVEY_INFO_TIME_SCAN, @@ -242,131 +71,19 @@ /* keep last */ __NL80211_SURVEY_INFO_AFTER_LAST, -@@ -3364,6 +3463,10 @@ enum nl80211_bss_scan_width { - * (not present if no beacon frame has been received yet) - * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and - * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) -+ * @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) +@@ -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 */ -@@ -3383,6 +3486,8 @@ enum nl80211_bss { - NL80211_BSS_CHAN_WIDTH, +@@ -3471,6 +3487,7 @@ enum nl80211_bss { NL80211_BSS_BEACON_TSF, NL80211_BSS_PRESP_DATA, -+ NL80211_BSS_LAST_SEEN_BOOTTIME, + NL80211_BSS_LAST_SEEN_BOOTTIME, + NL80211_BSS_PAD, /* keep last */ __NL80211_BSS_AFTER_LAST, -@@ -3568,11 +3673,15 @@ enum nl80211_txrate_gi { - * @NL80211_BAND_2GHZ: 2.4 GHz ISM band - * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) - * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz) -+ * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace -+ * since newer kernel versions may support more bands - */ - enum nl80211_band { - NL80211_BAND_2GHZ, - NL80211_BAND_5GHZ, - NL80211_BAND_60GHZ, -+ -+ NUM_NL80211_BANDS, - }; - - /** -@@ -4358,12 +4467,18 @@ enum nl80211_feature_flags { - /** - * enum nl80211_ext_feature_index - bit index of extended features. - * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates. -+ * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can -+ * can request to use RRM (see %NL80211_ATTR_USE_RRM) with -+ * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set -+ * the ASSOC_REQ_USE_RRM flag in the association request even if -+ * NL80211_FEATURE_QUIET is not advertized. - * - * @NUM_NL80211_EXT_FEATURES: number of extended features. - * @MAX_NL80211_EXT_FEATURES: highest extended feature index. - */ - enum nl80211_ext_feature_index { - NL80211_EXT_FEATURE_VHT_IBSS, -+ NL80211_EXT_FEATURE_RRM, - - /* add new features before the definition below */ - NUM_NL80211_EXT_FEATURES, -@@ -4589,4 +4704,72 @@ enum nl80211_tdls_peer_capability { - NL80211_TDLS_PEER_WMM = 1<<2, - }; - -+/** -+ * enum nl80211_sched_scan_plan - scanning plan for scheduled scan -+ * @__NL80211_SCHED_SCAN_PLAN_INVALID: attribute number 0 is reserved -+ * @NL80211_SCHED_SCAN_PLAN_INTERVAL: interval between scan iterations. In -+ * seconds (u32). -+ * @NL80211_SCHED_SCAN_PLAN_ITERATIONS: number of scan iterations in this -+ * scan plan (u32). The last scan plan must not specify this attribute -+ * because it will run infinitely. A value of zero is invalid as it will -+ * make the scan plan meaningless. -+ * @NL80211_SCHED_SCAN_PLAN_MAX: highest scheduled scan plan attribute number -+ * currently defined -+ * @__NL80211_SCHED_SCAN_PLAN_AFTER_LAST: internal use -+ */ -+enum nl80211_sched_scan_plan { -+ __NL80211_SCHED_SCAN_PLAN_INVALID, -+ NL80211_SCHED_SCAN_PLAN_INTERVAL, -+ NL80211_SCHED_SCAN_PLAN_ITERATIONS, -+ -+ /* keep last */ -+ __NL80211_SCHED_SCAN_PLAN_AFTER_LAST, -+ NL80211_SCHED_SCAN_PLAN_MAX = -+ __NL80211_SCHED_SCAN_PLAN_AFTER_LAST - 1 -+}; -+ -+/** -+ * struct nl80211_bss_select_rssi_adjust - RSSI adjustment parameters. -+ * -+ * @band: band of BSS that must match for RSSI value adjustment. -+ * @delta: value used to adjust the RSSI value of matching BSS. -+ */ -+struct nl80211_bss_select_rssi_adjust { -+ __u8 band; -+ __s8 delta; -+} __attribute__((packed)); -+ -+/** -+ * enum nl80211_bss_select_attr - attributes for bss selection. -+ * -+ * @__NL80211_BSS_SELECT_ATTR_INVALID: reserved. -+ * @NL80211_BSS_SELECT_ATTR_RSSI: Flag indicating only RSSI-based BSS selection -+ * is requested. -+ * @NL80211_BSS_SELECT_ATTR_BAND_PREF: attribute indicating BSS -+ * selection should be done such that the specified band is preferred. -+ * When there are multiple BSS-es in the preferred band, the driver -+ * shall use RSSI-based BSS selection as a second step. The value of -+ * this attribute is according to &enum nl80211_band (u32). -+ * @NL80211_BSS_SELECT_ATTR_RSSI_ADJUST: When present the RSSI level for -+ * BSS-es in the specified band is to be adjusted before doing -+ * RSSI-based BSS selection. The attribute value is a packed structure -+ * value as specified by &struct nl80211_bss_select_rssi_adjust. -+ * @NL80211_BSS_SELECT_ATTR_MAX: highest bss select attribute number. -+ * @__NL80211_BSS_SELECT_ATTR_AFTER_LAST: internal use. -+ * -+ * One and only one of these attributes are found within %NL80211_ATTR_BSS_SELECT -+ * for %NL80211_CMD_CONNECT. It specifies the required BSS selection behaviour -+ * which the driver shall use. -+ */ -+enum nl80211_bss_select_attr { -+ __NL80211_BSS_SELECT_ATTR_INVALID, -+ NL80211_BSS_SELECT_ATTR_RSSI, -+ NL80211_BSS_SELECT_ATTR_BAND_PREF, -+ NL80211_BSS_SELECT_ATTR_RSSI_ADJUST, -+ -+ /* keep last */ -+ __NL80211_BSS_SELECT_ATTR_AFTER_LAST, -+ NL80211_BSS_SELECT_ATTR_MAX = __NL80211_BSS_SELECT_ATTR_AFTER_LAST - 1 -+}; -+ - #endif /* __LINUX_NL80211_H */ diff --git a/package/network/utils/iw/patches/120-antenna_gain.patch b/package/network/utils/iw/patches/120-antenna_gain.patch index 6a45c70b80..63213f8830 100644 --- a/package/network/utils/iw/patches/120-antenna_gain.patch +++ b/package/network/utils/iw/patches/120-antenna_gain.patch @@ -1,6 +1,6 @@ --- a/phy.c +++ b/phy.c -@@ -524,3 +524,30 @@ COMMAND(set, antenna, " | all | +@@ -523,3 +523,30 @@ COMMAND(set, antenna, " | 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/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index dea24fb495..2e31cf2ae5 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -15,8 +15,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy +@@ -16,8 +16,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy OBJS = iw.o genl.o event.o info.o phy.o \ interface.o ibss.o station.o survey.o util.o ocb.o \ mesh.o mpath.o mpp.o scan.o reg.o version.o \ @@ -51,7 +51,7 @@ --- a/info.c +++ b/info.c -@@ -219,6 +219,7 @@ next: +@@ -217,6 +217,7 @@ next: } } @@ -59,7 +59,7 @@ if (tb_band[NL80211_BAND_ATTR_RATES]) { printf("\t\tBitrates (non-HT):\n"); nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { -@@ -235,6 +236,7 @@ next: +@@ -233,6 +234,7 @@ next: printf("\n"); } } @@ -67,7 +67,7 @@ } } -@@ -291,6 +293,7 @@ next: +@@ -298,6 +300,7 @@ next: printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); } @@ -75,7 +75,7 @@ if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); int i; -@@ -302,6 +305,7 @@ next: +@@ -309,6 +312,7 @@ next: cipher_name(ciphers[i])); } } @@ -83,7 +83,7 @@ if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) -@@ -321,11 +325,13 @@ next: +@@ -328,11 +332,13 @@ next: printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); } @@ -97,7 +97,7 @@ if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { struct nlattr *nl_combi; -@@ -422,6 +428,7 @@ broken_combination: +@@ -429,6 +435,7 @@ broken_combination: printf("\tinterface combinations are not supported\n"); } @@ -105,7 +105,7 @@ if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { printf("\tSupported commands:\n"); nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) -@@ -518,6 +525,7 @@ broken_combination: +@@ -526,6 +533,7 @@ broken_combination: printf("\t\t * wake up on TCP connection\n"); } } @@ -113,7 +113,7 @@ if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) printf("\tDevice supports roaming.\n"); -@@ -554,6 +562,7 @@ broken_combination: +@@ -564,6 +572,7 @@ broken_combination: } } @@ -121,7 +121,7 @@ if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); -@@ -612,6 +621,7 @@ broken_combination: +@@ -622,6 +631,7 @@ broken_combination: if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH) printf("\tDevice supports TDLS channel switching\n"); } @@ -129,7 +129,7 @@ if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; -@@ -668,6 +678,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP +@@ -678,6 +688,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP "List all wireless devices and their capabilities."); 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, int argc, char **argv, enum id_input id) { -@@ -679,6 +690,7 @@ static int handle_commands(struct nl8021 +@@ -689,6 +700,7 @@ static int handle_commands(struct nl8021 } TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, "list all known commands and their decimal & hex value"); @@ -147,7 +147,7 @@ { --- a/scan.c +++ b/scan.c -@@ -1081,6 +1081,7 @@ static void print_ht_op(const uint8_t ty +@@ -1147,6 +1147,7 @@ static void print_ht_op(const uint8_t ty printf("\t\t * secondary channel offset: %s\n", ht_secondary_offset[data[1] & 0x3]); printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); @@ -155,7 +155,7 @@ printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); -@@ -1312,6 +1313,13 @@ static void print_ie(const struct ie_pri +@@ -1380,6 +1381,13 @@ static void print_ie(const struct ie_pri static const struct ie_print ieprinters[] = { [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, @@ -169,7 +169,7 @@ [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), }, [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), }, -@@ -1321,14 +1329,8 @@ static const struct ie_print ieprinters[ +@@ -1389,14 +1397,8 @@ static const struct ie_print ieprinters[ [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), }, [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), }, [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, @@ -184,7 +184,7 @@ [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), }, [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, -@@ -1336,6 +1338,7 @@ static const struct ie_print ieprinters[ +@@ -1404,6 +1406,7 @@ static const struct ie_print ieprinters[ [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), }, [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), }, [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), }, @@ -192,7 +192,7 @@ }; static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data) -@@ -1767,6 +1770,7 @@ void print_ies(unsigned char *ie, int ie +@@ -1835,6 +1838,7 @@ void print_ies(unsigned char *ie, int ie ieprinters[ie[0]].name && ieprinters[ie[0]].flags & BIT(ptype)) { print_ie(&ieprinters[ie[0]], ie[0], ie[1], ie + 2); @@ -200,7 +200,7 @@ } else if (ie[0] == 221 /* vendor */) { print_vendor(ie[1], ie + 2, unknown, ptype); } else if (unknown) { -@@ -1776,6 +1780,7 @@ void print_ies(unsigned char *ie, int ie +@@ -1844,6 +1848,7 @@ void print_ies(unsigned char *ie, int ie for (i=0; i --- a/interface.c +++ b/interface.c -@@ -368,6 +368,13 @@ static int print_iface_handler(struct nl - printf("\n"); +@@ -374,6 +374,13 @@ static int print_iface_handler(struct nl + indent, txp / 100, txp % 100); } + if (tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]) { diff --git a/package/network/utils/iw/patches/301-ibss_add_VHT80.patch b/package/network/utils/iw/patches/301-ibss_add_VHT80.patch deleted file mode 100644 index 0627bccb46..0000000000 --- a/package/network/utils/iw/patches/301-ibss_add_VHT80.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: "Janusz.Dziedzic@tieto.com" -Date: Thu, 10 Sep 2015 12:04:13 +0200 -Subject: ibss: add VHT80 support for IBSS - -Add VHT80 support for IBSS. - -eg. iw wlan0 ibss join 5180 80MHZ - iw wlan0 ibbs join 5220 80MHZ - -Signed-off-by: Janusz Dziedzic -[fix formatting] -Signed-off-by: Johannes Berg ---- - ibss.c | 49 +++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 41 insertions(+), 8 deletions(-) - ---- a/ibss.c -+++ b/ibss.c -@@ -16,6 +16,39 @@ - - SECTION(ibss); - -+struct chanmode { -+ const char *name; -+ unsigned int width; -+ int freq1_diff; -+ int chantype; /* for older kernel */ -+}; -+ -+static int get_cf1(const struct chanmode *chanmode, unsigned long freq) -+{ -+ int cf1 = freq, j; -+ int vht80[] = { 5180, 5260, 5500, 5580, 5660, 5745 }; -+ -+ switch (chanmode->width) { -+ case NL80211_CHAN_WIDTH_80: -+ /* setup center_freq1 */ -+ for (j = 0; j < ARRAY_SIZE(vht80); j++) { -+ if (freq >= vht80[j] && freq < vht80[j] + 80) -+ break; -+ } -+ -+ if (j == ARRAY_SIZE(vht80)) -+ break; -+ -+ cf1 = vht80[j] + 30; -+ break; -+ default: -+ cf1 = freq + chanmode->freq1_diff; -+ break; -+ } -+ -+ return cf1; -+} -+ - static int join_ibss(struct nl80211_state *state, - struct nl_msg *msg, - int argc, char **argv, -@@ -30,12 +63,8 @@ static int join_ibss(struct nl80211_stat - int bintval; - int i; - unsigned long freq; -- static const struct { -- const char *name; -- unsigned int width; -- int freq1_diff; -- int chantype; /* for older kernel */ -- } *chanmode_selected = NULL, chanmode[] = { -+ const struct chanmode *chanmode_selected = NULL; -+ static const struct chanmode chanmode[] = { - { .name = "HT20", - .width = NL80211_CHAN_WIDTH_20, - .freq1_diff = 0, -@@ -60,6 +89,10 @@ static int join_ibss(struct nl80211_stat - .width = NL80211_CHAN_WIDTH_10, - .freq1_diff = 0, - .chantype = -1 }, -+ { .name = "80MHZ", -+ .width = NL80211_CHAN_WIDTH_80, -+ .freq1_diff = 0, -+ .chantype = -1 }, - }; - - if (argc < 2) -@@ -90,7 +123,7 @@ static int join_ibss(struct nl80211_stat - NLA_PUT_U32(msg, NL80211_ATTR_CHANNEL_WIDTH, - chanmode_selected->width); - NLA_PUT_U32(msg, NL80211_ATTR_CENTER_FREQ1, -- freq + chanmode_selected->freq1_diff); -+ get_cf1(chanmode_selected, freq)); - if (chanmode_selected->chantype != -1) - NLA_PUT_U32(msg, - NL80211_ATTR_WIPHY_CHANNEL_TYPE, -@@ -192,7 +225,7 @@ COMMAND(ibss, leave, NULL, - NL80211_CMD_LEAVE_IBSS, 0, CIB_NETDEV, leave_ibss, - "Leave the current IBSS cell."); - COMMAND(ibss, join, -- " [HT20|HT40+|HT40-|NOHT|5MHZ|10MHZ] [fixed-freq] [] [beacon-interval ]" -+ " [HT20|HT40+|HT40-|NOHT|5MHZ|10MHZ|80MHZ] [fixed-freq] [] [beacon-interval ]" - " [basic-rates ] [mcast-rate ] " - "[key d:0:abcde]", - NL80211_CMD_JOIN_IBSS, 0, CIB_NETDEV, join_ibss, diff --git a/package/network/utils/iw/patches/302-ibss_use_MHz_instead_MHZ.patch b/package/network/utils/iw/patches/302-ibss_use_MHz_instead_MHZ.patch deleted file mode 100644 index f96d5eafda..0000000000 --- a/package/network/utils/iw/patches/302-ibss_use_MHz_instead_MHZ.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Johannes Berg -Date: Fri, 18 Sep 2015 11:11:38 +0200 -Subject: ibss: use correct "MHz" instead of "MHZ" - -Signed-off-by: Johannes Berg ---- - ibss.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/ibss.c -+++ b/ibss.c -@@ -81,15 +81,15 @@ static int join_ibss(struct nl80211_stat - .width = NL80211_CHAN_WIDTH_20_NOHT, - .freq1_diff = 0, - .chantype = NL80211_CHAN_NO_HT }, -- { .name = "5MHZ", -+ { .name = "5MHz", - .width = NL80211_CHAN_WIDTH_5, - .freq1_diff = 0, - .chantype = -1 }, -- { .name = "10MHZ", -+ { .name = "10MHz", - .width = NL80211_CHAN_WIDTH_10, - .freq1_diff = 0, - .chantype = -1 }, -- { .name = "80MHZ", -+ { .name = "80MHz", - .width = NL80211_CHAN_WIDTH_80, - .freq1_diff = 0, - .chantype = -1 }, -@@ -225,7 +225,7 @@ COMMAND(ibss, leave, NULL, - NL80211_CMD_LEAVE_IBSS, 0, CIB_NETDEV, leave_ibss, - "Leave the current IBSS cell."); - COMMAND(ibss, join, -- " [HT20|HT40+|HT40-|NOHT|5MHZ|10MHZ|80MHZ] [fixed-freq] [] [beacon-interval ]" -+ " [HT20|HT40+|HT40-|NOHT|5MHz|10MHz|80MHz] [fixed-freq] [] [beacon-interval ]" - " [basic-rates ] [mcast-rate ] " - "[key d:0:abcde]", - NL80211_CMD_JOIN_IBSS, 0, CIB_NETDEV, join_ibss, diff --git a/package/network/utils/iw/patches/303-mesh_add_VHT80.patch b/package/network/utils/iw/patches/303-mesh_add_VHT80.patch deleted file mode 100644 index 956b0505e6..0000000000 --- a/package/network/utils/iw/patches/303-mesh_add_VHT80.patch +++ /dev/null @@ -1,162 +0,0 @@ -From: Sven Eckelmann -Date: Tue, 24 Nov 2015 17:55:22 +0100 -Subject: iw: add VHT80 support for 802.11s - -Support next to the non-HT/HT channel widths like HT20 or NOHT also VHT80 -channels during the mesh join - - iw dev mesh0 mesh join "meshnet" freq 5180 80MHz - -Signed-off-by: Sven Eckelmann ---- - ibss.c | 33 --------------------------------- - iw.h | 9 +++++++++ - mesh.c | 16 ++++++++-------- - util.c | 26 ++++++++++++++++++++++++++ - 4 files changed, 43 insertions(+), 41 deletions(-) - ---- a/ibss.c -+++ b/ibss.c -@@ -16,39 +16,6 @@ - - SECTION(ibss); - --struct chanmode { -- const char *name; -- unsigned int width; -- int freq1_diff; -- int chantype; /* for older kernel */ --}; -- --static int get_cf1(const struct chanmode *chanmode, unsigned long freq) --{ -- int cf1 = freq, j; -- int vht80[] = { 5180, 5260, 5500, 5580, 5660, 5745 }; -- -- switch (chanmode->width) { -- case NL80211_CHAN_WIDTH_80: -- /* setup center_freq1 */ -- for (j = 0; j < ARRAY_SIZE(vht80); j++) { -- if (freq >= vht80[j] && freq < vht80[j] + 80) -- break; -- } -- -- if (j == ARRAY_SIZE(vht80)) -- break; -- -- cf1 = vht80[j] + 30; -- break; -- default: -- cf1 = freq + chanmode->freq1_diff; -- break; -- } -- -- return cf1; --} -- - static int join_ibss(struct nl80211_state *state, - struct nl_msg *msg, - int argc, char **argv, ---- a/iw.h -+++ b/iw.h -@@ -59,6 +59,13 @@ struct cmd { - const struct cmd *parent; - }; - -+struct chanmode { -+ const char *name; -+ unsigned int width; -+ int freq1_diff; -+ int chantype; /* for older kernel */ -+}; -+ - #define ARRAY_SIZE(ar) (sizeof(ar)/sizeof(ar[0])) - #define DIV_ROUND_UP(x, y) (((x) + (y - 1)) / (y)) - -@@ -174,6 +181,8 @@ void print_ies(unsigned char *ie, int ie - void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen); - void iw_hexdump(const char *prefix, const __u8 *data, size_t len); - -+int get_cf1(const struct chanmode *chanmode, unsigned long freq); -+ - #define SCHED_SCAN_OPTIONS "interval [delay ] " \ - "[freqs +] [matches [ssid ]+]] [active [ssid ]+|passive] [randomise[=/]]" - int parse_sched_scan(struct nl_msg *msg, int *argc, char ***argv); ---- a/mesh.c -+++ b/mesh.c -@@ -439,12 +439,8 @@ static int join_mesh(struct nl80211_stat - int bintval, dtim_period, i, n_rates = 0; - char *end, *value = NULL, *sptr = NULL; - unsigned long freq = 0; -- static const struct { -- const char *name; -- unsigned int width; -- int freq1_diff; -- int chantype; /* for older kernel */ -- } *chanmode_selected = NULL, chanmode[] = { -+ const struct chanmode *chanmode_selected = NULL; -+ static const struct chanmode chanmode[] = { - { .name = "HT20", - .width = NL80211_CHAN_WIDTH_20, - .freq1_diff = 0, -@@ -461,6 +457,10 @@ static int join_mesh(struct nl80211_stat - .width = NL80211_CHAN_WIDTH_20_NOHT, - .freq1_diff = 0, - .chantype = NL80211_CHAN_NO_HT }, -+ { .name = "80MHz", -+ .width = NL80211_CHAN_WIDTH_80, -+ .freq1_diff = 0, -+ .chantype = -1 }, - }; - - if (argc < 1) -@@ -497,7 +497,7 @@ static int join_mesh(struct nl80211_stat - NLA_PUT_U32(msg, NL80211_ATTR_CHANNEL_WIDTH, - chanmode_selected->width); - NLA_PUT_U32(msg, NL80211_ATTR_CENTER_FREQ1, -- freq + chanmode_selected->freq1_diff); -+ get_cf1(chanmode_selected, freq)); - if (chanmode_selected->chantype != -1) - NLA_PUT_U32(msg, - NL80211_ATTR_WIPHY_CHANNEL_TYPE, -@@ -599,7 +599,7 @@ static int join_mesh(struct nl80211_stat - nla_put_failure: - return -ENOBUFS; - } --COMMAND(mesh, join, " [[freq ]" -+COMMAND(mesh, join, " [[freq ]" - " [basic-rates ]], [mcast-rate ]" - " [beacon-interval