[OpenWrt-Devel] [PATCH] generic: several linux-4.0 fixes

Álvaro Fernández Rojas noltari at gmail.com
Tue Feb 24 10:29:56 EST 2015


- support linux 4.0 downloads
- fix and refresh linux 4.0 patches
- add missing linux 4.0 symbols
- swconfig: fix linux 4.0 build issues
- netfilter: fix nf_nat_redirect dependencies for 3.19 and 4.0

Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 include/kernel.mk                                  |   4 +
 include/netfilter.mk                               |   1 +
 target/linux/generic/config-4.0                    |  12 ++
 .../linux/generic/files/drivers/net/phy/swconfig.c |  15 ++
 .../patches-4.0/305-mips_module_reloc.patch        |   2 +-
 .../550-ubifs-symlink-xattr-support.patch          |  55 -------
 .../604-netfilter_conntrack_flush.patch            |   4 +-
 .../617-netfilter_skip_filter_sysctl.patch         |   4 +-
 .../patches-4.0/621-sched_act_connmark.patch       | 161 ---------------------
 .../645-bridge_multicast_to_unicast.patch          |   4 +-
 .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch |   2 +-
 .../patches-4.0/821-usb-dwc2-dualrole.patch        | 146 -------------------
 .../generic/patches-4.0/862-gpio_spi_driver.patch  |   4 +-
 13 files changed, 42 insertions(+), 372 deletions(-)
 delete mode 100644 target/linux/generic/patches-4.0/550-ubifs-symlink-xattr-support.patch
 delete mode 100644 target/linux/generic/patches-4.0/621-sched_act_connmark.patch
 delete mode 100644 target/linux/generic/patches-4.0/821-usb-dwc2-dualrole.patch

diff --git a/include/kernel.mk b/include/kernel.mk
index e21d53a..18cb133 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -52,7 +52,11 @@ else
   LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
   TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
   ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
+    ifeq ($(word 1,$(subst ., ,$(KERNEL_BASE))),3)
       LINUX_SITE:=@KERNEL/linux/kernel/v3.x$(TESTING)
+    else
+      LINUX_SITE:=@KERNEL/linux/kernel/v4.x$(TESTING)
+    endif
   endif
 
   ifneq ($(TARGET_BUILD),1)
diff --git a/include/netfilter.mk b/include/netfilter.mk
index ed63b0b..e663ea5 100644
--- a/include/netfilter.mk
+++ b/include/netfilter.mk
@@ -183,6 +183,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_IPV6, $(P_V6)nf_nat_i
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NF_NAT, $(P_XT)xt_nat, ge 3.7.0),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_NAT, $(P_XT)xt_nat, ge 3.18.0),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NF_NAT, $(P_V4)iptable_nat, lt 3.7.0),))
+$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat_redirect, ge 3.19.0),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)iptable_nat, ge 3.7.0),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_IP_NF_NAT, $(P_V4)iptable_nat, ge 3.16.0),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_NF_NAT_IPV6, $(P_V6)ip6table_nat, ge 3.7.0),))
diff --git a/target/linux/generic/config-4.0 b/target/linux/generic/config-4.0
index ae4030a..4361ced 100644
--- a/target/linux/generic/config-4.0
+++ b/target/linux/generic/config-4.0
@@ -254,6 +254,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y
 CONFIG_ARPD=y
 # CONFIG_ARTHUR is not set
 # CONFIG_AS3935 is not set
+# CONFIG_ASM9260_TIMER is not set
 # CONFIG_ASUS_OLED is not set
 # CONFIG_ASYMMETRIC_KEY_TYPE is not set
 # CONFIG_ASYNC_RAID6_TEST is not set
@@ -774,6 +775,7 @@ CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
 # CONFIG_CRYPTO_TWOFISH_COMMON is not set
 # CONFIG_CRYPTO_USER is not set
 # CONFIG_CRYPTO_USER_API_HASH is not set
+# CONFIG_CRYPTO_USER_API_RNG is not set
 # CONFIG_CRYPTO_USER_API_SKCIPHER is not set
 # CONFIG_CRYPTO_VMAC is not set
 # CONFIG_CRYPTO_WP512 is not set
