From patchwork Tue Nov 24 17:34:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 548187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FC511402CC for ; Wed, 25 Nov 2015 04:37:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=open-mesh-com.20150623.gappssmtp.com header.i=@open-mesh-com.20150623.gappssmtp.com header.b=fs1cYq4E; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 132CD28BEC6; Tue, 24 Nov 2015 18:34:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 97E34281573 for ; Tue, 24 Nov 2015 18:32:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .open-mesh. - helo: .mail-wm0-f48.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 24 Nov 2015 18:32:36 +0100 (CET) Received: by wmww144 with SMTP id w144so36400949wmw.0 for ; Tue, 24 Nov 2015 09:34:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=eLpJpl7Af/9eYKhE3+hZpY/DTNNKpd+A5577c/3Of1A=; b=fs1cYq4ES1H+jNdyiTVkUQEBFxfKrDkeeZc2N1olH5DGqn4XAZ0BQIpaIEjiwMmDbQ TO8TgpwHMKz4SnIsPJwh3cuz793y7S5OZk+WkT/zZlblcCjLCdRLfYvE3D+cl/rouBCd UbKDLpqq+QW6gSx9sQbboGsKPBuk8r0CwgCtMdEeZtQDHoid3QeqVA84qsyuUXrOn/T7 RM08JyUPi0Ia+AwIAA/sY5NaGHdgf2QYSBnmePHrWJ9zlOlLtH8e1/CwbmsNi+npRdAe GcDazoRjNMFqCSIMFOouNe2EFTd6zrd+cqr0r0chcJFdDdnaYcoBWO00smpZgE7TWaMJ 3Cwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eLpJpl7Af/9eYKhE3+hZpY/DTNNKpd+A5577c/3Of1A=; b=eOW/Y1VShRpoVpMQFfescSJ9/BDpzA5qQf1UoSysUD/xuRL38kn16wfS8F72aYZ5k8 RW9q69cZF4S2uLGsk8/XkC0WCrOCyVUaBk8Y4Bpa91sJsUuaO/8Nn8ZNebjRaJVFQXnm H6oPoi8OPL3N8jvO+YX6dk4xqvbdoW9/QZgcVxQ5ipkrU55s7FHTkEKiHhkv1Xz2459y qRlV0wpCNLGwUQ/ZSnEVJTW8AdG5bI6m69ht4NX7fBdNRB0S8vaCZdt8igvKbxDpIC3i Rstr4TluVuDedFw7rcPH62fVVj5pa8a8scHNtisAskzLNQXbpyNQYhC5uWvvdI+dHSUg Ffnw== X-Gm-Message-State: ALoCoQmvHbwqJYHWo0cgg3IwBpcn9E+ivg7y1XgYeThDr8ONPNR++/3TkKDsVzcdi6RufbJcMgOd X-Received: by 10.28.140.211 with SMTP id o202mr15470048wmd.8.1448386476852; Tue, 24 Nov 2015 09:34:36 -0800 (PST) Received: from sven-desktop.home.narfation.org (x4d0d5f44.dyn.telefonica.de. [77.13.95.68]) by smtp.gmail.com with ESMTPSA id s9sm19152651wmf.2.2015.11.24.09.34.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2015 09:34:35 -0800 (PST) From: Sven Eckelmann To: openwrt-devel@lists.openwrt.org Date: Tue, 24 Nov 2015 18:34:15 +0100 Message-Id: <1448386460-24755-1-git-send-email-sven@open-mesh.com> X-Mailer: git-send-email 2.6.2 Cc: Sven Eckelmann Subject: [OpenWrt-Devel] [PATCH 1/6] iw: update to version 4.3 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Sven Eckelmann --- package/network/utils/iw/Makefile | 4 +- .../utils/iw/patches/001-nl80211_h_sync.patch | 79 --------------- .../utils/iw/patches/120-antenna_gain.patch | 3 +- .../network/utils/iw/patches/200-reduce_size.patch | 106 ++++++++++----------- 4 files changed, 56 insertions(+), 136 deletions(-) diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index 53cfee3..ad82081 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.1 +PKG_VERSION:=4.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.kernel.org/pub/software/network/iw -PKG_MD5SUM:=3a292dd342bb88e30e74015ae6fe1e54 +PKG_MD5SUM:=7adec72e91ebdd9c55429fa34a23a6f5 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 afa5506..ce706da 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -19,82 +19,3 @@ /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -2620,16 +2625,17 @@ enum nl80211_band_attr { - * an indoor surroundings, i.e., it is connected to AC power (and not - * through portable DC inverters) or is under the control of a master - * that is acting as an AP and is connected to AC power. -- * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this -+ * @NL80211_FREQUENCY_ATTR_IR_CONCURRENT: IR operation is allowed on this - * channel if it's connected concurrently to a BSS on the same channel on - * the 2 GHz band or to a channel in the same UNII band (on the 5 GHz -- * band), and IEEE80211_CHAN_RADAR is not set. Instantiating a GO on a -- * channel that has the GO_CONCURRENT attribute set can be done when there -- * is a clear assessment that the device is operating under the guidance of -- * an authorized master, i.e., setting up a GO while the device is also -- * connected to an AP with DFS and radar detection on the UNII band (it is -- * up to user-space, i.e., wpa_supplicant to perform the required -- * verifications) -+ * band), and IEEE80211_CHAN_RADAR is not set. Instantiating a GO or TDLS -+ * off-channel on a channel that has the IR_CONCURRENT attribute set can be -+ * done when there is a clear assessment that the device is operating under -+ * the guidance of an authorized master, i.e., setting up a GO or TDLS -+ * off-channel while the device is also connected to an AP with DFS and -+ * radar detection on the UNII band (it is up to user-space, i.e., -+ * wpa_supplicant to perform the required verifications). Using this -+ * attribute for IR is disallowed for master interfaces (IBSS, AP). - * @NL80211_FREQUENCY_ATTR_NO_20MHZ: 20 MHz operation is not allowed - * on this channel in current regulatory domain. - * @NL80211_FREQUENCY_ATTR_NO_10MHZ: 10 MHz operation is not allowed -@@ -2641,7 +2647,7 @@ enum nl80211_band_attr { - * See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122 - * for more information on the FCC description of the relaxations allowed - * by NL80211_FREQUENCY_ATTR_INDOOR_ONLY and -- * NL80211_FREQUENCY_ATTR_GO_CONCURRENT. -+ * NL80211_FREQUENCY_ATTR_IR_CONCURRENT. - */ - enum nl80211_frequency_attr { - __NL80211_FREQUENCY_ATTR_INVALID, -@@ -2659,7 +2665,7 @@ enum nl80211_frequency_attr { - NL80211_FREQUENCY_ATTR_NO_160MHZ, - NL80211_FREQUENCY_ATTR_DFS_CAC_TIME, - NL80211_FREQUENCY_ATTR_INDOOR_ONLY, -- NL80211_FREQUENCY_ATTR_GO_CONCURRENT, -+ NL80211_FREQUENCY_ATTR_IR_CONCURRENT, - NL80211_FREQUENCY_ATTR_NO_20MHZ, - NL80211_FREQUENCY_ATTR_NO_10MHZ, - -@@ -2672,6 +2678,8 @@ enum nl80211_frequency_attr { - #define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN NL80211_FREQUENCY_ATTR_NO_IR - #define NL80211_FREQUENCY_ATTR_NO_IBSS NL80211_FREQUENCY_ATTR_NO_IR - #define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR -+#define NL80211_FREQUENCY_ATTR_GO_CONCURRENT \ -+ NL80211_FREQUENCY_ATTR_IR_CONCURRENT - - /** - * enum nl80211_bitrate_attr - bitrate attributes -@@ -2830,7 +2838,7 @@ enum nl80211_sched_scan_match_attr { - * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated - * base on contiguous rules and wider channels will be allowed to cross - * multiple contiguous/overlapping frequency ranges. -- * @NL80211_RRF_GO_CONCURRENT: See &NL80211_FREQUENCY_ATTR_GO_CONCURRENT -+ * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT - * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation - * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation - * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed -@@ -2847,7 +2855,7 @@ enum nl80211_reg_rule_flags { - NL80211_RRF_NO_IR = 1<<7, - __NL80211_RRF_NO_IBSS = 1<<8, - NL80211_RRF_AUTO_BW = 1<<11, -- NL80211_RRF_GO_CONCURRENT = 1<<12, -+ NL80211_RRF_IR_CONCURRENT = 1<<12, - NL80211_RRF_NO_HT40MINUS = 1<<13, - NL80211_RRF_NO_HT40PLUS = 1<<14, - NL80211_RRF_NO_80MHZ = 1<<15, -@@ -2859,6 +2867,7 @@ enum nl80211_reg_rule_flags { - #define NL80211_RRF_NO_IR NL80211_RRF_NO_IR - #define NL80211_RRF_NO_HT40 (NL80211_RRF_NO_HT40MINUS |\ - NL80211_RRF_NO_HT40PLUS) -+#define NL80211_RRF_GO_CONCURRENT NL80211_RRF_IR_CONCURRENT - - /* For backport compatibility with older userspace */ - #define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS) diff --git a/package/network/utils/iw/patches/120-antenna_gain.patch b/package/network/utils/iw/patches/120-antenna_gain.patch index 8de3df2..6a45c70 100644 --- a/package/network/utils/iw/patches/120-antenna_gain.patch +++ b/package/network/utils/iw/patches/120-antenna_gain.patch @@ -1,12 +1,11 @@ --- a/phy.c +++ b/phy.c -@@ -532,3 +532,31 @@ COMMAND(set, antenna, " | all | +@@ -524,3 +524,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."); + +static int handle_antenna_gain(struct nl80211_state *state, -+ struct nl_cb *cb, + struct nl_msg *msg, + int argc, char **argv, + enum id_input id) diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index 3ba4730..dea24fb 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -11,6 +11,44 @@ OBJS += sections.o OBJS-$(HWSIM) += hwsim.o +--- a/event.c ++++ b/event.c +@@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms + } + + switch (gnlh->cmd) { ++#if 0 + case NL80211_CMD_NEW_WIPHY: + printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); + break; +@@ -376,6 +377,7 @@ static int print_event(struct nl_msg *ms + case NL80211_CMD_SCHED_SCAN_RESULTS: + printf("got scheduled scan results\n"); + break; ++#endif + case NL80211_CMD_REG_CHANGE: + printf("regulatory domain change: "); + +@@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms + mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); + printf("del station %s\n", macbuf); + break; ++#if 0 + case NL80211_CMD_JOIN_IBSS: + mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); + printf("IBSS %s joined\n", macbuf); +@@ -610,9 +613,9 @@ static int print_event(struct nl_msg *ms + case NL80211_CMD_DEL_WIPHY: + printf("delete wiphy\n"); + break; ++#endif + default: +- printf("unknown event %d (%s)\n", +- gnlh->cmd, command_name(gnlh->cmd)); ++ printf("unknown event %d\n", gnlh->cmd); + break; + } + --- a/info.c +++ b/info.c @@ -219,6 +219,7 @@ next: @@ -91,15 +129,15 @@ if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; -@@ -669,6 +679,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP +@@ -668,6 +678,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); +#if 0 - static int handle_commands(struct nl80211_state *state, - struct nl_cb *cb, struct nl_msg *msg, + static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, int argc, char **argv, enum id_input id) -@@ -681,6 +692,7 @@ static int handle_commands(struct nl8021 + { +@@ -679,6 +690,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"); @@ -109,7 +147,7 @@ { --- a/scan.c +++ b/scan.c -@@ -1080,6 +1080,7 @@ static void print_ht_op(const uint8_t ty +@@ -1081,6 +1081,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]); @@ -117,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); -@@ -1311,6 +1312,13 @@ static void print_ie(const struct ie_pri +@@ -1312,6 +1313,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), }, @@ -131,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), }, -@@ -1320,14 +1328,8 @@ static const struct ie_print ieprinters[ +@@ -1321,14 +1329,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), }, @@ -146,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), }, -@@ -1335,6 +1337,7 @@ static const struct ie_print ieprinters[ +@@ -1336,6 +1338,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), }, @@ -154,7 +192,7 @@ }; static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data) -@@ -1766,6 +1769,7 @@ void print_ies(unsigned char *ie, int ie +@@ -1767,6 +1770,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); @@ -162,7 +200,7 @@ } else if (ie[0] == 221 /* vendor */) { print_vendor(ie[1], ie + 2, unknown, ptype); } else if (unknown) { -@@ -1775,6 +1779,7 @@ void print_ies(unsigned char *ie, int ie +@@ -1776,6 +1780,7 @@ void print_ies(unsigned char *ie, int ie for (i=0; icmd) { -+#if 0 - case NL80211_CMD_NEW_WIPHY: - printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); - break; -@@ -368,6 +369,7 @@ static int print_event(struct nl_msg *ms - case NL80211_CMD_SCHED_SCAN_RESULTS: - printf("got scheduled scan results\n"); - break; -+#endif - case NL80211_CMD_REG_CHANGE: - printf("regulatory domain change: "); - -@@ -446,6 +448,7 @@ static int print_event(struct nl_msg *ms - mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); - printf("del station %s\n", macbuf); - break; -+#if 0 - case NL80211_CMD_JOIN_IBSS: - mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); - printf("IBSS %s joined\n", macbuf); -@@ -599,9 +602,9 @@ static int print_event(struct nl_msg *ms - } - printf("\n"); - break; -+#endif - default: -- printf("unknown event %d (%s)\n", -- gnlh->cmd, command_name(gnlh->cmd)); -+ printf("unknown event %d\n", gnlh->cmd); - break; - } -