@@ -864,6 +866,7 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 # CONFIG_DEPRECATED_PARAM_STRUCT is not set
 # CONFIG_DETECT_HUNG_TASK is not set
 # CONFIG_DEVKMEM is not set
+# CONFIG_DEVMEM is not set
 CONFIG_DEVPORT=y
 # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 # CONFIG_DEVTMPFS is not set
@@ -964,6 +967,7 @@ CONFIG_EPOLL=y
 # CONFIG_EQUALIZER is not set
 # CONFIG_ET131X is not set
 # CONFIG_GATEWORKS_GW16083 is not set
+# CONFIG_GDB_SCRIPTS is not set
 # CONFIG_GLOB_SELFTEST is not set
 # CONFIG_GS_FPGABOOT is not set
 # CONFIG_ETH16I is not set
@@ -1439,6 +1443,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
 # CONFIG_IKCONFIG is not set
 # CONFIG_IKCONFIG_PROC is not set
 # CONFIG_IMAGE_CMDLINE_HACK is not set
+# CONFIG_IMGPDC_WDT is not set
 # CONFIG_IMX_IPUV3_CORE is not set
 CONFIG_INET=y
 # CONFIG_INET6_AH is not set
@@ -1513,6 +1518,7 @@ CONFIG_INOTIFY_USER=y
 # CONFIG_INPUT_DRV2667_HAPTICS is not set
 # CONFIG_INPUT_EVBUG is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_E3X0_BUTTON is not set
 # CONFIG_INPUT_FF_MEMLESS is not set
 # CONFIG_INPUT_GP2A is not set
 # CONFIG_INPUT_GPIO_BEEPER is not set
@@ -1797,6 +1803,7 @@ CONFIG_LBDAF=y
 # CONFIG_LEDS_BD2802 is not set
 # CONFIG_LEDS_BLINKM is not set
 CONFIG_LEDS_CLASS=y
+# CONFIG_LEDS_CLASS_FLASH is not set
 # CONFIG_LEDS_DAC124S085 is not set
 # CONFIG_LEDS_GPIO is not set
 CONFIG_LEDS_GPIO_OF=y
@@ -1883,6 +1890,7 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
 # CONFIG_LTPC is not set
 # CONFIG_LUSTRE_FS is not set
 # CONFIG_LXT_PHY is not set
+# CONFIG_LZ4HC_COMPRESS is not set
 CONFIG_LZMA_COMPRESS=y
 CONFIG_LZMA_DECOMPRESS=y
 # CONFIG_LZO_COMPRESS is not set
@@ -2971,6 +2979,7 @@ CONFIG_RCU_FANOUT=32
 # CONFIG_RCU_FANOUT_EXACT is not set
 CONFIG_RCU_FANOUT_LEAF=16
 # CONFIG_RCU_FAST_NO_HZ is not set
+CONFIG_RCU_KTHREAD_PRIO=0
 # CONFIG_RCU_NOCB_CPU is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_RCU_TRACE is not set
@@ -3438,6 +3447,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=2
 # CONFIG_SERIAL_ALTERA_UART is not set
 # CONFIG_SERIAL_ARC is not set
 # CONFIG_SERIAL_BCM63XX is not set
+# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_EARLYCON=y
@@ -3765,6 +3775,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SPI_FSL_SPI is not set
 # CONFIG_SPI_GPIO is not set
 # CONFIG_SPI_GPIO_OLD is not set
+# CONFIG_SPI_IMG_SPFI is not set
 # CONFIG_SPI_LM70_LLP is not set
 # CONFIG_SPI_MASTER is not set
 # CONFIG_SPI_MPC52xx is not set
@@ -3882,6 +3893,7 @@ CONFIG_TCP_CONG_CUBIC=y
 # CONFIG_TEST_BPF is not set
 # CONFIG_TEST_UDELAY is not set
 # CONFIG_TEST_FIRMWARE is not set
+# CONFIG_TEST_HEXDUMP is not set
 # CONFIG_TEST_KSTRTOX is not set
 # CONFIG_TEST_LIST_SORT is not set
 # CONFIG_TEST_LKM is not set
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index b0ba90d..bb9acf5 100644
--- a/target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic/files/drivers/net/phy/swconfig.c
@@ -396,7 +396,12 @@ swconfig_dump_attr(struct swconfig_callback *cb, void *arg)
 			op->description))
 			goto nla_put_failure;
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
 	return genlmsg_end(msg, hdr);
+#else
+	genlmsg_end(msg, hdr);
+	return msg->len;
+#endif
 nla_put_failure:
 	genlmsg_cancel(msg, hdr);
 	return -EMSGSIZE;
@@ -828,7 +833,12 @@ swconfig_get_attr(struct sk_buff *skb, struct genl_info *info)
 		err = -EINVAL;
 		goto error;
 	}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
 	err = genlmsg_end(msg, hdr);
+#else
+	genlmsg_end(msg, hdr);
+	err = msg->len;
+#endif
 	if (err < 0)
 		goto nla_put_failure;
 
@@ -891,7 +901,12 @@ swconfig_send_switch(struct sk_buff *msg, u32 pid, u32 seq, int flags,
 		nla_nest_end(msg, p);
 	}
 	nla_nest_end(msg, m);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
 	return genlmsg_end(msg, hdr);
+#else
+	genlmsg_end(msg, hdr);
+	return msg->len;
+#endif
 nla_put_failure:
 	genlmsg_cancel(msg, hdr);
 	return -EMSGSIZE;
diff --git a/target/linux/generic/patches-4.0/305-mips_module_reloc.patch b/target/linux/generic/patches-4.0/305-mips_module_reloc.patch
index 2e92916..752d597 100644
--- a/target/linux/generic/patches-4.0/305-mips_module_reloc.patch
+++ b/target/linux/generic/patches-4.0/305-mips_module_reloc.patch
@@ -150,7 +150,7 @@
  {
 +#ifdef MODULE_START
  	return __vmalloc_node_range(size, 1, MODULE_START, MODULE_END,
- 				GFP_KERNEL, PAGE_KERNEL, NUMA_NO_NODE,
+ 				GFP_KERNEL, PAGE_KERNEL, 0, NUMA_NO_NODE,
  				__builtin_return_address(0));
 +#else
 +	void *ptr;
diff --git a/target/linux/generic/patches-4.0/550-ubifs-symlink-xattr-support.patch b/target/linux/generic/patches-4.0/550-ubifs-symlink-xattr-support.patch
deleted file mode 100644
index d3f2ccc..0000000
--- a/target/linux/generic/patches-4.0/550-ubifs-symlink-xattr-support.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/fs/ubifs/file.c
-+++ b/fs/ubifs/file.c
-@@ -1573,6 +1573,10 @@ const struct inode_operations ubifs_syml
- 	.follow_link = ubifs_follow_link,
- 	.setattr     = ubifs_setattr,
- 	.getattr     = ubifs_getattr,
-+	.setxattr    = ubifs_setxattr,
-+	.getxattr    = ubifs_getxattr,
-+	.listxattr   = ubifs_listxattr,
-+	.removexattr = ubifs_removexattr,
- };
- 
- const struct file_operations ubifs_file_operations = {
---- a/fs/ubifs/journal.c
-+++ b/fs/ubifs/journal.c
-@@ -572,6 +572,13 @@ int ubifs_jnl_update(struct ubifs_info *
- 	aligned_dlen = ALIGN(dlen, 8);
- 	aligned_ilen = ALIGN(ilen, 8);
- 	len = aligned_dlen + aligned_ilen + UBIFS_INO_NODE_SZ;
-+	if (xent) {
-+		/*
-+		 * Make sure to account for host_ui->data_len in
-+		 * length calculation in case there is extended attribute.
-+		 */
-+		len += host_ui->data_len;
-+	}
- 	dent = kmalloc(len, GFP_NOFS);
- 	if (!dent)
- 		return -ENOMEM;
-@@ -648,7 +655,8 @@ int ubifs_jnl_update(struct ubifs_info *
- 
- 	ino_key_init(c, &ino_key, dir->i_ino);
- 	ino_offs += aligned_ilen;
--	err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, UBIFS_INO_NODE_SZ);
-+	err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs,
-+			    UBIFS_INO_NODE_SZ + host_ui->data_len);
- 	if (err)
- 		goto out_ro;
- 
---- a/fs/ubifs/xattr.c
-+++ b/fs/ubifs/xattr.c
-@@ -209,12 +209,12 @@ static int change_xattr(struct ubifs_inf
- 		goto out_free;
- 	}
- 	inode->i_size = ui->ui_size = size;
--	ui->data_len = size;
- 
- 	mutex_lock(&host_ui->ui_mutex);
- 	host->i_ctime = ubifs_current_time(host);
- 	host_ui->xattr_size -= CALC_XATTR_BYTES(ui->data_len);
- 	host_ui->xattr_size += CALC_XATTR_BYTES(size);
-+	ui->data_len = size;
- 
- 	/*
- 	 * It is important to write the host inode after the xattr inode
diff --git a/target/linux/generic/patches-4.0/604-netfilter_conntrack_flush.patch b/target/linux/generic/patches-4.0/604-netfilter_conntrack_flush.patch
index bd7a7ff..6d58189 100644
--- a/target/linux/generic/patches-4.0/604-netfilter_conntrack_flush.patch
+++ b/target/linux/generic/patches-4.0/604-netfilter_conntrack_flush.patch
@@ -8,7 +8,7 @@
  #include <net/net_namespace.h>
  #ifdef CONFIG_SYSCTL
  #include <linux/sysctl.h>
-@@ -259,10 +260,66 @@ static int ct_open(struct inode *inode,
+@@ -265,10 +266,66 @@ static int ct_open(struct inode *inode,
  			sizeof(struct ct_iter_state));
  }
  
@@ -75,7 +75,7 @@
  	.llseek  = seq_lseek,
  	.release = seq_release_net,
  };
-@@ -364,7 +421,7 @@ static int nf_conntrack_standalone_init_
+@@ -370,7 +427,7 @@ static int nf_conntrack_standalone_init_
  {
  	struct proc_dir_entry *pde;
  
diff --git a/target/linux/generic/patches-4.0/617-netfilter_skip_filter_sysctl.patch b/target/linux/generic/patches-4.0/617-netfilter_skip_filter_sysctl.patch
index 5d67818..6cf6568 100644
--- a/target/linux/generic/patches-4.0/617-netfilter_skip_filter_sysctl.patch
+++ b/target/linux/generic/patches-4.0/617-netfilter_skip_filter_sysctl.patch
@@ -63,7 +63,7 @@
  			     net->ipv6.ip6table_filter);
 --- a/net/netfilter/nf_conntrack_standalone.c
 +++ b/net/netfilter/nf_conntrack_standalone.c
-@@ -501,6 +501,13 @@ static struct ctl_table nf_ct_sysctl_tab
+@@ -507,6 +507,13 @@ static struct ctl_table nf_ct_sysctl_tab
  		.extra2		= &log_invalid_proto_max,
  	},
  	{
@@ -77,7 +77,7 @@
  		.procname	= "nf_conntrack_expect_max",
  		.data		= &nf_ct_expect_max,
  		.maxlen		= sizeof(int),
-@@ -536,6 +543,7 @@ static int nf_conntrack_standalone_init_
+@@ -542,6 +549,7 @@ static int nf_conntrack_standalone_init_
  	table[2].data = &net->ct.htable_size;
  	table[3].data = &net->ct.sysctl_checksum;
  	table[4].data = &net->ct.sysctl_log_invalid;
diff --git a/target/linux/generic/patches-4.0/621-sched_act_connmark.patch b/target/linux/generic/patches-4.0/621-sched_act_connmark.patch
deleted file mode 100644
index bff2765..0000000
--- a/target/linux/generic/patches-4.0/621-sched_act_connmark.patch
+++ /dev/null
@@ -1,161 +0,0 @@
---- /dev/null
-+++ b/net/sched/act_connmark.c
-@@ -0,0 +1,126 @@
-+/*
-+ * Copyright (c) 2011 Felix Fietkau <nbd at openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms and conditions of the GNU General Public License,
-+ * version 2, as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-+ * Place - Suite 330, Boston, MA 02111-1307 USA.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/skbuff.h>
-+#include <linux/rtnetlink.h>
-+#include <linux/pkt_cls.h>
-+#include <linux/ip.h>
-+#include <linux/ipv6.h>
-+#include <net/netlink.h>
-+#include <net/pkt_sched.h>
-+#include <net/act_api.h>
-+
-+#include <net/netfilter/nf_conntrack.h>
-+#include <net/netfilter/nf_conntrack_core.h>
-+
-+#define TCA_ACT_CONNMARK	20
-+
-+#define CONNMARK_TAB_MASK     3
-+
-+static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
-+		       struct tcf_result *res)
-+{
-+	struct nf_conn *c;
-+	enum ip_conntrack_info ctinfo;
-+	int proto;
-+	int r;
-+
-+	if (skb->protocol == htons(ETH_P_IP)) {
-+		if (skb->len < sizeof(struct iphdr))
-+			goto out;
-+		proto = PF_INET;
-+	} else if (skb->protocol == htons(ETH_P_IPV6)) {
-+		if (skb->len < sizeof(struct ipv6hdr))
-+			goto out;
-+		proto = PF_INET6;
-+	} else
-+		goto out;
-+
-+	r = nf_conntrack_in(dev_net(skb->dev), proto, NF_INET_PRE_ROUTING, skb);
-+	if (r != NF_ACCEPT)
-+		goto out;
-+
-+	c = nf_ct_get(skb, &ctinfo);
-+	if (!c)
-+		goto out;
-+
-+	skb->mark = c->mark;
-+	nf_conntrack_put(skb->nfct);
-+	skb->nfct = NULL;
-+
-+out:
-+	return TC_ACT_PIPE;
-+}
-+
-+static int tcf_connmark_init(struct net *net, struct nlattr *nla,
-+			     struct nlattr *est, struct tc_action *a,
-+			     int ovr, int bind)
-+{
-+	int ret = 0;
-+
-+	if (!tcf_hash_check(0, a, bind)) {
-+		ret = tcf_hash_create(0, est, a, sizeof(struct tcf_common), bind);
-+		if (ret)
-+		    return ret;
-+
-+		tcf_hash_insert(a);
-+		ret = ACT_P_CREATED;
-+	} else {
-+		if (!ovr) {
-+			tcf_hash_release(a, bind);
-+			return -EEXIST;
-+		}
-+	}
-+
-+	return ret;
-+}
-+
-+static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a,
-+				int bind, int ref)
-+{
-+	return skb->len;
-+}
-+
-+static struct tc_action_ops act_connmark_ops = {
-+	.kind		=	"connmark",
-+	.type		=	TCA_ACT_CONNMARK,
-+	.owner		=	THIS_MODULE,
-+	.act		=	tcf_connmark,
-+	.dump		=	tcf_connmark_dump,
-+	.init		=	tcf_connmark_init,
-+};
-+
-+MODULE_AUTHOR("Felix Fietkau <nbd at openwrt.org>");
-+MODULE_DESCRIPTION("Connection tracking mark restoring");
-+MODULE_LICENSE("GPL");
-+
-+static int __init connmark_init_module(void)
-+{
-+
-+	return tcf_register_action(&act_connmark_ops, CONNMARK_TAB_MASK);
-+}
-+
-+static void __exit connmark_cleanup_module(void)
-+{
-+	tcf_unregister_action(&act_connmark_ops);
-+}
-+
-+module_init(connmark_init_module);
-+module_exit(connmark_cleanup_module);
---- a/net/sched/Kconfig
-+++ b/net/sched/Kconfig
-@@ -729,6 +729,19 @@ config NET_ACT_VLAN
- 	  To compile this code as a module, choose M here: the
- 	  module will be called act_vlan.
- 
-+config NET_ACT_CONNMARK
-+        tristate "Connection Tracking Marking"
-+        depends on NET_CLS_ACT
-+        depends on NF_CONNTRACK
-+	 depends on NF_CONNTRACK_MARK
-+        ---help---
-+	  Say Y here to restore the connmark from a scheduler action
-+
-+	  If unsure, say N.
-+
-+	  To compile this code as a module, choose M here: the
-+	  module will be called act_connmark.
-+
- config NET_CLS_IND
- 	bool "Incoming device classification"
- 	depends on NET_CLS_U32 || NET_CLS_FW
---- a/net/sched/Makefile
-+++ b/net/sched/Makefile
-@@ -16,6 +16,7 @@ obj-$(CONFIG_NET_ACT_PEDIT)	+= act_pedit
- obj-$(CONFIG_NET_ACT_SIMP)	+= act_simple.o
- obj-$(CONFIG_NET_ACT_SKBEDIT)	+= act_skbedit.o
- obj-$(CONFIG_NET_ACT_CSUM)	+= act_csum.o
-+obj-$(CONFIG_NET_ACT_CONNMARK)	+= act_connmark.o
- obj-$(CONFIG_NET_ACT_VLAN)	+= act_vlan.o
- obj-$(CONFIG_NET_SCH_FIFO)	+= sch_fifo.o
- obj-$(CONFIG_NET_SCH_CBQ)	+= sch_cbq.o
diff --git a/target/linux/generic/patches-4.0/645-bridge_multicast_to_unicast.patch b/target/linux/generic/patches-4.0/645-bridge_multicast_to_unicast.patch
index fb5c389..f09875c 100644
--- a/target/linux/generic/patches-4.0/645-bridge_multicast_to_unicast.patch
+++ b/target/linux/generic/patches-4.0/645-bridge_multicast_to_unicast.patch
@@ -273,7 +273,7 @@
  };
  
  struct net_bridge_mdb_entry
-@@ -476,7 +479,8 @@ void br_multicast_free_pg(struct rcu_hea
+@@ -480,7 +483,8 @@ void br_multicast_free_pg(struct rcu_hea
  struct net_bridge_port_group *
  br_multicast_new_port_group(struct net_bridge_port *port, struct br_ip *group,
  			    struct net_bridge_port_group __rcu *next,
@@ -285,7 +285,7 @@
  void br_mdb_notify(struct net_device *dev, struct net_bridge_port *port,
 --- a/net/bridge/br_mdb.c
 +++ b/net/bridge/br_mdb.c
-@@ -342,7 +342,7 @@ static int br_mdb_add_group(struct net_b
+@@ -343,7 +343,7 @@ static int br_mdb_add_group(struct net_b
  			break;
  	}
  
diff --git a/target/linux/generic/patches-4.0/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/patches-4.0/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
index 230c808..cf5737d 100644
--- a/target/linux/generic/patches-4.0/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
+++ b/target/linux/generic/patches-4.0/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
@@ -472,7 +472,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  	return 0;
  
  nla_put_failure:
-@@ -1769,6 +2022,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -1777,6 +2030,7 @@ static const struct nla_policy ip6_tnl_p
  	[IFLA_IPTUN_FLOWINFO]		= { .type = NLA_U32 },
  	[IFLA_IPTUN_FLAGS]		= { .type = NLA_U32 },
  	[IFLA_IPTUN_PROTO]		= { .type = NLA_U8 },
diff --git a/target/linux/generic/patches-4.0/821-usb-dwc2-dualrole.patch b/target/linux/generic/patches-4.0/821-usb-dwc2-dualrole.patch
deleted file mode 100644
index 9e841cb..0000000
--- a/target/linux/generic/patches-4.0/821-usb-dwc2-dualrole.patch
+++ /dev/null
@@ -1,146 +0,0 @@
---- a/drivers/usb/dwc2/Kconfig
-+++ b/drivers/usb/dwc2/Kconfig
-@@ -1,6 +1,6 @@
- config USB_DWC2
--	bool "DesignWare USB2 DRD Core Support"
--	depends on USB
-+	tristate "DesignWare USB2 DRD Core Support"
-+	depends on USB || USB_GADGET
- 	help
- 	  Say Y here if your system has a Dual Role Hi-Speed USB
- 	  controller based on the DesignWare HSOTG IP Core.
-@@ -10,49 +10,61 @@ config USB_DWC2
- 	  bus interface module (if you have a PCI bus system) will be
- 	  called dwc2_pci.ko, and the platform interface module (for
- 	  controllers directly connected to the CPU) will be called
--	  dwc2_platform.ko. For gadget mode, there will be a single
--	  module called dwc2_gadget.ko.
--
--	  NOTE: The s3c-hsotg driver is now renamed to dwc2_gadget. The
--	  host and gadget drivers are still currently separate drivers.
--	  There are plans to merge the dwc2_gadget driver with the dwc2
--	  host driver in the near future to create a dual-role driver.
-+	  dwc2_platform.ko. For all modes(host, gadget and dual-role), there
-+	  will be an additional module named dwc2.ko.
- 
- if USB_DWC2
- 
-+choice
-+	bool "DWC2 Mode Selection"
-+	default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
-+	default USB_DWC2_HOST if (USB && !USB_GADGET)
-+	default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
-+
- config USB_DWC2_HOST
--	tristate "Host only mode"
-+	bool "Host only mode"
- 	depends on USB
- 	help
- 	  The Designware USB2.0 high-speed host controller
--	  integrated into many SoCs.
-+	  integrated into many SoCs. Select this option if you want the
-+	  driver to operate in Host-only mode.
- 
--config USB_DWC2_PLATFORM
--	bool "DWC2 Platform"
--	depends on USB_DWC2_HOST
--	default USB_DWC2_HOST
-+comment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
-+
-+config USB_DWC2_PERIPHERAL
-+	bool "Gadget only mode"
-+	depends on USB_GADGET=y || USB_GADGET=USB_DWC2
-+	help
-+	  The Designware USB2.0 high-speed gadget controller
-+	  integrated into many SoCs. Select this option if you want the
-+	  driver to operate in Peripheral-only mode. This option requires
-+	  USB_GADGET to be enabled.
-+
-+config USB_DWC2_DUAL_ROLE
-+	bool "Dual Role mode"
-+	depends on (USB=y || USB=USB_DWC2) && (USB_GADGET=y || USB_GADGET=USB_DWC2)
- 	help
--	  The Designware USB2.0 platform interface module for
--	  controllers directly connected to the CPU. This is only
--	  used for host mode.
-+	  Select this option if you want the driver to work in a dual-role
-+	  mode. In this mode both host and gadget features are enabled, and
-+	  the role will be determined by the cable that gets plugged-in. This
-+	  option requires USB_GADGET to be enabled.
-+endchoice
-+
-+config USB_DWC2_PLATFORM
-+	tristate "DWC2 Platform"
-+	default USB_DWC2_HOST || USB_DWC2_PERIPHERAL
-+        help
-+          The Designware USB2.0 platform interface module for
-+          controllers directly connected to the CPU.
- 
- config USB_DWC2_PCI
--	bool "DWC2 PCI"
-+	tristate "DWC2 PCI"
- 	depends on USB_DWC2_HOST && PCI
- 	default USB_DWC2_HOST
- 	help
- 	  The Designware USB2.0 PCI interface module for controllers
- 	  connected to a PCI bus. This is only used for host mode.
- 
--comment "Gadget mode requires USB Gadget support to be enabled"
--
--config USB_DWC2_PERIPHERAL
--	tristate "Gadget only mode"
--	depends on USB_GADGET
--	help
--	  The Designware USB2.0 high-speed gadget controller
--	  integrated into many SoCs.
--
- config USB_DWC2_DEBUG
- 	bool "Enable Debugging Messages"
- 	help
---- a/drivers/usb/dwc2/Makefile
-+++ b/drivers/usb/dwc2/Makefile
-@@ -1,28 +1,28 @@
- ccflags-$(CONFIG_USB_DWC2_DEBUG)	+= -DDEBUG
- ccflags-$(CONFIG_USB_DWC2_VERBOSE)	+= -DVERBOSE_DEBUG
- 
--obj-$(CONFIG_USB_DWC2_HOST)		+= dwc2.o
-+obj-$(CONFIG_USB_DWC2)			+= dwc2.o
- dwc2-y					:= core.o core_intr.o
--dwc2-y					+= hcd.o hcd_intr.o
--dwc2-y					+= hcd_queue.o hcd_ddma.o
-+
-+ifneq ($(filter y,$(CONFIG_USB_DWC2_HOST) $(CONFIG_USB_DWC2_DUAL_ROLE)),)
-+	dwc2-y				+= hcd.o hcd_intr.o
-+	dwc2-y				+= hcd_queue.o hcd_ddma.o
-+endif
-+
-+ifneq ($(filter y,$(CONFIG_USB_DWC2_PERIPHERAL) $(CONFIG_USB_DWC2_DUAL_ROLE)),)
-+	dwc2-y       			+= gadget.o
-+endif
- 
- # NOTE: The previous s3c-hsotg peripheral mode only driver has been moved to
- # this location and renamed gadget.c. When building for dynamically linked
--# modules, dwc2_gadget.ko will get built for peripheral mode. For host mode,
--# the core module will be dwc2.ko, the PCI bus interface module will called
--# dwc2_pci.ko and the platform interface module will be called dwc2_platform.ko.
--# At present the host and gadget driver will be separate drivers, but there
--# are plans in the near future to create a dual-role driver.
-+# modules, dwc2.ko will get built for host mode, peripheral mode, and dual-role
-+# mode. The PCI bus interface module will called dwc2_pci.ko and the platform
-+# interface module will be called dwc2_platform.ko.
- 
- ifneq ($(CONFIG_USB_DWC2_PCI),)
--	obj-$(CONFIG_USB_DWC2_HOST)	+= dwc2_pci.o
-+	obj-$(CONFIG_USB_DWC2)		+= dwc2_pci.o
- 	dwc2_pci-y			:= pci.o
- endif
- 
--ifneq ($(CONFIG_USB_DWC2_PLATFORM),)
--	obj-$(CONFIG_USB_DWC2_HOST)	+= dwc2_platform.o
--	dwc2_platform-y			:= platform.o
--endif
--
--obj-$(CONFIG_USB_DWC2_PERIPHERAL)	+= dwc2_gadget.o
--dwc2_gadget-y				:= gadget.o
-+obj-$(CONFIG_USB_DWC2_PLATFORM)		+= dwc2_platform.o
-+dwc2_platform-y				:= platform.o
diff --git a/target/linux/generic/patches-4.0/862-gpio_spi_driver.patch b/target/linux/generic/patches-4.0/862-gpio_spi_driver.patch
index 8ffea82..be05938 100644
--- a/target/linux/generic/patches-4.0/862-gpio_spi_driver.patch
+++ b/target/linux/generic/patches-4.0/862-gpio_spi_driver.patch
@@ -345,7 +345,7 @@ Please use the new mainline SPI-GPIO driver, as of 2.6.29.
 +MODULE_LICENSE("GPL v2");
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -232,6 +232,15 @@ config SPI_IMG_SPFI
+@@ -242,6 +242,15 @@ config SPI_IMG_SPFI
  	  This enables support for the SPFI master controller found on
  	  IMG SoCs.
  
@@ -363,7 +363,7 @@ Please use the new mainline SPI-GPIO driver, as of 2.6.29.
  	depends on ARCH_MXC || COMPILE_TEST
 --- a/drivers/spi/Makefile
 +++ b/drivers/spi/Makefile
-@@ -40,6 +40,7 @@ obj-$(CONFIG_SPI_FSL_LIB)		+= spi-fsl-li
+@@ -41,6 +41,7 @@ obj-$(CONFIG_SPI_FSL_LIB)		+= spi-fsl-li
  obj-$(CONFIG_SPI_FSL_ESPI)		+= spi-fsl-espi.o
  obj-$(CONFIG_SPI_FSL_SPI)		+= spi-fsl-spi.o
  obj-$(CONFIG_SPI_GPIO)			+= spi-gpio.o
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list