فهرست منبع

kernel: update 4.9 to 4.9.44

Refresh patches.
Adapt 704-phy-no-genphy-soft-reset.patch.
Remove brcm2708/950-0005-mm-Remove-the-PFN-busy-warning.patch.
Compile-tested on brcm2708/bcm2708 and x86/64.
Runtime-tested on brcm2708/bcm2708 and x86/64.

Fixes the following vulnerabilities:
- CVE-2017-7533
- CVE-2017-1000111
- CVE-2017-1000112

Signed-off-by: Stijn Tintel <[email protected]>
Stijn Tintel 8 سال پیش
والد
کامیت
2d02a4f5bd
100فایلهای تغییر یافته به همراه306 افزوده شده و 1044 حذف شده
  1. 2 2
      include/kernel-version.mk
  2. 0 25
      target/linux/brcm2708/patches-4.9/950-0005-mm-Remove-the-PFN-busy-warning.patch
  3. 1 1
      target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
  4. 1 1
      target/linux/brcm2708/patches-4.9/950-0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch
  5. 0 5
      target/linux/generic/backport-4.9/010-Kbuild-don-t-hardcode-path-to-awk-in-scripts-ld-vers.patch
  6. 1 6
      target/linux/generic/backport-4.9/011-kbuild-export-SUBARCH.patch
  7. 1 16
      target/linux/generic/backport-4.9/020-backport_netfilter_rtcache.patch
  8. 1 1
      target/linux/generic/backport-4.9/021-bridge-multicast-to-unicast.patch
  9. 2 2
      target/linux/generic/backport-4.9/061-v4.10-0002-mtd-spi-nor-fix-spansion-quad-enable.patch
  10. 3 3
      target/linux/generic/backport-4.9/062-v4.11-0001-mtd-spi-nor-Add-support-for-S3AN-spi-nor-devices.patch
  11. 1 1
      target/linux/generic/backport-4.9/062-v4.11-0004-mtd-spi-nor-rename-SPINOR_OP_-macros-of-the-4-byte-a.patch
  12. 1 1
      target/linux/generic/backport-4.9/062-v4.11-0005-mtd-spi-nor-add-a-stateless-method-to-support-memory.patch
  13. 0 5
      target/linux/generic/hack-4.9/202-reduce_module_size.patch
  14. 10 23
      target/linux/generic/hack-4.9/204-module_strip.patch
  15. 2 9
      target/linux/generic/hack-4.9/207-disable-modorder.patch
  16. 1 13
      target/linux/generic/hack-4.9/210-darwin_scripts_include.patch
  17. 1 10
      target/linux/generic/hack-4.9/211-host_tools_portability.patch
  18. 0 10
      target/linux/generic/hack-4.9/212-byteshift_portability.patch
  19. 0 5
      target/linux/generic/hack-4.9/214-spidev_h_portability.patch
  20. 4 21
      target/linux/generic/hack-4.9/220-gc_sections.patch
  21. 1 10
      target/linux/generic/hack-4.9/221-module_exports.patch
  22. 2 11
      target/linux/generic/hack-4.9/230-openwrt_lzma_options.patch
  23. 0 5
      target/linux/generic/hack-4.9/250-netfilter_depends.patch
  24. 1 18
      target/linux/generic/hack-4.9/251-sound_kconfig.patch
  25. 0 11
      target/linux/generic/hack-4.9/259-regmap_dynamic.patch
  26. 1 8
      target/linux/generic/hack-4.9/260-crypto_test_dependencies.patch
  27. 0 11
      target/linux/generic/hack-4.9/280-rfkill-stubs.patch
  28. 1 8
      target/linux/generic/hack-4.9/301-mips_image_cmdline_hack.patch
  29. 0 5
      target/linux/generic/hack-4.9/321-powerpc_crtsavres_prereq.patch
  30. 49 61
      target/linux/generic/hack-4.9/531-debloat_lzma.patch
  31. 1 6
      target/linux/generic/hack-4.9/640-bridge-only-accept-EAP-locally.patch
  32. 8 16
      target/linux/generic/hack-4.9/641-bridge_port_isolate.patch
  33. 1 6
      target/linux/generic/hack-4.9/651-wireless_mesh_header.patch
  34. 1 6
      target/linux/generic/hack-4.9/660-fq_codel_defaults.patch
  35. 4 17
      target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch
  36. 1 6
      target/linux/generic/hack-4.9/662-remove_pfifo_fast.patch
  37. 0 9
      target/linux/generic/hack-4.9/700-swconfig_switch_drivers.patch
  38. 1 1
      target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch
  39. 1 1
      target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch
  40. 13 25
      target/linux/generic/hack-4.9/721-phy_packets.patch
  41. 6 12
      target/linux/generic/hack-4.9/773-bgmac-add-srab-switch.patch
  42. 1 8
      target/linux/generic/hack-4.9/835-misc-owl_loader.patch
  43. 1 18
      target/linux/generic/hack-4.9/901-debloat_sock_diag.patch
  44. 41 81
      target/linux/generic/hack-4.9/902-debloat_proc.patch
  45. 1 12
      target/linux/generic/hack-4.9/904-debloat_dma_buf.patch
  46. 1 5
      target/linux/generic/hack-4.9/910-kobject_uevent.patch
  47. 8 15
      target/linux/generic/hack-4.9/911-kobject_add_broadcast_uevent.patch
  48. 0 5
      target/linux/generic/hack-4.9/921-always-create-console-node-in-initramfs.patch
  49. 4 23
      target/linux/generic/hack-4.9/930-crashlog.patch
  50. 0 5
      target/linux/generic/pending-4.9/130-add-linux-spidev-compatible-si3210.patch
  51. 1 1
      target/linux/generic/pending-4.9/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
  52. 1 6
      target/linux/generic/pending-4.9/201-extra_optimization.patch
  53. 4 15
      target/linux/generic/pending-4.9/203-kallsyms_uncompressed.patch
  54. 2 7
      target/linux/generic/pending-4.9/205-backtrace_module_info.patch
  55. 0 5
      target/linux/generic/pending-4.9/206-mips-disable-vdso.patch
  56. 2 7
      target/linux/generic/pending-4.9/240-remove-unsane-filenames-from-deps_initramfs-list.patch
  57. 1 6
      target/linux/generic/pending-4.9/261-enable_wilink_platform_without_drivers.patch
  58. 2 2
      target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch
  59. 1 6
      target/linux/generic/pending-4.9/302-mips_no_branch_likely.patch
  60. 1 1
      target/linux/generic/pending-4.9/304-mips_disable_fpu.patch
  61. 3 12
      target/linux/generic/pending-4.9/305-mips_module_reloc.patch
  62. 2 14
      target/linux/generic/pending-4.9/306-mips_mem_functions_performance.patch
  63. 0 5
      target/linux/generic/pending-4.9/307-mips_highmem_offset.patch
  64. 1 6
      target/linux/generic/pending-4.9/308-mips32r2_tune.patch
  65. 1 6
      target/linux/generic/pending-4.9/310-arm_module_unresolved_weak_sym.patch
  66. 4 13
      target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
  67. 2 9
      target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
  68. 0 7
      target/linux/generic/pending-4.9/403-mtd-hook-mtdsplit-to-Kbuild.patch
  69. 4 13
      target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
  70. 3 10
      target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch
  71. 1 6
      target/linux/generic/pending-4.9/412-mtd-partial_eraseblock_unlock.patch
  72. 1 6
      target/linux/generic/pending-4.9/420-mtd-redboot_space.patch
  73. 0 7
      target/linux/generic/pending-4.9/430-mtd-add-myloader-partition-parser.patch
  74. 9 14
      target/linux/generic/pending-4.9/440-block2mtd_init.patch
  75. 4 9
      target/linux/generic/pending-4.9/441-block2mtd_probe.patch
  76. 1 6
      target/linux/generic/pending-4.9/460-mtd-cfi_cmdset_0002-no-erase_suspend.patch
  77. 1 6
      target/linux/generic/pending-4.9/465-m25p80-mx-disable-software-protection.patch
  78. 1 6
      target/linux/generic/pending-4.9/476-mtd-spi-nor-add-eon-en25q128.patch
  79. 1 6
      target/linux/generic/pending-4.9/477-mtd-add-spi-nor-add-mx25u3235f.patch
  80. 0 5
      target/linux/generic/pending-4.9/480-mtd-set-rootfs-to-be-root-dev.patch
  81. 1 8
      target/linux/generic/pending-4.9/494-mtd-ubi-add-EOF-marker-support.patch
  82. 1 53
      target/linux/generic/pending-4.9/530-jffs2_make_lzma_available.patch
  83. 3 10
      target/linux/generic/pending-4.9/532-jffs2_eofdetect.patch
  84. 1 6
      target/linux/generic/pending-4.9/551-ubifs-fix-default-compression-selection.patch
  85. 2 7
      target/linux/generic/pending-4.9/600-netfilter_conntrack_flush.patch
  86. 6 13
      target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
  87. 1 6
      target/linux/generic/pending-4.9/611-netfilter_match_bypass_default_table.patch
  88. 0 5
      target/linux/generic/pending-4.9/612-netfilter_match_reduce_memory_access.patch
  89. 2 7
      target/linux/generic/pending-4.9/613-netfilter_optional_tcp_window_check.patch
  90. 1 6
      target/linux/generic/pending-4.9/616-net_optimize_xfrm_calls.patch
  91. 8 17
      target/linux/generic/pending-4.9/630-packet_socket_type.patch
  92. 2 7
      target/linux/generic/pending-4.9/650-pppoe_header_pad.patch
  93. 1 6
      target/linux/generic/pending-4.9/655-increase_skb_pad.patch
  94. 11 11
      target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
  95. 7 7
      target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
  96. 6 17
      target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
  97. 2 9
      target/linux/generic/pending-4.9/701-phy_extension.patch
  98. 2 9
      target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch
  99. 10 21
      target/linux/generic/pending-4.9/704-phy-no-genphy-soft-reset.patch
  100. 4 12
      target/linux/generic/pending-4.9/734-net-phy-at803x-allow-to-configure-via-pdata.patch

+ 2 - 2
include/kernel-version.mk

@@ -4,11 +4,11 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
 LINUX_VERSION-4.4 = .79
-LINUX_VERSION-4.9 = .40
+LINUX_VERSION-4.9 = .44
 
 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
 LINUX_KERNEL_HASH-4.4.79 = 0dbda3b51e11957fdb96c46844a823a212d46d6db680d77422ddea1a65bebca8
-LINUX_KERNEL_HASH-4.9.40 = 025767f3652a656c7b5ed2949aef205f88a5acfd70ae3fe77710ad37f1662d9b
+LINUX_KERNEL_HASH-4.9.44 = 44a6386150d843da8fe13363377972ab040cc710268033ac99f599d5ba8ce3a3
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))

+ 0 - 25
target/linux/brcm2708/patches-4.9/950-0005-mm-Remove-the-PFN-busy-warning.patch

@@ -1,25 +0,0 @@
-From 55d0c167f73b9583357fc0af36d7a01666885e0e Mon Sep 17 00:00:00 2001
-From: Eric Anholt <[email protected]>
-Date: Thu, 18 Dec 2014 16:07:15 -0800
-Subject: [PATCH] mm: Remove the PFN busy warning
-
-See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is
-expected sometimes when using CMA.  However, that commit still spams
-my kernel log with these warnings.
-
-Signed-off-by: Eric Anholt <[email protected]>
----
- mm/page_alloc.c | 2 --
- 1 file changed, 2 deletions(-)
-
---- a/mm/page_alloc.c
-+++ b/mm/page_alloc.c
-@@ -7335,8 +7335,6 @@ int alloc_contig_range(unsigned long sta
- 
- 	/* Make sure the range is really isolated. */
- 	if (test_pages_isolated(outer_start, end, false)) {
--		pr_info("%s: [%lx, %lx) PFNs busy\n",
--			__func__, outer_start, end);
- 		ret = -EBUSY;
- 		goto done;
- 	}

+ 1 - 1
target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch

@@ -696,7 +696,7 @@ Signed-off-by: Noralf Trønnes <[email protected]>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5040,7 +5040,7 @@ static void port_event(struct usb_hub *h
+@@ -5042,7 +5042,7 @@ static void port_event(struct usb_hub *h
  	if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
  		u16 status = 0, unused;
  

+ 1 - 1
target/linux/brcm2708/patches-4.9/950-0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch

@@ -19,7 +19,7 @@ Subject: [PATCH] config: Enable CONFIG_MEMCG, but leave it disabled (due to
  
  /**
   * cgroup_init - cgroup initialization
-@@ -6169,6 +6169,28 @@ static int __init cgroup_no_v1(char *str
+@@ -6173,6 +6173,28 @@ static int __init cgroup_no_v1(char *str
  }
  __setup("cgroup_no_v1=", cgroup_no_v1);
  

+ 0 - 5
target/linux/generic/backport-4.9/010-Kbuild-don-t-hardcode-path-to-awk-in-scripts-ld-vers.patch

@@ -12,8 +12,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  scripts/ld-version.sh | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
-index d135882e2c40..66e6e5ed1b7b 100755
 --- a/scripts/ld-version.sh
 +++ b/scripts/ld-version.sh
 @@ -1,5 +1,6 @@
@@ -29,6 +27,3 @@ index d135882e2c40..66e6e5ed1b7b 100755
  	exit
  	}
 +'
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/backport-4.9/011-kbuild-export-SUBARCH.patch

@@ -8,11 +8,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index dd0a67d6e392..6e37f6bb669a 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -420,8 +420,8 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
+@@ -414,8 +414,8 @@ KERNELRELEASE = $(shell cat include/conf
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
  
  export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
@@ -23,6 +21,3 @@ index dd0a67d6e392..6e37f6bb669a 100644
  export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
  export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
  
--- 
-2.11.0
-

+ 1 - 16
target/linux/generic/backport-4.9/020-backport_netfilter_rtcache.patch

@@ -35,8 +35,6 @@ Signed-off-by: Florian Westphal <[email protected]>
  create mode 100644 include/net/netfilter/nf_conntrack_rtcache.h
  create mode 100644 net/netfilter/nf_conntrack_rtcache.c
 
-diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
-index 1c3035dda31f..0988c7dfa604 100644
 --- a/include/net/netfilter/nf_conntrack_extend.h
 +++ b/include/net/netfilter/nf_conntrack_extend.h
 @@ -27,6 +27,9 @@ enum nf_ct_ext_id {
@@ -57,9 +55,6 @@ index 1c3035dda31f..0988c7dfa604 100644
  
  /* Extensions: optional stuff which isn't permanently in struct. */
  struct nf_ct_ext {
-diff --git a/include/net/netfilter/nf_conntrack_rtcache.h b/include/net/netfilter/nf_conntrack_rtcache.h
-new file mode 100644
-index 000000000000..e2fb30243354
 --- /dev/null
 +++ b/include/net/netfilter/nf_conntrack_rtcache.h
 @@ -0,0 +1,34 @@
@@ -97,8 +92,6 @@ index 000000000000..e2fb30243354
 +{
 +	return rtc->cached_dst[dir].iif;
 +}
-diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
-index e8d56d9a4df2..82af5ba64088 100644
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
 @@ -114,6 +114,18 @@ config NF_CONNTRACK_EVENTS
@@ -120,11 +113,9 @@ index e8d56d9a4df2..82af5ba64088 100644
  config NF_CONNTRACK_TIMEOUT
  	bool  'Connection tracking timeout'
  	depends on NETFILTER_ADVANCED
-diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
-index c23c3c84416f..8adef51367f9 100644
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -16,6 +16,9 @@ obj-$(CONFIG_NETFILTER_NETLINK_LOG) += nfnetlink_log.o
+@@ -16,6 +16,9 @@ obj-$(CONFIG_NETFILTER_NETLINK_LOG) += n
  # connection tracking
  obj-$(CONFIG_NF_CONNTRACK) += nf_conntrack.o
  
@@ -134,9 +125,6 @@ index c23c3c84416f..8adef51367f9 100644
  # SCTP protocol connection tracking
  obj-$(CONFIG_NF_CT_PROTO_DCCP) += nf_conntrack_proto_dccp.o
  obj-$(CONFIG_NF_CT_PROTO_GRE) += nf_conntrack_proto_gre.o
-diff --git a/net/netfilter/nf_conntrack_rtcache.c b/net/netfilter/nf_conntrack_rtcache.c
-new file mode 100644
-index 000000000000..fb073d01960d
 --- /dev/null
 +++ b/net/netfilter/nf_conntrack_rtcache.c
 @@ -0,0 +1,413 @@
@@ -553,6 +541,3 @@ index 000000000000..fb073d01960d
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("Florian Westphal <[email protected]>");
 +MODULE_DESCRIPTION("Conntrack route cache extension");
--- 
-2.11.0
-

+ 1 - 1
target/linux/generic/backport-4.9/021-bridge-multicast-to-unicast.patch

@@ -106,7 +106,7 @@ Signed-off-by: Linus Lüssing <[email protected]>
  		if (prev == port)
 --- a/net/bridge/br_mdb.c
 +++ b/net/bridge/br_mdb.c
-@@ -531,7 +531,7 @@ static int br_mdb_add_group(struct net_b
+@@ -532,7 +532,7 @@ static int br_mdb_add_group(struct net_b
  			break;
  	}
  

+ 2 - 2
target/linux/generic/backport-4.9/061-v4.10-0002-mtd-spi-nor-fix-spansion-quad-enable.patch

@@ -26,8 +26,8 @@ Signed-off-by: Cyrille Pitchen <[email protected]>
 
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1256,6 +1256,13 @@ static int spansion_quad_enable(struct s
- 		return -EINVAL;
+@@ -1263,6 +1263,13 @@ static int spansion_quad_enable(struct s
+ 		return ret;
  	}
  
 +	ret = spi_nor_wait_till_ready(nor);

+ 3 - 3
target/linux/generic/backport-4.9/062-v4.11-0001-mtd-spi-nor-Add-support-for-S3AN-spi-nor-devices.patch

@@ -206,7 +206,7 @@ Signed-off-by: Cyrille Pitchen <[email protected]>
  		if (ret < 0)
  			goto write_err;
  		written = ret;
-@@ -1312,6 +1401,47 @@ static int spi_nor_check(struct spi_nor
+@@ -1319,6 +1408,47 @@ static int spi_nor_check(struct spi_nor
  	return 0;
  }
  
@@ -254,7 +254,7 @@ Signed-off-by: Cyrille Pitchen <[email protected]>
  int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
  {
  	const struct flash_info *info = NULL;
-@@ -1360,6 +1490,14 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1367,6 +1497,14 @@ int spi_nor_scan(struct spi_nor *nor, co
  	mutex_init(&nor->lock);
  
  	/*
@@ -269,7 +269,7 @@ Signed-off-by: Cyrille Pitchen <[email protected]>
  	 * Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
  	 * with the software protection bits set
  	 */
-@@ -1517,6 +1655,12 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1524,6 +1662,12 @@ int spi_nor_scan(struct spi_nor *nor, co
  
  	nor->read_dummy = spi_nor_read_dummy_cycles(nor);
  

+ 1 - 1
target/linux/generic/backport-4.9/062-v4.11-0004-mtd-spi-nor-rename-SPINOR_OP_-macros-of-the-4-byte-a.patch

@@ -95,7 +95,7 @@ Acked-by: Marek Vasut <[email protected]>
  static struct seq_rw_config stfsm_s25fl_write4_configs[] = {
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1625,16 +1625,16 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1632,16 +1632,16 @@ int spi_nor_scan(struct spi_nor *nor, co
  			/* Dedicated 4-byte command set */
  			switch (nor->flash_read) {
  			case SPI_NOR_QUAD:

+ 1 - 1
target/linux/generic/backport-4.9/062-v4.11-0005-mtd-spi-nor-add-a-stateless-method-to-support-memory.patch

@@ -116,7 +116,7 @@ Acked-by: Marek Vasut <[email protected]>
  /* Enable/disable 4-byte addressing mode. */
  static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info,
  			    int enable)
-@@ -1621,27 +1697,10 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1628,27 +1704,10 @@ int spi_nor_scan(struct spi_nor *nor, co
  	else if (mtd->size > 0x1000000) {
  		/* enable 4-byte addressing if the device exceeds 16MiB */
  		nor->addr_width = 4;

+ 0 - 5
target/linux/generic/hack-4.9/202-reduce_module_size.patch

@@ -11,8 +11,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/Makefile b/Makefile
-index a40b373eba3a..984eb5907d00 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -407,7 +407,7 @@ KBUILD_CFLAGS_KERNEL :=
@@ -24,6 +22,3 @@ index a40b373eba3a..984eb5907d00 100644
  
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
--- 
-2.11.0
-

+ 10 - 23
target/linux/generic/hack-4.9/204-module_strip.patch

@@ -12,8 +12,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  scripts/mod/modpost.c       | 12 ++++++++++++
  5 files changed, 43 insertions(+), 9 deletions(-)
 
-diff --git a/include/linux/module.h b/include/linux/module.h
-index 0c3207d26ac0..08b58474bfd2 100644
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
 @@ -159,6 +159,7 @@ extern void cleanup_module(void);
@@ -40,7 +38,7 @@ index 0c3207d26ac0..08b58474bfd2 100644
  /* Creates an alias so file2alias.c can find device table. */
  #define MODULE_DEVICE_TABLE(type, name)					\
  extern const typeof(name) __mod_##type##__##name##_device_table		\
-@@ -234,7 +235,9 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
+@@ -234,7 +235,9 @@ extern const typeof(name) __mod_##type##
   */
  
  #if defined(MODULE) || !defined(CONFIG_SYSFS)
@@ -51,7 +49,7 @@ index 0c3207d26ac0..08b58474bfd2 100644
  #else
  #define MODULE_VERSION(_version)					\
  	static struct module_version_attribute ___modver_attr = {	\
-@@ -256,7 +259,7 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
+@@ -256,7 +259,7 @@ extern const typeof(name) __mod_##type##
  /* Optional firmware file (or files) needed by the module
   * format is simply firmware file name.  Multiple firmware
   * files require multiple MODULE_FIRMWARE() specifiers */
@@ -60,8 +58,6 @@ index 0c3207d26ac0..08b58474bfd2 100644
  
  struct notifier_block;
  
-diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
-index 52666d90ca94..f0db3592906a 100644
 --- a/include/linux/moduleparam.h
 +++ b/include/linux/moduleparam.h
 @@ -16,6 +16,16 @@
@@ -81,7 +77,7 @@ index 52666d90ca94..f0db3592906a 100644
  #ifdef MODULE
  #define __MODULE_INFO(tag, name, info)					  \
  static const char __UNIQUE_ID(name)[]					  \
-@@ -23,8 +33,7 @@ static const char __UNIQUE_ID(name)[]					  \
+@@ -23,8 +33,7 @@ static const char __UNIQUE_ID(name)[]
    = __stringify(tag) "=" info
  #else  /* !MODULE */
  /* This struct is here for syntactic coherency, it is not used */
@@ -91,7 +87,7 @@ index 52666d90ca94..f0db3592906a 100644
  #endif
  #define __MODULE_PARM_TYPE(name, _type)					  \
    __MODULE_INFO(parmtype, name##type, #name ":" _type)
-@@ -32,7 +41,7 @@ static const char __UNIQUE_ID(name)[]					  \
+@@ -32,7 +41,7 @@ static const char __UNIQUE_ID(name)[]
  /* One for each parameter, describing how to use it.  Some files do
     multiple of these per line, so can't just use MODULE_INFO. */
  #define MODULE_PARM_DESC(_parm, desc) \
@@ -100,11 +96,9 @@ index 52666d90ca94..f0db3592906a 100644
  
  struct kernel_param;
  
-diff --git a/init/Kconfig b/init/Kconfig
-index 34407f15e6d3..9f2c0cabbc97 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -2095,6 +2095,13 @@ config TRIM_UNUSED_KSYMS
+@@ -2115,6 +2115,13 @@ config TRIM_UNUSED_KSYMS
  
  	  If unsure, or if you need to build out-of-tree modules, say N.
  
@@ -118,11 +112,9 @@ index 34407f15e6d3..9f2c0cabbc97 100644
  endif # MODULES
  
  config MODULES_TREE_LOOKUP
-diff --git a/kernel/module.c b/kernel/module.c
-index 0e54d5bf0097..80b5ac4181c6 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -2945,9 +2945,11 @@ static struct module *setup_load_info(struct load_info *info, int flags)
+@@ -2945,9 +2945,11 @@ static struct module *setup_load_info(st
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -135,7 +127,7 @@ index 0e54d5bf0097..80b5ac4181c6 100644
  	if (flags & MODULE_INIT_IGNORE_VERMAGIC)
  		modmagic = NULL;
  
-@@ -2968,6 +2970,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
+@@ -2968,6 +2970,7 @@ static int check_modinfo(struct module *
  				mod->name);
  		add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
  	}
@@ -143,8 +135,6 @@ index 0e54d5bf0097..80b5ac4181c6 100644
  
  	if (get_modinfo(info, "staging")) {
  		add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK);
-diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
-index bd8349759095..80f214adbe44 100644
 --- a/scripts/mod/modpost.c
 +++ b/scripts/mod/modpost.c
 @@ -1964,7 +1964,9 @@ static void read_symbols(char *modname)
@@ -157,7 +147,7 @@ index bd8349759095..80f214adbe44 100644
  	}
  	if (!is_vmlinux(modname) ||
  	     (is_vmlinux(modname) && vmlinux_section_warnings))
-@@ -2108,7 +2110,9 @@ static void add_header(struct buffer *b, struct module *mod)
+@@ -2108,7 +2110,9 @@ static void add_header(struct buffer *b,
  	buf_printf(b, "#include <linux/vermagic.h>\n");
  	buf_printf(b, "#include <linux/compiler.h>\n");
  	buf_printf(b, "\n");
@@ -167,7 +157,7 @@ index bd8349759095..80f214adbe44 100644
  	buf_printf(b, "\n");
  	buf_printf(b, "__visible struct module __this_module\n");
  	buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
-@@ -2125,16 +2129,20 @@ static void add_header(struct buffer *b, struct module *mod)
+@@ -2125,16 +2129,20 @@ static void add_header(struct buffer *b,
  
  static void add_intree_flag(struct buffer *b, int is_intree)
  {
@@ -188,7 +178,7 @@ index bd8349759095..80f214adbe44 100644
  }
  
  /* In kernel, this size is defined in linux/module.h;
-@@ -2238,11 +2246,13 @@ static void add_depends(struct buffer *b, struct module *mod,
+@@ -2238,11 +2246,13 @@ static void add_depends(struct buffer *b
  
  static void add_srcversion(struct buffer *b, struct module *mod)
  {
@@ -212,6 +202,3 @@ index bd8349759095..80f214adbe44 100644
  		add_srcversion(&buf, mod);
  
  		sprintf(fname, "%s.mod.c", mod->name);
--- 
-2.11.0
-

+ 2 - 9
target/linux/generic/hack-4.9/207-disable-modorder.patch

@@ -13,11 +13,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  scripts/Makefile.build | 2 +-
  2 files changed, 1 insertion(+), 3 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 984eb5907d00..cce1c68e48ae 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -1193,7 +1193,6 @@ all: modules
+@@ -1196,7 +1196,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -25,7 +23,7 @@ index 984eb5907d00..cce1c68e48ae 100644
  	@$(kecho) '  Building modules, stage 2.';
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
-@@ -1223,7 +1222,6 @@ _modinst_:
+@@ -1226,7 +1225,6 @@ _modinst_:
  		rm -f $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  	fi
@@ -33,8 +31,6 @@ index 984eb5907d00..cce1c68e48ae 100644
  	@cp -f $(objtree)/modules.builtin $(MODLIB)/
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
  
-diff --git a/scripts/Makefile.build b/scripts/Makefile.build
-index 7675d11ee65e..108d73273788 100644
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
 @@ -93,7 +93,7 @@ modorder-target := $(obj)/modules.order
@@ -46,6 +42,3 @@ index 7675d11ee65e..108d73273788 100644
  	 $(subdir-ym) $(always)
  	@:
  
--- 
-2.11.0
-

+ 1 - 13
target/linux/generic/hack-4.9/210-darwin_scripts_include.patch

@@ -13,11 +13,9 @@ Signed-off-by: Florian Fainelli <[email protected]>
  4 files changed, 3018 insertions(+)
  create mode 100644 scripts/mod/elf.h
 
-diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
-index 90a091b6ae4d..f9620652e70a 100644
 --- a/scripts/kconfig/Makefile
 +++ b/scripts/kconfig/Makefile
-@@ -163,6 +163,9 @@ check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
+@@ -163,6 +163,9 @@ check-lxdialog  := $(srctree)/$(src)/lxd
  # we really need to do so. (Do not call gcc as part of make mrproper)
  HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
                      -DLOCALE
@@ -27,9 +25,6 @@ index 90a091b6ae4d..f9620652e70a 100644
  
  # ===========================================================================
  # Shared Makefile for the various kconfig executables:
-diff --git a/scripts/mod/elf.h b/scripts/mod/elf.h
-new file mode 100644
-index 000000000000..036a176345eb
 --- /dev/null
 +++ b/scripts/mod/elf.h
 @@ -0,0 +1,3007 @@
@@ -3040,8 +3035,6 @@ index 000000000000..036a176345eb
 +#define R_TILEGX_NUM		130
 +
 +#endif	/* elf.h */
-diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c
-index a4fd71d71d65..5ec3740ebb3c 100644
 --- a/scripts/mod/mk_elfconfig.c
 +++ b/scripts/mod/mk_elfconfig.c
 @@ -1,7 +1,11 @@
@@ -3056,8 +3049,6 @@ index a4fd71d71d65..5ec3740ebb3c 100644
  
  int
  main(int argc, char **argv)
-diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
-index 6a5e1515123b..237c50d2ec6c 100644
 --- a/scripts/mod/modpost.h
 +++ b/scripts/mod/modpost.h
 @@ -7,7 +7,11 @@
@@ -3072,6 +3063,3 @@ index 6a5e1515123b..237c50d2ec6c 100644
  
  #include "elfconfig.h"
  
--- 
-2.11.0
-

+ 1 - 10
target/linux/generic/hack-4.9/211-host_tools_portability.patch

@@ -10,18 +10,14 @@ Signed-off-by: Felix Fietkau <[email protected]>
  tools/perf/pmu-events/json.c    | 1 -
  3 files changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/tools/build/Build.include b/tools/build/Build.include
-index 1dcb95e76f70..9d6f97a7c1aa 100644
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -95,4 +95,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAG
+@@ -95,4 +95,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(
  ###
  ## HOSTCC C flags
  
 -host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
 +host_c_flags = -MD -MF $(depfile) -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
-diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
-index 41611d7f9873..51333bee190c 100644
 --- a/tools/perf/pmu-events/jevents.c
 +++ b/tools/perf/pmu-events/jevents.c
 @@ -35,6 +35,7 @@
@@ -32,8 +28,6 @@ index 41611d7f9873..51333bee190c 100644
  #include <ctype.h>
  #include <unistd.h>
  #include <stdarg.h>
-diff --git a/tools/perf/pmu-events/json.c b/tools/perf/pmu-events/json.c
-index f67bbb0aa36e..a72c70a97fab 100644
 --- a/tools/perf/pmu-events/json.c
 +++ b/tools/perf/pmu-events/json.c
 @@ -38,7 +38,6 @@
@@ -44,6 +38,3 @@ index f67bbb0aa36e..a72c70a97fab 100644
  
  
  static char *mapfile(const char *fn, size_t *size)
--- 
-2.11.0
-

+ 0 - 10
target/linux/generic/hack-4.9/212-byteshift_portability.patch

@@ -12,8 +12,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  3 files changed, 30 insertions(+)
  create mode 100644 tools/include/tools/linux_types.h
 
-diff --git a/tools/include/tools/be_byteshift.h b/tools/include/tools/be_byteshift.h
-index 84c17d836578..ed9932e97bd4 100644
 --- a/tools/include/tools/be_byteshift.h
 +++ b/tools/include/tools/be_byteshift.h
 @@ -1,6 +1,10 @@
@@ -27,8 +25,6 @@ index 84c17d836578..ed9932e97bd4 100644
  #include <stdint.h>
  
  static inline uint16_t __get_unaligned_be16(const uint8_t *p)
-diff --git a/tools/include/tools/le_byteshift.h b/tools/include/tools/le_byteshift.h
-index 8fe9f2488ec7..2e387b5226d9 100644
 --- a/tools/include/tools/le_byteshift.h
 +++ b/tools/include/tools/le_byteshift.h
 @@ -1,6 +1,10 @@
@@ -42,9 +38,6 @@ index 8fe9f2488ec7..2e387b5226d9 100644
  #include <stdint.h>
  
  static inline uint16_t __get_unaligned_le16(const uint8_t *p)
-diff --git a/tools/include/tools/linux_types.h b/tools/include/tools/linux_types.h
-new file mode 100644
-index 000000000000..f07ef8293ebc
 --- /dev/null
 +++ b/tools/include/tools/linux_types.h
 @@ -0,0 +1,22 @@
@@ -70,6 +63,3 @@ index 000000000000..f07ef8293ebc
 +typedef uint64_t __le64;
 +
 +#endif
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/hack-4.9/214-spidev_h_portability.patch

@@ -11,8 +11,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  include/uapi/linux/spi/spidev.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
-index dd5f21e75805..e5e8fea8b068 100644
 --- a/include/uapi/linux/spi/spidev.h
 +++ b/include/uapi/linux/spi/spidev.h
 @@ -111,7 +111,7 @@ struct spi_ioc_transfer {
@@ -24,6 +22,3 @@ index dd5f21e75805..e5e8fea8b068 100644
  		? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
  #define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
  
--- 
-2.11.0
-

+ 4 - 21
target/linux/generic/hack-4.9/220-gc_sections.patch

@@ -19,11 +19,9 @@ Signed-off-by: Gabor Juhos <[email protected]>
  include/asm-generic/vmlinux.lds.h | 63 ++++++++++++++++++++-------------------
  7 files changed, 55 insertions(+), 51 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 42435dfa5fc3..66cdf6a59b53 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -410,6 +410,11 @@ KBUILD_AFLAGS_MODULE  := -DMODULE
+@@ -409,6 +409,11 @@ KBUILD_AFLAGS_MODULE  := -DMODULE
  KBUILD_CFLAGS_MODULE  := -DMODULE
  KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
  
@@ -35,9 +33,9 @@ index 42435dfa5fc3..66cdf6a59b53 100644
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -631,11 +636,6 @@ include arch/$(SRCARCH)/Makefile
- KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
- KBUILD_CFLAGS	+= $(call cc-disable-warning,frame-address,)
+@@ -633,11 +638,6 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
+ KBUILD_CFLAGS	+= $(call cc-disable-warning, format-overflow)
+ KBUILD_CFLAGS	+= $(call cc-disable-warning, int-in-bool-context)
  
 -ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
 -KBUILD_CFLAGS	+= $(call cc-option,-ffunction-sections,)
@@ -47,8 +45,6 @@ index 42435dfa5fc3..66cdf6a59b53 100644
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
  else
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index b5d529fdffab..7f69418bf02c 100644
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
 @@ -81,6 +81,7 @@ config ARM
@@ -59,8 +55,6 @@ index b5d529fdffab..7f69418bf02c 100644
  	select MODULES_USE_ELF_REL
  	select NO_BOOTMEM
  	select OF_EARLY_FLATTREE if OF
-diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
-index d50430c40045..6bdeb009a46d 100644
 --- a/arch/arm/boot/compressed/Makefile
 +++ b/arch/arm/boot/compressed/Makefile
 @@ -102,6 +102,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
@@ -71,8 +65,6 @@ index d50430c40045..6bdeb009a46d 100644
  
  # -fstack-protector-strong triggers protection checks in this code,
  # but it is being used too early to link to meaningful stack_chk logic.
-diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
-index f7f55df0bf7b..e9d70c92d99f 100644
 --- a/arch/arm/kernel/vmlinux.lds.S
 +++ b/arch/arm/kernel/vmlinux.lds.S
 @@ -17,7 +17,7 @@
@@ -177,8 +169,6 @@ index f7f55df0bf7b..e9d70c92d99f 100644
  		__pv_table_end = .;
  	}
  	.init.data : {
-diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index 3a97487b8b81..05e7bfeab2f9 100644
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
 @@ -55,6 +55,7 @@ config MIPS
@@ -189,8 +179,6 @@ index 3a97487b8b81..05e7bfeab2f9 100644
  	select CPU_PM if CPU_IDLE
  	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
  	select ARCH_BINFMT_ELF_STATE
-diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
-index d5de67591735..de5f682b5597 100644
 --- a/arch/mips/kernel/vmlinux.lds.S
 +++ b/arch/mips/kernel/vmlinux.lds.S
 @@ -71,7 +71,7 @@ SECTIONS
@@ -211,8 +199,6 @@ index d5de67591735..de5f682b5597 100644
  		__mips_machines_end = .;
  	}
  
-diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
-index 31e1d639abed..83784d9492b1 100644
 --- a/include/asm-generic/vmlinux.lds.h
 +++ b/include/asm-generic/vmlinux.lds.h
 @@ -114,7 +114,7 @@
@@ -433,6 +419,3 @@ index 31e1d639abed..83784d9492b1 100644
  		VMLINUX_SYMBOL(__setup_end) = .;
  
  #define INIT_CALLS_LEVEL(level)						\
--- 
-2.11.0
-

+ 1 - 10
target/linux/generic/hack-4.9/221-module_exports.patch

@@ -11,8 +11,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  scripts/Makefile.build            |  2 +-
  3 files changed, 24 insertions(+), 5 deletions(-)
 
-diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
-index 83784d9492b1..189b5c7a0758 100644
 --- a/include/asm-generic/vmlinux.lds.h
 +++ b/include/asm-generic/vmlinux.lds.h
 @@ -54,6 +54,16 @@
@@ -67,8 +65,6 @@ index 83784d9492b1..189b5c7a0758 100644
  	*(.discard)							\
  	*(.discard.*)							\
  	}
-diff --git a/include/linux/export.h b/include/linux/export.h
-index 2a0f61fbc731..889331d9643d 100644
 --- a/include/linux/export.h
 +++ b/include/linux/export.h
 @@ -53,12 +53,19 @@ extern struct module __this_module;
@@ -92,11 +88,9 @@ index 2a0f61fbc731..889331d9643d 100644
  	= VMLINUX_SYMBOL_STR(sym);					\
  	static const struct kernel_symbol __ksymtab_##sym		\
  	__used								\
-diff --git a/scripts/Makefile.build b/scripts/Makefile.build
-index 108d73273788..76a0e450123c 100644
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
-@@ -398,7 +398,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
+@@ -398,7 +398,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
  # Linker scripts preprocessor (.lds.S -> .lds)
  # ---------------------------------------------------------------------------
  quiet_cmd_cpp_lds_S = LDS     $@
@@ -105,6 +99,3 @@ index 108d73273788..76a0e450123c 100644
  	                     -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
  
  $(obj)/%.lds: $(src)/%.lds.S FORCE
--- 
-2.11.0
-

+ 2 - 11
target/linux/generic/hack-4.9/230-openwrt_lzma_options.patch

@@ -11,11 +11,9 @@ Signed-off-by: Imre Kaloz <[email protected]>
  scripts/gen_initramfs_list.sh | 10 +++++-----
  3 files changed, 7 insertions(+), 6 deletions(-)
 
-diff --git a/lib/decompress.c b/lib/decompress.c
-index 62696dff5730..d91a26e1a1b2 100644
 --- a/lib/decompress.c
 +++ b/lib/decompress.c
-@@ -48,6 +48,7 @@ static const struct compress_format compressed_formats[] __initconst = {
+@@ -48,6 +48,7 @@ static const struct compress_format comp
  	{ {0x1f, 0x9e}, "gzip", gunzip },
  	{ {0x42, 0x5a}, "bzip2", bunzip2 },
  	{ {0x5d, 0x00}, "lzma", unlzma },
@@ -23,11 +21,9 @@ index 62696dff5730..d91a26e1a1b2 100644
  	{ {0xfd, 0x37}, "xz", unxz },
  	{ {0x89, 0x4c}, "lzo", unlzo },
  	{ {0x02, 0x21}, "lz4", unlz4 },
-diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
-index 0a07f9014944..5324c072c598 100644
 --- a/scripts/Makefile.lib
 +++ b/scripts/Makefile.lib
-@@ -344,7 +344,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
+@@ -344,7 +344,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
  
  quiet_cmd_lzma = LZMA    $@
  cmd_lzma = (cat $(filter-out FORCE,$^) | \
@@ -36,8 +32,6 @@ index 0a07f9014944..5324c072c598 100644
  	(rm -f $@ ; false)
  
  quiet_cmd_lzo = LZO     $@
-diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
-index 0055b07b03b6..7710113e6a72 100755
 --- a/scripts/gen_initramfs_list.sh
 +++ b/scripts/gen_initramfs_list.sh
 @@ -229,7 +229,7 @@ cpio_list=
@@ -75,6 +69,3 @@ index 0055b07b03b6..7710113e6a72 100755
  		|| (rm -f ${output_file} ; false)
  	fi
  	[ -z ${cpio_file} ] && rm ${cpio_tfile}
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/hack-4.9/250-netfilter_depends.patch

@@ -7,8 +7,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/netfilter/Kconfig | 2 --
  1 file changed, 2 deletions(-)
 
-diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
-index 82af5ba64088..65fe84db77ec 100644
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
 @@ -218,7 +218,6 @@ config NF_CONNTRACK_FTP
@@ -27,6 +25,3 @@ index 82af5ba64088..65fe84db77ec 100644
  	default m if NETFILTER_ADVANCED=n
  	---help---
  	  This option adds a `TCPMSS' target, which allows you to alter the
--- 
-2.11.0
-

+ 1 - 18
target/linux/generic/hack-4.9/251-sound_kconfig.patch

@@ -14,8 +14,6 @@ Signed-off-by: John Crispin <[email protected]>
  sound/core/Kconfig    |  4 ++--
  7 files changed, 25 insertions(+), 20 deletions(-)
 
-diff --git a/crypto/Kconfig b/crypto/Kconfig
-index 84d71482bf08..e3552d1c1b84 100644
 --- a/crypto/Kconfig
 +++ b/crypto/Kconfig
 @@ -32,7 +32,7 @@ config CRYPTO_FIPS
@@ -63,8 +61,6 @@ index 84d71482bf08..e3552d1c1b84 100644
  	select CRYPTO_RNG2
  	select CRYPTO_ALGAPI
  
-diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
-index b5c48a8d485f..6cb52081b9ef 100644
 --- a/drivers/bcma/Kconfig
 +++ b/drivers/bcma/Kconfig
 @@ -17,6 +17,7 @@ config BCMA
@@ -75,8 +71,6 @@ index b5c48a8d485f..6cb52081b9ef 100644
  
  config BCMA_HOST_PCI_POSSIBLE
  	bool
-diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
-index d8e4219c2324..a20c168cb7c2 100644
 --- a/drivers/ssb/Kconfig
 +++ b/drivers/ssb/Kconfig
 @@ -29,6 +29,7 @@ config SSB_SPROM
@@ -96,11 +90,9 @@ index d8e4219c2324..a20c168cb7c2 100644
  
  config SSB_PCMCIAHOST_POSSIBLE
  	bool
-diff --git a/lib/Kconfig b/lib/Kconfig
-index 260a80e313b9..d1b788fff727 100644
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
-@@ -334,16 +334,16 @@ config BCH_CONST_T
+@@ -340,16 +340,16 @@ config BCH_CONST_T
  # Textsearch support is select'ed if needed
  #
  config TEXTSEARCH
@@ -121,8 +113,6 @@ index 260a80e313b9..d1b788fff727 100644
  
  config BTREE
  	bool
-diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
-index e8d56d9a4df2..0fb924661988 100644
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
 @@ -10,7 +10,7 @@ config NETFILTER_INGRESS
@@ -134,8 +124,6 @@ index e8d56d9a4df2..0fb924661988 100644
  
  config NETFILTER_NETLINK_ACCT
  tristate "Netfilter NFACCT over NFNETLINK interface"
-diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
-index 6c606120abfe..bd299de9440c 100644
 --- a/net/wireless/Kconfig
 +++ b/net/wireless/Kconfig
 @@ -1,5 +1,5 @@
@@ -187,8 +175,6 @@ index 6c606120abfe..bd299de9440c 100644
  
  config LIB80211_DEBUG
  	bool "lib80211 debugging messages"
-diff --git a/sound/core/Kconfig b/sound/core/Kconfig
-index 9749f9e8b45c..9639a67e7e9b 100644
 --- a/sound/core/Kconfig
 +++ b/sound/core/Kconfig
 @@ -16,13 +16,13 @@ config SND_DMAENGINE_PCM
@@ -207,6 +193,3 @@ index 9749f9e8b45c..9639a67e7e9b 100644
  
  config SND_JACK
  	bool
--- 
-2.11.0
-

+ 0 - 11
target/linux/generic/hack-4.9/259-regmap_dynamic.patch

@@ -12,8 +12,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  include/linux/regmap.h       |  2 +-
  4 files changed, 22 insertions(+), 10 deletions(-)
 
-diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
-index 48b3fc1ee514..c4cb7592392b 100644
 --- a/drivers/base/regmap/Kconfig
 +++ b/drivers/base/regmap/Kconfig
 @@ -3,9 +3,8 @@
@@ -56,8 +54,6 @@ index 48b3fc1ee514..c4cb7592392b 100644
  config REGMAP_IRQ
 +	select REGMAP
  	bool
-diff --git a/drivers/base/regmap/Makefile b/drivers/base/regmap/Makefile
-index 6271ea9b758a..f23c58a050aa 100644
 --- a/drivers/base/regmap/Makefile
 +++ b/drivers/base/regmap/Makefile
 @@ -1,10 +1,14 @@
@@ -79,8 +75,6 @@ index 6271ea9b758a..f23c58a050aa 100644
  obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
  obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
  obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
-diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
-index ae63bb0875ea..2ac56b4f525e 100644
 --- a/drivers/base/regmap/regmap.c
 +++ b/drivers/base/regmap/regmap.c
 @@ -13,6 +13,7 @@
@@ -97,8 +91,6 @@ index ae63bb0875ea..2ac56b4f525e 100644
  postcore_initcall(regmap_initcall);
 +
 +MODULE_LICENSE("GPL");
-diff --git a/include/linux/regmap.h b/include/linux/regmap.h
-index f6673132431d..95c7db29448b 100644
 --- a/include/linux/regmap.h
 +++ b/include/linux/regmap.h
 @@ -135,7 +135,7 @@ struct reg_sequence {
@@ -110,6 +102,3 @@ index f6673132431d..95c7db29448b 100644
  
  enum regmap_endian {
  	/* Unspecified -> 0 -> Backwards compatible default */
--- 
-2.11.0
-

+ 1 - 8
target/linux/generic/hack-4.9/260-crypto_test_dependencies.patch

@@ -12,8 +12,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  crypto/algboss.c |  4 ++++
  2 files changed, 10 insertions(+), 7 deletions(-)
 
-diff --git a/crypto/Kconfig b/crypto/Kconfig
-index e3552d1c1b84..17be110ad162 100644
 --- a/crypto/Kconfig
 +++ b/crypto/Kconfig
 @@ -132,12 +132,12 @@ config CRYPTO_MANAGER
@@ -43,11 +41,9 @@ index e3552d1c1b84..17be110ad162 100644
  	help
  	  Disable run-time self tests that normally take place at
  	  algorithm registration.
-diff --git a/crypto/algboss.c b/crypto/algboss.c
-index 6e39d9c05b98..4bde25d62ec7 100644
 --- a/crypto/algboss.c
 +++ b/crypto/algboss.c
-@@ -248,12 +248,16 @@ static int cryptomgr_schedule_test(struct crypto_alg *alg)
+@@ -248,12 +248,16 @@ static int cryptomgr_schedule_test(struc
  	type = alg->cra_flags;
  
  	/* This piece of crap needs to disappear into per-type test hooks. */
@@ -64,6 +60,3 @@ index 6e39d9c05b98..4bde25d62ec7 100644
  
  	param->type = type;
  
--- 
-2.11.0
-

+ 0 - 11
target/linux/generic/hack-4.9/280-rfkill-stubs.patch

@@ -13,8 +13,6 @@ Signed-off-by: John Crispin <[email protected]>
  net/rfkill/Makefile    |  2 +-
  4 files changed, 12 insertions(+), 8 deletions(-)
 
-diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
-index e6a0031d1b1f..21cf4dab0b9a 100644
 --- a/include/linux/rfkill.h
 +++ b/include/linux/rfkill.h
 @@ -64,7 +64,7 @@ struct rfkill_ops {
@@ -26,8 +24,6 @@ index e6a0031d1b1f..21cf4dab0b9a 100644
  /**
   * rfkill_alloc - allocate rfkill structure
   * @name: name of the struct -- the string is not copied internally
-diff --git a/net/Makefile b/net/Makefile
-index 4cafaa2b4667..6566175e6c0a 100644
 --- a/net/Makefile
 +++ b/net/Makefile
 @@ -51,7 +51,7 @@ obj-$(CONFIG_MAC80211)		+= mac80211/
@@ -39,8 +35,6 @@ index 4cafaa2b4667..6566175e6c0a 100644
  obj-$(CONFIG_NET_9P)		+= 9p/
  obj-$(CONFIG_CAIF)		+= caif/
  ifneq ($(CONFIG_DCB),)
-diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig
-index 868f1ad0415a..159b6ebeacd8 100644
 --- a/net/rfkill/Kconfig
 +++ b/net/rfkill/Kconfig
 @@ -1,7 +1,11 @@
@@ -88,8 +82,6 @@ index 868f1ad0415a..159b6ebeacd8 100644
  	depends on GPIOLIB || COMPILE_TEST
  	default n
  	help
-diff --git a/net/rfkill/Makefile b/net/rfkill/Makefile
-index 311768783f4a..dbb01a8645af 100644
 --- a/net/rfkill/Makefile
 +++ b/net/rfkill/Makefile
 @@ -4,6 +4,6 @@
@@ -100,6 +92,3 @@ index 311768783f4a..dbb01a8645af 100644
 +obj-$(CONFIG_RFKILL_FULL)	+= rfkill.o
  obj-$(CONFIG_RFKILL_REGULATOR)	+= rfkill-regulator.o
  obj-$(CONFIG_RFKILL_GPIO)	+= rfkill-gpio.o
--- 
-2.11.0
-

+ 1 - 8
target/linux/generic/hack-4.9/301-mips_image_cmdline_hack.patch

@@ -8,11 +8,9 @@ Signed-off-by: Gabor Juhos <[email protected]>
  arch/mips/kernel/head.S | 6 ++++++
  2 files changed, 10 insertions(+)
 
-diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index 6a56d75f7e8b..03fbb7b46e7f 100644
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1149,6 +1149,10 @@ config SYNC_R4K
+@@ -1150,6 +1150,10 @@ config SYNC_R4K
  config MIPS_MACHINE
  	def_bool n
  
@@ -23,8 +21,6 @@ index 6a56d75f7e8b..03fbb7b46e7f 100644
  config NO_IOPORT_MAP
  	def_bool n
  
-diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
-index cf052204eb0a..f7327fae5473 100644
 --- a/arch/mips/kernel/head.S
 +++ b/arch/mips/kernel/head.S
 @@ -79,6 +79,12 @@ FEXPORT(__kernel_entry)
@@ -40,6 +36,3 @@ index cf052204eb0a..f7327fae5473 100644
  	__REF
  
  NESTED(kernel_entry, 16, sp)			# kernel entry point
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/hack-4.9/321-powerpc_crtsavres_prereq.patch

@@ -14,8 +14,6 @@ Signed-off-by: Alexandros C. Couloumbis <[email protected]>
  arch/powerpc/Makefile | 1 -
  1 file changed, 1 deletion(-)
 
-diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
-index 617dece67924..1146daa8e4c2 100644
 --- a/arch/powerpc/Makefile
 +++ b/arch/powerpc/Makefile
 @@ -179,7 +179,6 @@ else
@@ -26,6 +24,3 @@ index 617dece67924..1146daa8e4c2 100644
  
  ifeq ($(CONFIG_476FPE_ERR46),y)
  	KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
--- 
-2.11.0
-

+ 49 - 61
target/linux/generic/hack-4.9/531-debloat_lzma.patch

@@ -14,8 +14,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  lib/lzma/LzmaEnc.c           | 172 ++------------------------
  6 files changed, 42 insertions(+), 641 deletions(-)
 
-diff --git a/include/linux/lzma/LzFind.h b/include/linux/lzma/LzFind.h
-index 010c4b92ba33..6d4f8e239028 100644
 --- a/include/linux/lzma/LzFind.h
 +++ b/include/linux/lzma/LzFind.h
 @@ -55,11 +55,6 @@ typedef struct _CMatchFinder
@@ -30,7 +28,7 @@ index 010c4b92ba33..6d4f8e239028 100644
  void MatchFinder_Construct(CMatchFinder *p);
  
  /* Conditions:
-@@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
+@@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p,
      UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
      ISzAlloc *alloc);
  void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
@@ -56,8 +54,6 @@ index 010c4b92ba33..6d4f8e239028 100644
  #ifdef __cplusplus
  }
  #endif
-diff --git a/include/linux/lzma/LzmaDec.h b/include/linux/lzma/LzmaDec.h
-index bf7f084ba3dd..c90f95e9fbaf 100644
 --- a/include/linux/lzma/LzmaDec.h
 +++ b/include/linux/lzma/LzmaDec.h
 @@ -31,14 +31,6 @@ typedef struct _CLzmaProps
@@ -182,8 +178,6 @@ index bf7f084ba3dd..c90f95e9fbaf 100644
  /* ---------- One Call Interface ---------- */
  
  /* LzmaDecode
-diff --git a/include/linux/lzma/LzmaEnc.h b/include/linux/lzma/LzmaEnc.h
-index 200d60eb83cd..2986c0460be4 100644
 --- a/include/linux/lzma/LzmaEnc.h
 +++ b/include/linux/lzma/LzmaEnc.h
 @@ -31,9 +31,6 @@ typedef struct _CLzmaEncProps
@@ -196,7 +190,7 @@ index 200d60eb83cd..2986c0460be4 100644
  
  /* ---------- CLzmaEncHandle Interface ---------- */
  
-@@ -53,26 +50,9 @@ CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc);
+@@ -53,26 +50,9 @@ CLzmaEncHandle LzmaEnc_Create(ISzAlloc *
  void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig);
  SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
  SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size);
@@ -223,8 +217,6 @@ index 200d60eb83cd..2986c0460be4 100644
  #ifdef __cplusplus
  }
  #endif
-diff --git a/lib/lzma/LzFind.c b/lib/lzma/LzFind.c
-index e3ecb05420eb..86251ccedfda 100644
 --- a/lib/lzma/LzFind.c
 +++ b/lib/lzma/LzFind.c
 @@ -14,9 +14,15 @@
@@ -244,7 +236,7 @@ index e3ecb05420eb..86251ccedfda 100644
    {
      alloc->Free(alloc, p->bufferBase);
      p->bufferBase = 0;
-@@ -28,7 +34,7 @@ static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
+@@ -28,7 +34,7 @@ static void LzInWindow_Free(CMatchFinder
  static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc)
  {
    UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
@@ -253,7 +245,7 @@ index e3ecb05420eb..86251ccedfda 100644
    {
      p->blockSize = blockSize;
      return 1;
-@@ -42,12 +48,12 @@ static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *a
+@@ -42,12 +48,12 @@ static int LzInWindow_Create(CMatchFinde
    return (p->bufferBase != 0);
  }
  
@@ -270,7 +262,7 @@ index e3ecb05420eb..86251ccedfda 100644
  {
    p->posLimit -= subValue;
    p->pos -= subValue;
-@@ -58,7 +64,7 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
+@@ -58,7 +64,7 @@ static void MatchFinder_ReadBlock(CMatch
  {
    if (p->streamEndWasReached || p->result != SZ_OK)
      return;
@@ -279,7 +271,7 @@ index e3ecb05420eb..86251ccedfda 100644
    {
      UInt32 curSize = 0xFFFFFFFF - p->streamPos;
      if (curSize > p->directInputRem)
-@@ -89,7 +95,7 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
+@@ -89,7 +95,7 @@ static void MatchFinder_ReadBlock(CMatch
    }
  }
  
@@ -288,7 +280,7 @@ index e3ecb05420eb..86251ccedfda 100644
  {
    memmove(p->bufferBase,
      p->buffer - p->keepSizeBefore,
-@@ -97,22 +103,14 @@ void MatchFinder_MoveBlock(CMatchFinder *p)
+@@ -97,22 +103,14 @@ void MatchFinder_MoveBlock(CMatchFinder
    p->buffer = p->bufferBase + p->keepSizeBefore;
  }
  
@@ -313,7 +305,7 @@ index e3ecb05420eb..86251ccedfda 100644
  static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
  {
    if (MatchFinder_NeedMove(p))
-@@ -268,7 +266,7 @@ static void MatchFinder_SetLimits(CMatchFinder *p)
+@@ -268,7 +266,7 @@ static void MatchFinder_SetLimits(CMatch
    p->posLimit = p->pos + limit;
  }
  
@@ -322,7 +314,7 @@ index e3ecb05420eb..86251ccedfda 100644
  {
    UInt32 i;
    for (i = 0; i < p->hashSizeSum; i++)
-@@ -287,7 +285,7 @@ static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
+@@ -287,7 +285,7 @@ static UInt32 MatchFinder_GetSubValue(CM
    return (p->pos - p->historySize - 1) & kNormalizeMask;
  }
  
@@ -331,7 +323,7 @@ index e3ecb05420eb..86251ccedfda 100644
  {
    UInt32 i;
    for (i = 0; i < numItems; i++)
-@@ -319,38 +317,7 @@ static void MatchFinder_CheckLimits(CMatchFinder *p)
+@@ -319,38 +317,7 @@ static void MatchFinder_CheckLimits(CMat
    MatchFinder_SetLimits(p);
  }
  
@@ -371,7 +363,7 @@ index e3ecb05420eb..86251ccedfda 100644
      UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
      UInt32 *distances, UInt32 maxLen)
  {
-@@ -460,10 +427,10 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const
+@@ -460,10 +427,10 @@ static void SkipMatchesSpec(UInt32 lenLi
    p->buffer++; \
    if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
  
@@ -384,7 +376,7 @@ index e3ecb05420eb..86251ccedfda 100644
  #define GET_MATCHES_HEADER2(minLen, ret_op) \
    UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \
    lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
-@@ -479,62 +446,7 @@ static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
+@@ -479,62 +446,7 @@ static void MatchFinder_MovePos(CMatchFi
    distances + offset, maxLen) - distances); MOVE_POS_RET;
  
  #define SKIP_FOOTER \
@@ -448,7 +440,7 @@ index e3ecb05420eb..86251ccedfda 100644
  
  static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  {
-@@ -583,108 +495,6 @@ static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+@@ -583,108 +495,6 @@ static UInt32 Bt4_MatchFinder_GetMatches
    GET_MATCHES_FOOTER(offset, maxLen)
  }
  
@@ -557,7 +549,7 @@ index e3ecb05420eb..86251ccedfda 100644
  static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  {
    do
-@@ -701,61 +511,12 @@ static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+@@ -701,61 +511,12 @@ static void Bt4_MatchFinder_Skip(CMatchF
    while (--num != 0);
  }
  
@@ -621,11 +613,9 @@ index e3ecb05420eb..86251ccedfda 100644
 +  vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
 +  vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
  }
-diff --git a/lib/lzma/LzmaDec.c b/lib/lzma/LzmaDec.c
-index 2036761bf146..7666e3f82067 100644
 --- a/lib/lzma/LzmaDec.c
 +++ b/lib/lzma/LzmaDec.c
-@@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
+@@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p,
    p->needFlush = 0;
  }
  
@@ -634,7 +624,7 @@ index 2036761bf146..7666e3f82067 100644
  {
    p->needFlush = 1;
    p->remainLen = 0;
-@@ -698,7 +698,7 @@ void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
+@@ -698,7 +698,7 @@ void LzmaDec_InitDicAndState(CLzmaDec *p
      p->needInitState = 1;
  }
  
@@ -643,7 +633,7 @@ index 2036761bf146..7666e3f82067 100644
  {
    p->dicPos = 0;
    LzmaDec_InitDicAndState(p, True, True);
-@@ -716,7 +716,7 @@ static void LzmaDec_InitStateReal(CLzmaDec *p)
+@@ -716,7 +716,7 @@ static void LzmaDec_InitStateReal(CLzmaD
    p->needInitState = 0;
  }
  
@@ -652,7 +642,7 @@ index 2036761bf146..7666e3f82067 100644
      ELzmaFinishMode finishMode, ELzmaStatus *status)
  {
    SizeT inSize = *srcLen;
-@@ -837,65 +837,13 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *sr
+@@ -837,65 +837,13 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, Si
    return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA;
  }
  
@@ -720,26 +710,26 @@ index 2036761bf146..7666e3f82067 100644
  {
    UInt32 dicSize;
    Byte d;
-@@ -935,33 +883,11 @@ static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAl
+@@ -935,7 +883,7 @@ static SRes LzmaDec_AllocateProbs2(CLzma
    return SZ_OK;
  }
  
 -SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
--{
--  CLzmaProps propNew;
--  RINOK(LzmaProps_Decode(&propNew, props, propsSize));
--  RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
--  p->prop = propNew;
--  return SZ_OK;
--}
--
--SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
 +static SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
  {
    CLzmaProps propNew;
--  SizeT dicBufSize;
    RINOK(LzmaProps_Decode(&propNew, props, propsSize));
-   RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+@@ -943,28 +891,6 @@ SRes LzmaDec_AllocateProbs(CLzmaDec *p,
+   p->prop = propNew;
+   return SZ_OK;
+ }
+-
+-SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
+-{
+-  CLzmaProps propNew;
+-  SizeT dicBufSize;
+-  RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+-  RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
 -  dicBufSize = propNew.dicSize;
 -  if (p->dic == 0 || dicBufSize != p->dicBufSize)
 -  {
@@ -752,11 +742,12 @@ index 2036761bf146..7666e3f82067 100644
 -    }
 -  }
 -  p->dicBufSize = dicBufSize;
-   p->prop = propNew;
-   return SZ_OK;
- }
-diff --git a/lib/lzma/LzmaEnc.c b/lib/lzma/LzmaEnc.c
-index 6dadf00dfab2..943965647bad 100644
+-  p->prop = propNew;
+-  return SZ_OK;
+-}
+ 
+ SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+     const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
 --- a/lib/lzma/LzmaEnc.c
 +++ b/lib/lzma/LzmaEnc.c
 @@ -53,7 +53,7 @@ void LzmaEncProps_Init(CLzmaEncProps *p)
@@ -768,7 +759,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    int level = p->level;
    if (level < 0) level = 5;
-@@ -76,7 +76,7 @@ void LzmaEncProps_Normalize(CLzmaEncProps *p)
+@@ -76,7 +76,7 @@ void LzmaEncProps_Normalize(CLzmaEncProp
        #endif
  }
  
@@ -777,7 +768,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    CLzmaEncProps props = *props2;
    LzmaEncProps_Normalize(&props);
-@@ -93,7 +93,7 @@ UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
+@@ -93,7 +93,7 @@ UInt32 LzmaEncProps_GetDictSize(const CL
  
  #define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); }
  
@@ -854,7 +845,7 @@ index 6dadf00dfab2..943965647bad 100644
  SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
  {
    CLzmaEnc *p = (CLzmaEnc *)pp;
-@@ -600,7 +548,7 @@ static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol,
+@@ -600,7 +548,7 @@ static void LitEnc_EncodeMatched(CRangeE
    while (symbol < 0x10000);
  }
  
@@ -863,7 +854,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    UInt32 i;
    for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
-@@ -1676,7 +1624,7 @@ static void FillDistancesPrices(CLzmaEnc *p)
+@@ -1676,7 +1624,7 @@ static void FillDistancesPrices(CLzmaEnc
    p->matchPriceCount = 0;
  }
  
@@ -872,7 +863,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    RangeEnc_Construct(&p->rc);
    MatchFinder_Construct(&p->matchFinderBase);
-@@ -1709,7 +1657,7 @@ CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc)
+@@ -1709,7 +1657,7 @@ CLzmaEncHandle LzmaEnc_Create(ISzAlloc *
    return p;
  }
  
@@ -881,7 +872,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    alloc->Free(alloc, p->litProbs);
    alloc->Free(alloc, p->saveState.litProbs);
-@@ -1717,7 +1665,7 @@ void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
+@@ -1717,7 +1665,7 @@ void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAl
    p->saveState.litProbs = 0;
  }
  
@@ -890,7 +881,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    #ifndef _7ZIP_ST
    MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
-@@ -1947,7 +1895,7 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, I
+@@ -1947,7 +1895,7 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, U
    return SZ_OK;
  }
  
@@ -908,7 +899,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    if (!p->fastMode)
    {
-@@ -2037,26 +1985,6 @@ static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *a
+@@ -2037,26 +1985,6 @@ static SRes LzmaEnc_AllocAndInit(CLzmaEn
    return SZ_OK;
  }
  
@@ -935,7 +926,7 @@ index 6dadf00dfab2..943965647bad 100644
  static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
  {
    p->matchFinderBase.directInput = 1;
-@@ -2064,7 +1992,7 @@ static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
+@@ -2064,7 +1992,7 @@ static void LzmaEnc_SetInputBuf(CLzmaEnc
    p->matchFinderBase.directInputRem = srcLen;
  }
  
@@ -944,7 +935,7 @@ index 6dadf00dfab2..943965647bad 100644
      UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
  {
    CLzmaEnc *p = (CLzmaEnc *)pp;
-@@ -2074,7 +2002,7 @@ SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
+@@ -2074,7 +2002,7 @@ SRes LzmaEnc_MemPrepare(CLzmaEncHandle p
    return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
  }
  
@@ -953,7 +944,7 @@ index 6dadf00dfab2..943965647bad 100644
  {
    #ifndef _7ZIP_ST
    CLzmaEnc *p = (CLzmaEnc *)pp;
-@@ -2107,53 +2035,6 @@ static size_t MyWrite(void *pp, const void *data, size_t size)
+@@ -2107,53 +2035,6 @@ static size_t MyWrite(void *pp, const vo
    return size;
  }
  
@@ -1007,7 +998,7 @@ index 6dadf00dfab2..943965647bad 100644
  static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
  {
    SRes res = SZ_OK;
-@@ -2184,13 +2065,6 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
+@@ -2184,13 +2065,6 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p,
    return res;
  }
  
@@ -1021,7 +1012,7 @@ index 6dadf00dfab2..943965647bad 100644
  SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
  {
    CLzmaEnc *p = (CLzmaEnc *)pp;
-@@ -2247,25 +2121,3 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte
+@@ -2247,25 +2121,3 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp
      return SZ_ERROR_OUTPUT_EOF;
    return res;
  }
@@ -1047,6 +1038,3 @@ index 6dadf00dfab2..943965647bad 100644
 -  LzmaEnc_Destroy(p, alloc, allocBig);
 -  return res;
 -}
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/hack-4.9/640-bridge-only-accept-EAP-locally.patch

@@ -11,11 +11,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/bridge/br_input.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
-diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
-index 267b46af407f..48fa08f32c2a 100644
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -164,11 +164,14 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
+@@ -164,11 +164,14 @@ int br_handle_frame_finish(struct net *n
  		}
  	}
  
@@ -32,6 +30,3 @@ index 267b46af407f..48fa08f32c2a 100644
  	if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
  		br_do_proxy_arp(skb, br, vid, p);
  
--- 
-2.11.0
-

+ 8 - 16
target/linux/generic/hack-4.9/641-bridge_port_isolate.patch

@@ -13,10 +13,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/bridge/br_sysfs_if.c  | 2 ++
  4 files changed, 11 insertions(+)
 
-Index: linux-4.9.34/include/linux/if_bridge.h
-===================================================================
---- linux-4.9.34.orig/include/linux/if_bridge.h
-+++ linux-4.9.34/include/linux/if_bridge.h
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
 @@ -47,6 +47,7 @@ struct br_ip_list {
  #define BR_PROXYARP_WIFI	BIT(10)
  #define BR_MCAST_FLOOD		BIT(11)
@@ -25,10 +23,8 @@ Index: linux-4.9.34/include/linux/if_bridge.h
  
  #define BR_DEFAULT_AGEING_TIME	(300 * HZ)
  
-Index: linux-4.9.34/net/bridge/br_forward.c
-===================================================================
---- linux-4.9.34.orig/net/bridge/br_forward.c
-+++ linux-4.9.34/net/bridge/br_forward.c
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
 @@ -141,6 +141,9 @@ static int deliver_clone(const struct ne
  void br_forward(const struct net_bridge_port *to,
  		struct sk_buff *skb, bool local_rcv, bool local_orig)
@@ -48,10 +44,8 @@ Index: linux-4.9.34/net/bridge/br_forward.c
  		/* Do not flood unicast traffic to ports that turn it off */
  		if (pkt_type == BR_PKT_UNICAST && !(p->flags & BR_FLOOD))
  			continue;
-Index: linux-4.9.34/net/bridge/br_input.c
-===================================================================
---- linux-4.9.34.orig/net/bridge/br_input.c
-+++ linux-4.9.34/net/bridge/br_input.c
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
 @@ -175,6 +175,9 @@ int br_handle_frame_finish(struct net *n
  	if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
  		br_do_proxy_arp(skb, br, vid, p);
@@ -62,10 +56,8 @@ Index: linux-4.9.34/net/bridge/br_input.c
  	switch (pkt_type) {
  	case BR_PKT_MULTICAST:
  		mdst = br_mdb_get(br, skb, vid);
-Index: linux-4.9.34/net/bridge/br_sysfs_if.c
-===================================================================
---- linux-4.9.34.orig/net/bridge/br_sysfs_if.c
-+++ linux-4.9.34/net/bridge/br_sysfs_if.c
+--- a/net/bridge/br_sysfs_if.c
++++ b/net/bridge/br_sysfs_if.c
 @@ -172,6 +172,7 @@ BRPORT_ATTR_FLAG(unicast_flood, BR_FLOOD
  BRPORT_ATTR_FLAG(proxyarp, BR_PROXYARP);
  BRPORT_ATTR_FLAG(proxyarp_wifi, BR_PROXYARP_WIFI);

+ 1 - 6
target/linux/generic/hack-4.9/651-wireless_mesh_header.patch

@@ -9,11 +9,9 @@ Signed-off-by: Imre Kaloz <[email protected]>
  include/linux/netdevice.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index 780e7171f548..6e0f2c79f79a 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -137,8 +137,8 @@ static inline bool dev_xmit_complete(int rc)
+@@ -137,8 +137,8 @@ static inline bool dev_xmit_complete(int
  
  #if defined(CONFIG_HYPERV_NET)
  # define LL_MAX_HEADER 128
@@ -24,6 +22,3 @@ index 780e7171f548..6e0f2c79f79a 100644
  #  define LL_MAX_HEADER 128
  # else
  #  define LL_MAX_HEADER 96
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/hack-4.9/660-fq_codel_defaults.patch

@@ -8,11 +8,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/sched/sch_fq_codel.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
-index a5ea0e9b6be4..4467b95795bf 100644
 --- a/net/sched/sch_fq_codel.c
 +++ b/net/sched/sch_fq_codel.c
-@@ -479,7 +479,7 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt)
+@@ -479,7 +479,7 @@ static int fq_codel_init(struct Qdisc *s
  
  	sch->limit = 10*1024;
  	q->flows_cnt = 1024;
@@ -21,6 +19,3 @@ index a5ea0e9b6be4..4467b95795bf 100644
  	q->drop_batch_size = 64;
  	q->quantum = psched_mtu(qdisc_dev(sch));
  	q->perturbation = prandom_u32();
--- 
-2.11.0
-

+ 4 - 17
target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch

@@ -12,8 +12,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/sched/sch_generic.c   | 4 ++--
  5 files changed, 9 insertions(+), 6 deletions(-)
 
-diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
-index e6aa0a249672..9eeb368d7eea 100644
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
 @@ -339,12 +339,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
@@ -31,8 +29,6 @@ index e6aa0a249672..9eeb368d7eea 100644
  }
  
  struct Qdisc_class_common {
-diff --git a/net/sched/Kconfig b/net/sched/Kconfig
-index 87956a768d1b..89c6db93cb63 100644
 --- a/net/sched/Kconfig
 +++ b/net/sched/Kconfig
 @@ -3,8 +3,9 @@
@@ -46,11 +42,9 @@ index 87956a768d1b..89c6db93cb63 100644
  	---help---
  	  When the kernel has several packets to send out over a network
  	  device, it has to decide which ones to send first, which ones to
-diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
-index 206dc24add3a..9b5cfb6ac64b 100644
 --- a/net/sched/sch_api.c
 +++ b/net/sched/sch_api.c
-@@ -1976,7 +1976,7 @@ static int __init pktsched_init(void)
+@@ -1979,7 +1979,7 @@ static int __init pktsched_init(void)
  		return err;
  	}
  
@@ -59,11 +53,9 @@ index 206dc24add3a..9b5cfb6ac64b 100644
  	register_qdisc(&pfifo_qdisc_ops);
  	register_qdisc(&bfifo_qdisc_ops);
  	register_qdisc(&pfifo_head_drop_qdisc_ops);
-diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
-index 4467b95795bf..2ebbf50658e5 100644
 --- a/net/sched/sch_fq_codel.c
 +++ b/net/sched/sch_fq_codel.c
-@@ -705,7 +705,7 @@ static const struct Qdisc_class_ops fq_codel_class_ops = {
+@@ -705,7 +705,7 @@ static const struct Qdisc_class_ops fq_c
  	.walk		=	fq_codel_walk,
  };
  
@@ -72,7 +64,7 @@ index 4467b95795bf..2ebbf50658e5 100644
  	.cl_ops		=	&fq_codel_class_ops,
  	.id		=	"fq_codel",
  	.priv_size	=	sizeof(struct fq_codel_sched_data),
-@@ -720,6 +720,7 @@ static struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = {
+@@ -720,6 +720,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
  	.dump_stats =	fq_codel_dump_stats,
  	.owner		=	THIS_MODULE,
  };
@@ -80,8 +72,6 @@ index 4467b95795bf..2ebbf50658e5 100644
  
  static int __init fq_codel_module_init(void)
  {
-diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
-index 6cfb6e9038c2..97de97e3c5e2 100644
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
 @@ -31,7 +31,7 @@
@@ -93,7 +83,7 @@ index 6cfb6e9038c2..97de97e3c5e2 100644
  EXPORT_SYMBOL(default_qdisc_ops);
  
  /* Main transmission queue. */
-@@ -759,7 +759,7 @@ static void attach_one_default_qdisc(struct net_device *dev,
+@@ -759,7 +759,7 @@ static void attach_one_default_qdisc(str
  				     void *_unused)
  {
  	struct Qdisc *qdisc;
@@ -102,6 +92,3 @@ index 6cfb6e9038c2..97de97e3c5e2 100644
  
  	if (dev->priv_flags & IFF_NO_QUEUE)
  		ops = &noqueue_qdisc_ops;
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/hack-4.9/662-remove_pfifo_fast.patch

@@ -8,11 +8,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/sched/sch_generic.c | 140 ------------------------------------------------
  1 file changed, 140 deletions(-)
 
-diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
-index 97de97e3c5e2..a62de9e4e897 100644
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
-@@ -449,146 +449,6 @@ struct Qdisc_ops noqueue_qdisc_ops __read_mostly = {
+@@ -449,146 +449,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
  	.owner		=	THIS_MODULE,
  };
  
@@ -159,6 +157,3 @@ index 97de97e3c5e2..a62de9e4e897 100644
  static struct lock_class_key qdisc_tx_busylock;
  static struct lock_class_key qdisc_running_key;
  
--- 
-2.11.0
-

+ 0 - 9
target/linux/generic/hack-4.9/700-swconfig_switch_drivers.patch

@@ -10,8 +10,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  include/uapi/linux/Kbuild |  1 +
  3 files changed, 99 insertions(+)
 
-diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
-index 2651c8d8de2f..a920adb78fea 100644
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
 @@ -147,6 +147,89 @@ config MDIO_XGENE
@@ -104,8 +102,6 @@ index 2651c8d8de2f..a920adb78fea 100644
  comment "MII PHY device drivers"
  
  config AMD_PHY
-diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
-index e58667d111e7..542b6be8953a 100644
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
 @@ -5,6 +5,21 @@ libphy-$(CONFIG_SWPHY)		+= swphy.o
@@ -130,8 +126,6 @@ index e58667d111e7..542b6be8953a 100644
  obj-$(CONFIG_MDIO_BCM_IPROC)	+= mdio-bcm-iproc.o
  obj-$(CONFIG_MDIO_BCM_UNIMAC)	+= mdio-bcm-unimac.o
  obj-$(CONFIG_MDIO_BITBANG)	+= mdio-bitbang.o
-diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
-index cd2be1c8e9fb..ccdd8d586ab8 100644
 --- a/include/uapi/linux/Kbuild
 +++ b/include/uapi/linux/Kbuild
 @@ -399,6 +399,7 @@ header-y += stddef.h
@@ -142,6 +136,3 @@ index cd2be1c8e9fb..ccdd8d586ab8 100644
  header-y += synclink.h
  header-y += sync_file.h
  header-y += sysctl.h
--- 
-2.11.0
-

+ 1 - 1
target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch

@@ -15,7 +15,7 @@
  
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1309,6 +1309,9 @@ int genphy_update_link(struct phy_device
+@@ -1312,6 +1312,9 @@ int genphy_update_link(struct phy_device
  {
  	int status;
  

+ 1 - 1
target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch

@@ -50,7 +50,7 @@
  		phy_device_free(phydev);
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -859,6 +859,23 @@ void mdio_bus_exit(void);
+@@ -863,6 +863,23 @@ void mdio_bus_exit(void);
  
  extern struct bus_type mdio_bus_type;
  

+ 13 - 25
target/linux/generic/hack-4.9/721-phy_packets.patch

@@ -13,10 +13,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/ethernet/eth.c        |  6 ++++++
  6 files changed, 58 insertions(+), 14 deletions(-)
 
-Index: linux-4.9.34/include/linux/netdevice.h
-===================================================================
---- linux-4.9.34.orig/include/linux/netdevice.h
-+++ linux-4.9.34/include/linux/netdevice.h
+--- a/include/linux/netdevice.h
++++ b/include/linux/netdevice.h
 @@ -1398,6 +1398,7 @@ enum netdev_priv_flags {
  	IFF_RXFH_CONFIGURED		= 1<<25,
  	IFF_PHONY_HEADROOM		= 1<<26,
@@ -56,10 +54,8 @@ Index: linux-4.9.34/include/linux/netdevice.h
  /*
   * Cache lines mostly used on receive path (including eth_type_trans())
   */
-Index: linux-4.9.34/include/linux/skbuff.h
-===================================================================
---- linux-4.9.34.orig/include/linux/skbuff.h
-+++ linux-4.9.34/include/linux/skbuff.h
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
 @@ -2334,6 +2334,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
@@ -88,10 +84,8 @@ Index: linux-4.9.34/include/linux/skbuff.h
  static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
  		unsigned int length)
  {
-Index: linux-4.9.34/net/Kconfig
-===================================================================
---- linux-4.9.34.orig/net/Kconfig
-+++ linux-4.9.34/net/Kconfig
+--- a/net/Kconfig
++++ b/net/Kconfig
 @@ -25,6 +25,12 @@ menuconfig NET
  
  if NET
@@ -105,11 +99,9 @@ Index: linux-4.9.34/net/Kconfig
  config WANT_COMPAT_NETLINK_MESSAGES
  	bool
  	help
-Index: linux-4.9.34/net/core/dev.c
-===================================================================
---- linux-4.9.34.orig/net/core/dev.c
-+++ linux-4.9.34/net/core/dev.c
-@@ -2931,10 +2931,20 @@ static int xmit_one(struct sk_buff *skb,
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -2939,10 +2939,20 @@ static int xmit_one(struct sk_buff *skb,
  	if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
  		dev_queue_xmit_nit(skb, dev);
  
@@ -134,10 +126,8 @@ Index: linux-4.9.34/net/core/dev.c
  
  	return rc;
  }
-Index: linux-4.9.34/net/core/skbuff.c
-===================================================================
---- linux-4.9.34.orig/net/core/skbuff.c
-+++ linux-4.9.34/net/core/skbuff.c
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
 @@ -64,6 +64,7 @@
  #include <linux/errqueue.h>
  #include <linux/prefetch.h>
@@ -169,10 +159,8 @@ Index: linux-4.9.34/net/core/skbuff.c
  void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
  		     int size, unsigned int truesize)
  {
-Index: linux-4.9.34/net/ethernet/eth.c
-===================================================================
---- linux-4.9.34.orig/net/ethernet/eth.c
-+++ linux-4.9.34/net/ethernet/eth.c
+--- a/net/ethernet/eth.c
++++ b/net/ethernet/eth.c
 @@ -171,6 +171,12 @@ __be16 eth_type_trans(struct sk_buff *sk
  	const struct ethhdr *eth;
  

+ 6 - 12
target/linux/generic/hack-4.9/773-bgmac-add-srab-switch.patch

@@ -12,10 +12,8 @@ Signed-off-by: Hauke Mehrtens <[email protected]>
  drivers/net/ethernet/broadcom/bgmac.h      |  4 ++++
  3 files changed, 29 insertions(+)
 
-Index: linux-4.9.34/drivers/net/ethernet/broadcom/bgmac-bcma.c
-===================================================================
---- linux-4.9.34.orig/drivers/net/ethernet/broadcom/bgmac-bcma.c
-+++ linux-4.9.34/drivers/net/ethernet/broadcom/bgmac-bcma.c
+--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
++++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
 @@ -230,6 +230,7 @@ static int bgmac_probe(struct bcma_devic
  		bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST;
  		bgmac->feature_flags |= BGMAC_FEAT_NO_RESET;
@@ -24,10 +22,8 @@ Index: linux-4.9.34/drivers/net/ethernet/broadcom/bgmac-bcma.c
  		break;
  	case BCMA_CHIP_ID_BCM53573:
  		bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST;
-Index: linux-4.9.34/drivers/net/ethernet/broadcom/bgmac.c
-===================================================================
---- linux-4.9.34.orig/drivers/net/ethernet/broadcom/bgmac.c
-+++ linux-4.9.34/drivers/net/ethernet/broadcom/bgmac.c
+--- a/drivers/net/ethernet/broadcom/bgmac.c
++++ b/drivers/net/ethernet/broadcom/bgmac.c
 @@ -11,6 +11,7 @@
  
  #include <linux/bcma/bcma.h>
@@ -80,10 +76,8 @@ Index: linux-4.9.34/drivers/net/ethernet/broadcom/bgmac.c
  	unregister_netdev(bgmac->net_dev);
  	phy_disconnect(bgmac->net_dev->phydev);
  	netif_napi_del(&bgmac->napi);
-Index: linux-4.9.34/drivers/net/ethernet/broadcom/bgmac.h
-===================================================================
---- linux-4.9.34.orig/drivers/net/ethernet/broadcom/bgmac.h
-+++ linux-4.9.34/drivers/net/ethernet/broadcom/bgmac.h
+--- a/drivers/net/ethernet/broadcom/bgmac.h
++++ b/drivers/net/ethernet/broadcom/bgmac.h
 @@ -409,6 +409,7 @@
  #define BGMAC_FEAT_CC4_IF_SW_TYPE	BIT(17)
  #define BGMAC_FEAT_CC4_IF_SW_TYPE_RGMII	BIT(18)

+ 1 - 8
target/linux/generic/hack-4.9/835-misc-owl_loader.patch

@@ -19,8 +19,6 @@ Signed-off-by: Christian Lamparter <[email protected]>
  drivers/misc/Makefile |  1 +
  2 files changed, 13 insertions(+)
 
-diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
-index 64971baf11fa..50d2eaa75d41 100644
 --- a/drivers/misc/Kconfig
 +++ b/drivers/misc/Kconfig
 @@ -151,6 +151,18 @@ config SGI_IOC4
@@ -42,11 +40,9 @@ index 64971baf11fa..50d2eaa75d41 100644
  config TIFM_CORE
  	tristate "TI Flash Media interface support"
  	depends on PCI
-diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
-index 31983366090a..48c7e74a6e5a 100644
 --- a/drivers/misc/Makefile
 +++ b/drivers/misc/Makefile
-@@ -12,6 +12,7 @@ obj-$(CONFIG_ATMEL_TCLIB)	+= atmel_tclib.o
+@@ -12,6 +12,7 @@ obj-$(CONFIG_ATMEL_TCLIB)	+= atmel_tclib
  obj-$(CONFIG_DUMMY_IRQ)		+= dummy-irq.o
  obj-$(CONFIG_ICS932S401)	+= ics932s401.o
  obj-$(CONFIG_LKDTM)		+= lkdtm.o
@@ -54,6 +50,3 @@ index 31983366090a..48c7e74a6e5a 100644
  obj-$(CONFIG_TIFM_CORE)       	+= tifm_core.o
  obj-$(CONFIG_TIFM_7XX1)       	+= tifm_7xx1.o
  obj-$(CONFIG_PHANTOM)		+= phantom.o
--- 
-2.11.0
-

+ 1 - 18
target/linux/generic/hack-4.9/901-debloat_sock_diag.patch

@@ -14,8 +14,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/unix/Kconfig    | 1 +
  7 files changed, 11 insertions(+), 1 deletion(-)
 
-diff --git a/net/Kconfig b/net/Kconfig
-index 38a0c857eb52..b4621e1f3470 100644
 --- a/net/Kconfig
 +++ b/net/Kconfig
 @@ -95,6 +95,9 @@ source "net/netlabel/Kconfig"
@@ -28,11 +26,9 @@ index 38a0c857eb52..b4621e1f3470 100644
  config NETWORK_SECMARK
  	bool "Security Marking"
  	help
-diff --git a/net/core/Makefile b/net/core/Makefile
-index d6508c2ddca5..bee4adde14d8 100644
 --- a/net/core/Makefile
 +++ b/net/core/Makefile
-@@ -9,8 +9,9 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
+@@ -9,8 +9,9 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
  
  obj-y		     += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
  			neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
@@ -43,8 +39,6 @@ index d6508c2ddca5..bee4adde14d8 100644
  obj-$(CONFIG_XFRM) += flow.o
  obj-y += net-sysfs.o
  obj-$(CONFIG_PROC_FS) += net-procfs.o
-diff --git a/net/core/sock.c b/net/core/sock.c
-index 1989b3dd6d17..d4ca8db4166a 100644
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
 @@ -1457,9 +1457,11 @@ void sk_destruct(struct sock *sk)
@@ -59,8 +53,6 @@ index 1989b3dd6d17..d4ca8db4166a 100644
  		sk_destruct(sk);
  }
  
-diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
-index b54b3ca939db..74ecf598622c 100644
 --- a/net/ipv4/Kconfig
 +++ b/net/ipv4/Kconfig
 @@ -408,6 +408,7 @@ config INET_XFRM_MODE_BEET
@@ -71,8 +63,6 @@ index b54b3ca939db..74ecf598622c 100644
  	default y
  	---help---
  	  Support for INET (TCP, DCCP, etc) socket monitoring interface used by
-diff --git a/net/netlink/Kconfig b/net/netlink/Kconfig
-index 5d6e8c05b3d4..8a2696d66c20 100644
 --- a/net/netlink/Kconfig
 +++ b/net/netlink/Kconfig
 @@ -4,6 +4,7 @@
@@ -83,8 +73,6 @@ index 5d6e8c05b3d4..8a2696d66c20 100644
  	default n
  	---help---
  	  Support for NETLINK socket monitoring interface used by the ss tool.
-diff --git a/net/packet/Kconfig b/net/packet/Kconfig
-index cc55b35f80e5..9a83c86f5480 100644
 --- a/net/packet/Kconfig
 +++ b/net/packet/Kconfig
 @@ -18,6 +18,7 @@ config PACKET
@@ -95,8 +83,6 @@ index cc55b35f80e5..9a83c86f5480 100644
  	default n
  	---help---
  	  Support for PF_PACKET sockets monitoring interface used by the ss tool.
-diff --git a/net/unix/Kconfig b/net/unix/Kconfig
-index 8b31ab85d050..6548cf3ea7f1 100644
 --- a/net/unix/Kconfig
 +++ b/net/unix/Kconfig
 @@ -22,6 +22,7 @@ config UNIX
@@ -107,6 +93,3 @@ index 8b31ab85d050..6548cf3ea7f1 100644
  	default n
  	---help---
  	  Support for UNIX socket monitoring interface used by the ss tool.
--- 
-2.11.0
-

+ 41 - 81
target/linux/generic/hack-4.9/902-debloat_proc.patch

@@ -27,10 +27,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/ipv4/route.c         |  3 +++
  20 files changed, 105 insertions(+), 17 deletions(-)
 
-Index: linux-4.9.34/fs/locks.c
-===================================================================
---- linux-4.9.34.orig/fs/locks.c
-+++ linux-4.9.34/fs/locks.c
+--- a/fs/locks.c
++++ b/fs/locks.c
 @@ -2802,6 +2802,8 @@ static const struct file_operations proc
  
  static int __init proc_locks_init(void)
@@ -40,10 +38,8 @@ Index: linux-4.9.34/fs/locks.c
  	proc_create("locks", 0, NULL, &proc_locks_operations);
  	return 0;
  }
-Index: linux-4.9.34/fs/proc/Kconfig
-===================================================================
---- linux-4.9.34.orig/fs/proc/Kconfig
-+++ linux-4.9.34/fs/proc/Kconfig
+--- a/fs/proc/Kconfig
++++ b/fs/proc/Kconfig
 @@ -81,3 +81,8 @@ config PROC_CHILDREN
  
  	  Say Y if you are running any user-space software which takes benefit from
@@ -53,10 +49,8 @@ Index: linux-4.9.34/fs/proc/Kconfig
 +	default n
 +	depends on EXPERT
 +	bool "Strip non-essential /proc functionality to reduce code size"
-Index: linux-4.9.34/fs/proc/consoles.c
-===================================================================
---- linux-4.9.34.orig/fs/proc/consoles.c
-+++ linux-4.9.34/fs/proc/consoles.c
+--- a/fs/proc/consoles.c
++++ b/fs/proc/consoles.c
 @@ -106,6 +106,9 @@ static const struct file_operations proc
  
  static int __init proc_consoles_init(void)
@@ -67,10 +61,8 @@ Index: linux-4.9.34/fs/proc/consoles.c
  	proc_create("consoles", 0, NULL, &proc_consoles_operations);
  	return 0;
  }
-Index: linux-4.9.34/fs/proc/proc_tty.c
-===================================================================
---- linux-4.9.34.orig/fs/proc/proc_tty.c
-+++ linux-4.9.34/fs/proc/proc_tty.c
+--- a/fs/proc/proc_tty.c
++++ b/fs/proc/proc_tty.c
 @@ -143,7 +143,10 @@ static const struct file_operations proc
  void proc_tty_register_driver(struct tty_driver *driver)
  {
@@ -103,10 +95,8 @@ Index: linux-4.9.34/fs/proc/proc_tty.c
  	if (!proc_mkdir("tty", NULL))
  		return;
  	proc_mkdir("tty/ldisc", NULL);	/* Preserved: it's userspace visible */
-Index: linux-4.9.34/include/net/snmp.h
-===================================================================
---- linux-4.9.34.orig/include/net/snmp.h
-+++ linux-4.9.34/include/net/snmp.h
+--- a/include/net/snmp.h
++++ b/include/net/snmp.h
 @@ -123,6 +123,21 @@ struct linux_xfrm_mib {
  #define DECLARE_SNMP_STAT(type, name)	\
  	extern __typeof__(type) __percpu *name
@@ -140,10 +130,8 @@ Index: linux-4.9.34/include/net/snmp.h
  
  #define __SNMP_ADD_STATS64(mib, field, addend) 				\
  	do {								\
-Index: linux-4.9.34/ipc/msg.c
-===================================================================
---- linux-4.9.34.orig/ipc/msg.c
-+++ linux-4.9.34/ipc/msg.c
+--- a/ipc/msg.c
++++ b/ipc/msg.c
 @@ -1058,6 +1058,9 @@ void __init msg_init(void)
  {
  	msg_init_ns(&init_ipc_ns);
@@ -154,10 +142,8 @@ Index: linux-4.9.34/ipc/msg.c
  	ipc_init_proc_interface("sysvipc/msg",
  				"       key      msqid perms      cbytes       qnum lspid lrpid   uid   gid  cuid  cgid      stime      rtime      ctime\n",
  				IPC_MSG_IDS, sysvipc_msg_proc_show);
-Index: linux-4.9.34/ipc/sem.c
-===================================================================
---- linux-4.9.34.orig/ipc/sem.c
-+++ linux-4.9.34/ipc/sem.c
+--- a/ipc/sem.c
++++ b/ipc/sem.c
 @@ -205,6 +205,8 @@ void sem_exit_ns(struct ipc_namespace *n
  void __init sem_init(void)
  {
@@ -167,10 +153,8 @@ Index: linux-4.9.34/ipc/sem.c
  	ipc_init_proc_interface("sysvipc/sem",
  				"       key      semid perms      nsems   uid   gid  cuid  cgid      otime      ctime\n",
  				IPC_SEM_IDS, sysvipc_sem_proc_show);
-Index: linux-4.9.34/ipc/shm.c
-===================================================================
---- linux-4.9.34.orig/ipc/shm.c
-+++ linux-4.9.34/ipc/shm.c
+--- a/ipc/shm.c
++++ b/ipc/shm.c
 @@ -118,6 +118,8 @@ pure_initcall(ipc_ns_init);
  
  void __init shm_init(void)
@@ -180,10 +164,8 @@ Index: linux-4.9.34/ipc/shm.c
  	ipc_init_proc_interface("sysvipc/shm",
  #if BITS_PER_LONG <= 32
  				"       key      shmid perms       size  cpid  lpid nattch   uid   gid  cuid  cgid      atime      dtime      ctime        rss       swap\n",
-Index: linux-4.9.34/ipc/util.c
-===================================================================
---- linux-4.9.34.orig/ipc/util.c
-+++ linux-4.9.34/ipc/util.c
+--- a/ipc/util.c
++++ b/ipc/util.c
 @@ -121,6 +121,9 @@ void __init ipc_init_proc_interface(cons
  	struct proc_dir_entry *pde;
  	struct ipc_proc_iface *iface;
@@ -194,10 +176,8 @@ Index: linux-4.9.34/ipc/util.c
  	iface = kmalloc(sizeof(*iface), GFP_KERNEL);
  	if (!iface)
  		return;
-Index: linux-4.9.34/kernel/exec_domain.c
-===================================================================
---- linux-4.9.34.orig/kernel/exec_domain.c
-+++ linux-4.9.34/kernel/exec_domain.c
+--- a/kernel/exec_domain.c
++++ b/kernel/exec_domain.c
 @@ -41,6 +41,8 @@ static const struct file_operations exec
  
  static int __init proc_execdomains_init(void)
@@ -207,10 +187,8 @@ Index: linux-4.9.34/kernel/exec_domain.c
  	proc_create("execdomains", 0, NULL, &execdomains_proc_fops);
  	return 0;
  }
-Index: linux-4.9.34/kernel/irq/proc.c
-===================================================================
---- linux-4.9.34.orig/kernel/irq/proc.c
-+++ linux-4.9.34/kernel/irq/proc.c
+--- a/kernel/irq/proc.c
++++ b/kernel/irq/proc.c
 @@ -326,6 +326,9 @@ void register_irq_proc(unsigned int irq,
  	static DEFINE_MUTEX(register_lock);
  	char name [MAX_NAMELEN];
@@ -241,10 +219,8 @@ Index: linux-4.9.34/kernel/irq/proc.c
  	/* create /proc/irq */
  	root_irq_dir = proc_mkdir("irq", NULL);
  	if (!root_irq_dir)
-Index: linux-4.9.34/kernel/time/timer_list.c
-===================================================================
---- linux-4.9.34.orig/kernel/time/timer_list.c
-+++ linux-4.9.34/kernel/time/timer_list.c
+--- a/kernel/time/timer_list.c
++++ b/kernel/time/timer_list.c
 @@ -393,6 +393,8 @@ static int __init init_timer_list_procfs
  {
  	struct proc_dir_entry *pe;
@@ -254,11 +230,9 @@ Index: linux-4.9.34/kernel/time/timer_list.c
  	pe = proc_create("timer_list", 0444, NULL, &timer_list_fops);
  	if (!pe)
  		return -ENOMEM;
-Index: linux-4.9.34/mm/vmalloc.c
-===================================================================
---- linux-4.9.34.orig/mm/vmalloc.c
-+++ linux-4.9.34/mm/vmalloc.c
-@@ -2703,6 +2703,8 @@ static const struct file_operations proc
+--- a/mm/vmalloc.c
++++ b/mm/vmalloc.c
+@@ -2713,6 +2713,8 @@ static const struct file_operations proc
  
  static int __init proc_vmalloc_init(void)
  {
@@ -267,10 +241,8 @@ Index: linux-4.9.34/mm/vmalloc.c
  	proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations);
  	return 0;
  }
-Index: linux-4.9.34/mm/vmstat.c
-===================================================================
---- linux-4.9.34.orig/mm/vmstat.c
-+++ linux-4.9.34/mm/vmstat.c
+--- a/mm/vmstat.c
++++ b/mm/vmstat.c
 @@ -1791,10 +1791,12 @@ static int __init setup_vmstat(void)
  	cpu_notifier_register_done();
  #endif
@@ -287,10 +259,8 @@ Index: linux-4.9.34/mm/vmstat.c
  #endif
  	return 0;
  }
-Index: linux-4.9.34/net/8021q/vlanproc.c
-===================================================================
---- linux-4.9.34.orig/net/8021q/vlanproc.c
-+++ linux-4.9.34/net/8021q/vlanproc.c
+--- a/net/8021q/vlanproc.c
++++ b/net/8021q/vlanproc.c
 @@ -127,6 +127,9 @@ void vlan_proc_cleanup(struct net *net)
  {
  	struct vlan_net *vn = net_generic(net, vlan_net_id);
@@ -311,10 +281,8 @@ Index: linux-4.9.34/net/8021q/vlanproc.c
  	vn->proc_vlan_dir = proc_net_mkdir(net, name_root, net->proc_net);
  	if (!vn->proc_vlan_dir)
  		goto err;
-Index: linux-4.9.34/net/core/net-procfs.c
-===================================================================
---- linux-4.9.34.orig/net/core/net-procfs.c
-+++ linux-4.9.34/net/core/net-procfs.c
+--- a/net/core/net-procfs.c
++++ b/net/core/net-procfs.c
 @@ -319,10 +319,12 @@ static int __net_init dev_proc_net_init(
  
  	if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops))
@@ -357,10 +325,8 @@ Index: linux-4.9.34/net/core/net-procfs.c
  	remove_proc_entry("dev", net->proc_net);
  }
  
-Index: linux-4.9.34/net/core/sock.c
-===================================================================
---- linux-4.9.34.orig/net/core/sock.c
-+++ linux-4.9.34/net/core/sock.c
+--- a/net/core/sock.c
++++ b/net/core/sock.c
 @@ -3082,6 +3082,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
@@ -370,10 +336,8 @@ Index: linux-4.9.34/net/core/sock.c
  	return register_pernet_subsys(&proto_net_ops);
  }
  
-Index: linux-4.9.34/net/ipv4/fib_trie.c
-===================================================================
---- linux-4.9.34.orig/net/ipv4/fib_trie.c
-+++ linux-4.9.34/net/ipv4/fib_trie.c
+--- a/net/ipv4/fib_trie.c
++++ b/net/ipv4/fib_trie.c
 @@ -2667,10 +2667,12 @@ static const struct file_operations fib_
  
  int __net_init fib_proc_init(struct net *net)
@@ -415,10 +379,8 @@ Index: linux-4.9.34/net/ipv4/fib_trie.c
  	remove_proc_entry("route", net->proc_net);
  }
  
-Index: linux-4.9.34/net/ipv4/proc.c
-===================================================================
---- linux-4.9.34.orig/net/ipv4/proc.c
-+++ linux-4.9.34/net/ipv4/proc.c
+--- a/net/ipv4/proc.c
++++ b/net/ipv4/proc.c
 @@ -564,6 +564,9 @@ static __net_initdata struct pernet_oper
  
  int __init ip_misc_proc_init(void)
@@ -429,10 +391,8 @@ Index: linux-4.9.34/net/ipv4/proc.c
  	return register_pernet_subsys(&ip_proc_ops);
  }
  
-Index: linux-4.9.34/net/ipv4/route.c
-===================================================================
---- linux-4.9.34.orig/net/ipv4/route.c
-+++ linux-4.9.34/net/ipv4/route.c
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
 @@ -420,6 +420,9 @@ static struct pernet_operations ip_rt_pr
  
  static int __init ip_rt_proc_init(void)

+ 1 - 12
target/linux/generic/hack-4.9/904-debloat_dma_buf.patch

@@ -11,8 +11,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  kernel/sched/core.c       |  1 +
  4 files changed, 12 insertions(+), 5 deletions(-)
 
-diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
-index d02e7c0f5bfd..e1c0e2e0d3a8 100644
 --- a/drivers/base/Kconfig
 +++ b/drivers/base/Kconfig
 @@ -241,7 +241,7 @@ config SOC_BUS
@@ -24,8 +22,6 @@ index d02e7c0f5bfd..e1c0e2e0d3a8 100644
  	default n
  	select ANON_INODES
  	help
-diff --git a/drivers/dma-buf/Makefile b/drivers/dma-buf/Makefile
-index 210a10bfad2b..36ee68dcdffe 100644
 --- a/drivers/dma-buf/Makefile
 +++ b/drivers/dma-buf/Makefile
 @@ -1,3 +1,7 @@
@@ -39,8 +35,6 @@ index 210a10bfad2b..36ee68dcdffe 100644
 +dma-buf-objs-$(CONFIG_SW_SYNC)		+= sw_sync.o sync_debug.o
 +
 +dma-shared-buffer-objs :=  $(dma-buf-objs-y)
-diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
-index 6b54e02da10c..24e69ef1f243 100644
 --- a/drivers/dma-buf/dma-buf.c
 +++ b/drivers/dma-buf/dma-buf.c
 @@ -34,6 +34,7 @@
@@ -58,11 +52,9 @@ index 6b54e02da10c..24e69ef1f243 100644
 -__exitcall(dma_buf_deinit);
 +module_exit(dma_buf_deinit);
 +MODULE_LICENSE("GPL");
-diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index 692c948ae333..eaf379285cca 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2170,6 +2170,7 @@ int wake_up_state(struct task_struct *p, unsigned int state)
+@@ -2170,6 +2170,7 @@ int wake_up_state(struct task_struct *p,
  {
  	return try_to_wake_up(p, state, 0);
  }
@@ -70,6 +62,3 @@ index 692c948ae333..eaf379285cca 100644
  
  /*
   * This function clears the sched_dl_entity static params.
--- 
-2.11.0
-

+ 1 - 5
target/linux/generic/hack-4.9/910-kobject_uevent.patch

@@ -9,7 +9,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  lib/kobject_uevent.c    | 37 +++++++++++++++++++++++++++++++++++++
  2 files changed, 42 insertions(+)
 
-diff --git a/include/linux/kobject.h b/include/linux/kobject.h
 --- a/lib/kobject_uevent.c
 +++ b/lib/kobject_uevent.c
 @@ -52,6 +52,18 @@ static const char *kobject_actions[] = {
@@ -30,7 +29,4 @@ diff --git a/include/linux/kobject.h b/include/linux/kobject.h
 +
  /**
   * kobject_action_type - translate action string to numeric type
-  *--- a/include/linux/kobject.h
--- 
-2.11.0
-
+  *

+ 8 - 15
target/linux/generic/hack-4.9/911-kobject_add_broadcast_uevent.patch

@@ -9,33 +9,29 @@ Signed-off-by: Felix Fietkau <[email protected]>
  lib/kobject_uevent.c    | 37 +++++++++++++++++++++++++++++++++++++
  2 files changed, 42 insertions(+)
 
-diff --git a/include/linux/kobject.h b/include/linux/kobject.h
-index a7dc9e61f433..3d6950c957cd 100644
 --- a/include/linux/kobject.h
 +++ b/include/linux/kobject.h
-@@ -34,6 +34,8 @@
- 
- struct sk_buff;
+@@ -32,6 +32,8 @@
+ #define UEVENT_NUM_ENVP			32	/* number of env pointers */
+ #define UEVENT_BUFFER_SIZE		2048	/* buffer for the variables */
  
 +struct sk_buff;
 +
  #ifdef CONFIG_UEVENT_HELPER
  /* path to the userspace helper executed on an event */
  extern char uevent_helper[];
-@@ -227,4 +229,7 @@ int kobject_action_type(const char *buf, size_t count,
- int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
- 		     gfp_t allocation);
+@@ -222,4 +224,7 @@ int add_uevent_var(struct kobj_uevent_en
+ int kobject_action_type(const char *buf, size_t count,
+ 			enum kobject_action *type);
  
 +int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
 +		     gfp_t allocation);
 +
  #endif /* _KOBJECT_H_ */
-diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
-index ac0c7cfa7292..bd13381a410f 100644
 --- a/lib/kobject_uevent.c
 +++ b/lib/kobject_uevent.c
-@@ -460,6 +460,43 @@ int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
- EXPORT_SYMBOL_GPL(broadcast_uevent);
+@@ -423,6 +423,43 @@ int add_uevent_var(struct kobj_uevent_en
+ EXPORT_SYMBOL_GPL(add_uevent_var);
  
  #if defined(CONFIG_NET)
 +int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
@@ -78,6 +74,3 @@ index ac0c7cfa7292..bd13381a410f 100644
  static int uevent_net_init(struct net *net)
  {
  	struct uevent_sock *ue_sk;
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/hack-4.9/921-always-create-console-node-in-initramfs.patch

@@ -8,8 +8,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  scripts/gen_initramfs_list.sh | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
 
-diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
-index 7710113e6a72..b8d6cb30e054 100755
 --- a/scripts/gen_initramfs_list.sh
 +++ b/scripts/gen_initramfs_list.sh
 @@ -59,6 +59,18 @@ default_initramfs() {
@@ -40,6 +38,3 @@ index 7710113e6a72..b8d6cb30e054 100755
  		echo "${dirlist}" | \
  		while read x; do
  			${dep_list}parse ${x}
--- 
-2.11.0
-

+ 4 - 23
target/linux/generic/hack-4.9/930-crashlog.patch

@@ -19,9 +19,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  create mode 100644 include/linux/crashlog.h
  create mode 100644 kernel/crashlog.c
 
-diff --git a/include/linux/crashlog.h b/include/linux/crashlog.h
-new file mode 100644
-index 000000000000..7a9ee6138cc4
 --- /dev/null
 +++ b/include/linux/crashlog.h
 @@ -0,0 +1,17 @@
@@ -42,8 +39,6 @@ index 000000000000..7a9ee6138cc4
 +#endif
 +
 +#endif
-diff --git a/init/Kconfig b/init/Kconfig
-index 9f2c0cabbc97..6d8f388fb9b3 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -1298,6 +1298,10 @@ config RELAY
@@ -57,8 +52,6 @@ index 9f2c0cabbc97..6d8f388fb9b3 100644
  config BLK_DEV_INITRD
  	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
  	depends on BROKEN || !FRV
-diff --git a/kernel/Makefile b/kernel/Makefile
-index 314e7d62f5f0..5fe0d8c3cb35 100644
 --- a/kernel/Makefile
 +++ b/kernel/Makefile
 @@ -113,6 +113,7 @@ obj-$(CONFIG_TORTURE_TEST) += torture.o
@@ -69,9 +62,6 @@ index 314e7d62f5f0..5fe0d8c3cb35 100644
  
  $(obj)/configs.o: $(obj)/config_data.h
  
-diff --git a/kernel/crashlog.c b/kernel/crashlog.c
-new file mode 100644
-index 000000000000..11894b276e54
 --- /dev/null
 +++ b/kernel/crashlog.c
 @@ -0,0 +1,213 @@
@@ -288,11 +278,9 @@ index 000000000000..11894b276e54
 +	return 0;
 +}
 +module_init(crashlog_init_fs);
-diff --git a/kernel/module.c b/kernel/module.c
-index 80b5ac4181c6..51d6e4e6f436 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -253,6 +253,9 @@ static void mod_update_bounds(struct module *mod)
+@@ -253,6 +253,9 @@ static void mod_update_bounds(struct mod
  #ifdef CONFIG_KGDB_KDB
  struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
  #endif /* CONFIG_KGDB_KDB */
@@ -302,8 +290,6 @@ index 80b5ac4181c6..51d6e4e6f436 100644
  
  static void module_assert_mutex(void)
  {
-diff --git a/mm/bootmem.c b/mm/bootmem.c
-index e8a55a3c9feb..e0f3c0bf2709 100644
 --- a/mm/bootmem.c
 +++ b/mm/bootmem.c
 @@ -14,6 +14,7 @@
@@ -314,7 +300,7 @@ index e8a55a3c9feb..e0f3c0bf2709 100644
  #include <linux/bug.h>
  #include <linux/io.h>
  #include <linux/bootmem.h>
-@@ -174,6 +175,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata)
+@@ -174,6 +175,7 @@ static unsigned long __init free_all_boo
  	if (!bdata->node_bootmem_map)
  		return 0;
  
@@ -322,8 +308,6 @@ index e8a55a3c9feb..e0f3c0bf2709 100644
  	map = bdata->node_bootmem_map;
  	start = bdata->node_min_pfn;
  	end = bdata->node_low_pfn;
-diff --git a/mm/memblock.c b/mm/memblock.c
-index 68849d0ead09..aef9ca5e7f52 100644
 --- a/mm/memblock.c
 +++ b/mm/memblock.c
 @@ -19,6 +19,7 @@
@@ -334,7 +318,7 @@ index 68849d0ead09..aef9ca5e7f52 100644
  
  #include <asm/sections.h>
  #include <linux/io.h>
-@@ -499,6 +500,8 @@ static void __init_memblock memblock_insert_region(struct memblock_type *type,
+@@ -499,6 +500,8 @@ static void __init_memblock memblock_ins
  	memblock_set_region_node(rgn, nid);
  	type->cnt++;
  	type->total_size += size;
@@ -343,7 +327,7 @@ index 68849d0ead09..aef9ca5e7f52 100644
  }
  
  /**
-@@ -538,6 +541,8 @@ int __init_memblock memblock_add_range(struct memblock_type *type,
+@@ -538,6 +541,8 @@ int __init_memblock memblock_add_range(s
  		type->regions[0].flags = flags;
  		memblock_set_region_node(&type->regions[0], nid);
  		type->total_size = size;
@@ -352,6 +336,3 @@ index 68849d0ead09..aef9ca5e7f52 100644
  		return 0;
  	}
  repeat:
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/pending-4.9/130-add-linux-spidev-compatible-si3210.patch

@@ -6,8 +6,6 @@ Signed-off-by: Giuseppe Lippolis <[email protected]>
  drivers/spi/spidev.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
-index 2e05046f866b..09d03763f39b 100644
 --- a/drivers/spi/spidev.c
 +++ b/drivers/spi/spidev.c
 @@ -696,6 +696,7 @@ static struct class *spidev_class;
@@ -18,6 +16,3 @@ index 2e05046f866b..09d03763f39b 100644
  	{},
  };
  MODULE_DEVICE_TABLE(of, spidev_dt_ids);
--- 
-2.11.0
-

+ 1 - 1
target/linux/generic/pending-4.9/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch

@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -698,7 +698,7 @@ static void spi_set_cs(struct spi_device
+@@ -700,7 +700,7 @@ static void spi_set_cs(struct spi_device
  		enable = !enable;
  
  	if (gpio_is_valid(spi->cs_gpio))

+ 1 - 6
target/linux/generic/pending-4.9/201-extra_optimization.patch

@@ -12,11 +12,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  Makefile | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 598494bc9a4b..1f02ac9b571a 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -637,12 +637,12 @@ KBUILD_CFLAGS	+= $(call cc-option,-fdata-sections,)
+@@ -639,12 +639,12 @@ KBUILD_CFLAGS	+= $(call cc-option,-fdata
  endif
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
@@ -32,6 +30,3 @@ index 598494bc9a4b..1f02ac9b571a 100644
  endif
  endif
  
--- 
-2.11.0
-

+ 4 - 15
target/linux/generic/pending-4.9/203-kallsyms_uncompressed.patch

@@ -11,8 +11,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  scripts/link-vmlinux.sh |  4 ++++
  4 files changed, 35 insertions(+)
 
-diff --git a/init/Kconfig b/init/Kconfig
-index 34407f15e6d3..9063c81b9665 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -1370,6 +1370,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
@@ -33,11 +31,9 @@ index 34407f15e6d3..9063c81b9665 100644
  config HAVE_PCSPKR_PLATFORM
  	bool
  
-diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
-index fafd1a3ef0da..abe49579212f 100644
 --- a/kernel/kallsyms.c
 +++ b/kernel/kallsyms.c
-@@ -113,6 +113,11 @@ static unsigned int kallsyms_expand_symbol(unsigned int off,
+@@ -113,6 +113,11 @@ static unsigned int kallsyms_expand_symb
  	 * For every byte on the compressed symbol data, copy the table
  	 * entry for that byte.
  	 */
@@ -49,7 +45,7 @@ index fafd1a3ef0da..abe49579212f 100644
  	while (len) {
  		tptr = &kallsyms_token_table[kallsyms_token_index[*data]];
  		data++;
-@@ -145,6 +150,9 @@ static unsigned int kallsyms_expand_symbol(unsigned int off,
+@@ -145,6 +150,9 @@ tail:
   */
  static char kallsyms_get_symbol_type(unsigned int off)
  {
@@ -59,11 +55,9 @@ index fafd1a3ef0da..abe49579212f 100644
  	/*
  	 * Get just the first code, look it up in the token table,
  	 * and return the first char from this token.
-diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
-index 1f22a186c18c..e7f0f19e39a9 100644
 --- a/scripts/kallsyms.c
 +++ b/scripts/kallsyms.c
-@@ -61,6 +61,7 @@ static struct addr_range percpu_range = {
+@@ -61,6 +61,7 @@ static struct addr_range percpu_range =
  static struct sym_entry *table;
  static unsigned int table_size, table_cnt;
  static int all_symbols = 0;
@@ -81,7 +75,7 @@ index 1f22a186c18c..e7f0f19e39a9 100644
  	output_label("kallsyms_token_table");
  	off = 0;
  	for (i = 0; i < 256; i++) {
-@@ -504,6 +508,9 @@ static void *find_token(unsigned char *str, int len, unsigned char *token)
+@@ -504,6 +508,9 @@ static void *find_token(unsigned char *s
  {
  	int i;
  
@@ -110,8 +104,6 @@ index 1f22a186c18c..e7f0f19e39a9 100644
  			else
  				usage();
  		}
-diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
-index f742c65108b9..6aabf1d71bb6 100755
 --- a/scripts/link-vmlinux.sh
 +++ b/scripts/link-vmlinux.sh
 @@ -136,6 +136,10 @@ kallsyms()
@@ -125,6 +117,3 @@ index f742c65108b9..6aabf1d71bb6 100755
  	local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
  		      ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
  
--- 
-2.11.0
-

+ 2 - 7
target/linux/generic/pending-4.9/205-backtrace_module_info.patch

@@ -9,11 +9,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  lib/vsprintf.c | 15 +++++++++++----
  1 file changed, 11 insertions(+), 4 deletions(-)
 
-diff --git a/lib/vsprintf.c b/lib/vsprintf.c
-index 0967771d8f7f..5d27eae49198 100644
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
-@@ -669,8 +669,10 @@ char *symbol_string(char *buf, char *end, void *ptr,
+@@ -669,8 +669,10 @@ char *symbol_string(char *buf, char *end
  		    struct printf_spec spec, const char *fmt)
  {
  	unsigned long value;
@@ -25,7 +23,7 @@ index 0967771d8f7f..5d27eae49198 100644
  #endif
  
  	if (fmt[1] == 'R')
-@@ -684,11 +686,16 @@ char *symbol_string(char *buf, char *end, void *ptr,
+@@ -684,11 +686,16 @@ char *symbol_string(char *buf, char *end
  		sprint_symbol(sym, value);
  	else
  		sprint_symbol_no_offset(sym, value);
@@ -45,6 +43,3 @@ index 0967771d8f7f..5d27eae49198 100644
  }
  
  static noinline_for_stack
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/pending-4.9/206-mips-disable-vdso.patch

@@ -7,8 +7,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  arch/mips/vdso/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
-index c3dc12a8b7d9..28f66e3bb2c3 100644
 --- a/arch/mips/vdso/Makefile
 +++ b/arch/mips/vdso/Makefile
 @@ -28,9 +28,9 @@ aflags-vdso := $(ccflags-vdso) \
@@ -23,6 +21,3 @@ index c3dc12a8b7d9..28f66e3bb2c3 100644
  endif
  
  # VDSO linker flags.
--- 
-2.11.0
-

+ 2 - 7
target/linux/generic/pending-4.9/240-remove-unsane-filenames-from-deps_initramfs-list.patch

@@ -16,11 +16,9 @@ Signed-off-by: Gabor Juhos <[email protected]>
  usr/Makefile | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
 
-diff --git a/usr/Makefile b/usr/Makefile
-index e767f019accf..17328d3c11cc 100644
 --- a/usr/Makefile
 +++ b/usr/Makefile
-@@ -53,6 +53,8 @@ ifneq ($(wildcard $(obj)/.initramfs_data.cpio.d),)
+@@ -53,6 +53,8 @@ ifneq ($(wildcard $(obj)/.initramfs_data
  	include $(obj)/.initramfs_data.cpio.d
  endif
  
@@ -29,7 +27,7 @@ index e767f019accf..17328d3c11cc 100644
  quiet_cmd_initfs = GEN     $@
        cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input)
  
-@@ -61,14 +63,14 @@ targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 \
+@@ -61,14 +63,14 @@ targets := initramfs_data.cpio.gz initra
  	initramfs_data.cpio.lzo initramfs_data.cpio.lz4 \
  	initramfs_data.cpio
  # do not try to update files included in initramfs
@@ -47,6 +45,3 @@ index e767f019accf..17328d3c11cc 100644
 +$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs_sane) klibcdirs
  	$(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.d
  	$(call if_changed,initfs)
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/261-enable_wilink_platform_without_drivers.patch

@@ -7,11 +7,9 @@ Signed-off-by: Imre Kaloz <[email protected]>
  drivers/net/wireless/ti/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/drivers/net/wireless/ti/Kconfig b/drivers/net/wireless/ti/Kconfig
-index 92fbd6597e34..3b1f951cacf7 100644
 --- a/drivers/net/wireless/ti/Kconfig
 +++ b/drivers/net/wireless/ti/Kconfig
-@@ -19,7 +19,7 @@ source "drivers/net/wireless/ti/wlcore/Kconfig"
+@@ -19,7 +19,7 @@ source "drivers/net/wireless/ti/wlcore/K
  
  config WILINK_PLATFORM_DATA
  	bool "TI WiLink platform data"
@@ -20,6 +18,3 @@ index 92fbd6597e34..3b1f951cacf7 100644
  	default y
  	---help---
  	Small platform data bit needed to pass data to the sdio modules.
--- 
-2.11.0
-

+ 2 - 2
target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch

@@ -9,7 +9,7 @@ Acked-by: Rob Landley <[email protected]>
 ---
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1065,9 +1065,6 @@ config FW_ARC
+@@ -1064,9 +1064,6 @@ config FW_ARC
  config ARCH_MAY_HAVE_PC_FDC
  	bool
  
@@ -19,7 +19,7 @@ Acked-by: Rob Landley <[email protected]>
  config CEVT_BCM1480
  	bool
  
-@@ -2964,6 +2961,18 @@ choice
+@@ -2963,6 +2960,18 @@ choice
  		bool "Extend builtin kernel arguments with bootloader arguments"
  endchoice
  

+ 1 - 6
target/linux/generic/pending-4.9/302-mips_no_branch_likely.patch

@@ -9,11 +9,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  arch/mips/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/arch/mips/Makefile b/arch/mips/Makefile
-index 1a6bac7b076f..5b656d9a1bbe 100644
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -90,7 +90,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz
+@@ -90,7 +90,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  # machines may also.  Since BFD is incredibly buggy with respect to
  # crossformat linking we rely on the elf2ecoff tool for format conversion.
  #
@@ -22,6 +20,3 @@ index 1a6bac7b076f..5b656d9a1bbe 100644
  cflags-y			+= -msoft-float
  LDFLAGS_vmlinux			+= -G 0 -static -n -nostdlib
  KBUILD_AFLAGS_MODULE		+= -mlong-calls
--- 
-2.11.0
-

+ 1 - 1
target/linux/generic/pending-4.9/304-mips_disable_fpu.patch

@@ -24,7 +24,7 @@ v2: incorporated changes suggested by Jonas Gorski
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -2892,6 +2892,20 @@ config MIPS_O32_FP64_SUPPORT
+@@ -2887,6 +2887,20 @@ config MIPS_O32_FP64_SUPPORT
  
  	  If unsure, say N.
  

+ 3 - 12
target/linux/generic/pending-4.9/305-mips_module_reloc.patch

@@ -9,11 +9,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  arch/mips/kernel/module.c      | 279 ++++++++++++++++++++++++++++++++++++++++-
  3 files changed, 284 insertions(+), 5 deletions(-)
 
-diff --git a/arch/mips/Makefile b/arch/mips/Makefile
-index 48dc1a9c3e42..77bf5db20d65 100644
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -93,8 +93,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz
+@@ -93,8 +93,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  cflags-y			+= -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
  cflags-y			+= -msoft-float
  LDFLAGS_vmlinux			+= -G 0 -static -n -nostdlib
@@ -27,8 +25,6 @@ index 48dc1a9c3e42..77bf5db20d65 100644
  
  ifeq ($(CONFIG_RELOCATABLE),y)
  LDFLAGS_vmlinux			+= --emit-relocs
-diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h
-index 702c273e67a9..1d4f3b37cefe 100644
 --- a/arch/mips/include/asm/module.h
 +++ b/arch/mips/include/asm/module.h
 @@ -11,6 +11,11 @@ struct mod_arch_specific {
@@ -43,8 +39,6 @@ index 702c273e67a9..1d4f3b37cefe 100644
  };
  
  typedef uint8_t Elf64_Byte;		/* Type for a 8-bit quantity.  */
-diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
-index 94627a3a6a0d..947981a9aa72 100644
 --- a/arch/mips/kernel/module.c
 +++ b/arch/mips/kernel/module.c
 @@ -44,14 +44,221 @@ struct mips_hi16 {
@@ -270,7 +264,7 @@ index 94627a3a6a0d..947981a9aa72 100644
  
  int apply_r_mips_none(struct module *me, u32 *location, Elf_Addr v)
  {
-@@ -65,8 +272,39 @@ static int apply_r_mips_32_rel(struct module *me, u32 *location, Elf_Addr v)
+@@ -65,8 +272,39 @@ static int apply_r_mips_32_rel(struct mo
  	return 0;
  }
  
@@ -310,7 +304,7 @@ index 94627a3a6a0d..947981a9aa72 100644
  	if (v % 4) {
  		pr_err("module %s: dangerous R_MIPS_26 REL relocation\n",
  		       me->name);
-@@ -74,13 +312,17 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
+@@ -74,13 +312,17 @@ static int apply_r_mips_26_rel(struct mo
  	}
  
  	if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
@@ -369,6 +363,3 @@ index 94627a3a6a0d..947981a9aa72 100644
  void module_arch_cleanup(struct module *mod)
  {
  	spin_lock_irq(&dbe_lock);
--- 
-2.11.0
-

+ 2 - 14
target/linux/generic/pending-4.9/306-mips_mem_functions_performance.patch

@@ -11,11 +11,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  4 files changed, 63 insertions(+), 2 deletions(-)
  create mode 100644 arch/mips/lib/memcmp.c
 
-diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
-index 90aca95fe314..3cd3b391ef49 100644
 --- a/arch/mips/boot/compressed/Makefile
 +++ b/arch/mips/boot/compressed/Makefile
-@@ -23,7 +23,8 @@ KBUILD_CFLAGS := $(shell echo $(KBUILD_CFLAGS) | sed -e "s/-pg//")
+@@ -23,7 +23,8 @@ KBUILD_CFLAGS := $(shell echo $(KBUILD_C
  KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS))
  
  KBUILD_CFLAGS := $(LINUXINCLUDE) $(KBUILD_CFLAGS) -D__KERNEL__ \
@@ -25,11 +23,9 @@ index 90aca95fe314..3cd3b391ef49 100644
  
  KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
  	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
-diff --git a/arch/mips/include/asm/string.h b/arch/mips/include/asm/string.h
-index 29030cb398ee..7b737f9b6d58 100644
 --- a/arch/mips/include/asm/string.h
 +++ b/arch/mips/include/asm/string.h
-@@ -140,4 +140,42 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
+@@ -140,4 +140,42 @@ extern void *memcpy(void *__to, __const_
  #define __HAVE_ARCH_MEMMOVE
  extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
  
@@ -72,8 +68,6 @@ index 29030cb398ee..7b737f9b6d58 100644
 +#endif
 +
  #endif /* _ASM_STRING_H */
-diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
-index 0344e575f522..33a0211e954a 100644
 --- a/arch/mips/lib/Makefile
 +++ b/arch/mips/lib/Makefile
 @@ -4,7 +4,7 @@
@@ -85,9 +79,6 @@ index 0344e575f522..33a0211e954a 100644
  
  obj-y			+= iomap.o
  obj-$(CONFIG_PCI)	+= iomap-pci.o
-diff --git a/arch/mips/lib/memcmp.c b/arch/mips/lib/memcmp.c
-new file mode 100644
-index 000000000000..35ef1646286e
 --- /dev/null
 +++ b/arch/mips/lib/memcmp.c
 @@ -0,0 +1,22 @@
@@ -113,6 +104,3 @@ index 000000000000..35ef1646286e
 +}
 +EXPORT_SYMBOL(memcmp);
 +
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/pending-4.9/307-mips_highmem_offset.patch

@@ -6,8 +6,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  arch/mips/include/asm/mach-generic/spaces.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
-index 952b0fdfda0e..fbb4e4cd4537 100644
 --- a/arch/mips/include/asm/mach-generic/spaces.h
 +++ b/arch/mips/include/asm/mach-generic/spaces.h
 @@ -46,7 +46,7 @@
@@ -19,6 +17,3 @@ index 952b0fdfda0e..fbb4e4cd4537 100644
  #endif
  
  #endif /* CONFIG_32BIT */
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/308-mips32r2_tune.patch

@@ -9,11 +9,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  arch/mips/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/arch/mips/Makefile b/arch/mips/Makefile
-index 77bf5db20d65..1ac83e281f90 100644
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -148,7 +148,7 @@ cflags-$(CONFIG_CPU_R4X00)	+= -march=r4600 -Wa,--trap
+@@ -148,7 +148,7 @@ cflags-$(CONFIG_CPU_R4X00)	+= -march=r46
  cflags-$(CONFIG_CPU_TX49XX)	+= -march=r4600 -Wa,--trap
  cflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
  			-Wa,-mips32 -Wa,--trap
@@ -22,6 +20,3 @@ index 77bf5db20d65..1ac83e281f90 100644
  			-Wa,-mips32r2 -Wa,--trap
  cflags-$(CONFIG_CPU_MIPS32_R6)	+= -march=mips32r6 -Wa,--trap
  cflags-$(CONFIG_CPU_MIPS64_R1)	+= $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/310-arm_module_unresolved_weak_sym.patch

@@ -7,11 +7,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  arch/arm/kernel/module.c | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
-index 4f14b5ce6535..4b4b0461663f 100644
 --- a/arch/arm/kernel/module.c
 +++ b/arch/arm/kernel/module.c
-@@ -88,6 +88,10 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
+@@ -88,6 +88,10 @@ apply_relocate(Elf32_Shdr *sechdrs, cons
  			return -ENOEXEC;
  		}
  
@@ -22,6 +20,3 @@ index 4f14b5ce6535..4b4b0461663f 100644
  		loc = dstsec->sh_addr + rel->r_offset;
  
  		switch (ELF32_R_TYPE(rel->r_info)) {
--- 
-2.11.0
-

+ 4 - 13
target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch

@@ -9,8 +9,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  include/linux/mtd/partitions.h |  2 ++
  3 files changed, 54 insertions(+)
 
-diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
-index 5a2d71729b9a..f5ac04e288eb 100644
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
 @@ -12,6 +12,23 @@ menuconfig MTD
@@ -37,8 +35,6 @@ index 5a2d71729b9a..f5ac04e288eb 100644
  config MTD_TESTS
  	tristate "MTD tests support (DANGEROUS)"
  	depends on m
-diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
-index dd86b430e46e..33d152d1876a 100644
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
 @@ -29,10 +29,12 @@
@@ -63,7 +59,7 @@ index dd86b430e46e..33d152d1876a 100644
  /*
   * Given a pointer to the MTD object in the mtd_part structure, we can retrieve
   * the pointer to that structure.
-@@ -678,6 +682,7 @@ int mtd_add_partition(struct mtd_info *parent, const char *name,
+@@ -678,6 +682,7 @@ int mtd_add_partition(struct mtd_info *p
  	mutex_unlock(&mtd_partitions_mutex);
  
  	add_mtd_device(&new->mtd);
@@ -71,7 +67,7 @@ index dd86b430e46e..33d152d1876a 100644
  
  	mtd_add_partition_attrs(new);
  
-@@ -756,6 +761,35 @@ int mtd_del_partition(struct mtd_info *mtd, int partno)
+@@ -756,6 +761,35 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -107,7 +103,7 @@ index dd86b430e46e..33d152d1876a 100644
  /*
   * This function, given a master MTD object and a partition table, creates
   * and registers slave MTD objects which are bound to the master according to
-@@ -787,6 +821,7 @@ int add_mtd_partitions(struct mtd_info *master,
+@@ -787,6 +821,7 @@ int add_mtd_partitions(struct mtd_info *
  		mutex_unlock(&mtd_partitions_mutex);
  
  		add_mtd_device(&slave->mtd);
@@ -115,11 +111,9 @@ index dd86b430e46e..33d152d1876a 100644
  		mtd_add_partition_attrs(slave);
  		if (parts[i].types)
  			mtd_parse_part(slave, parts[i].types);
-diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
-index c4beb70dacbd..320a791290c5 100644
 --- a/include/linux/mtd/partitions.h
 +++ b/include/linux/mtd/partitions.h
-@@ -109,5 +109,7 @@ int mtd_add_partition(struct mtd_info *master, const char *name,
+@@ -109,5 +109,7 @@ int mtd_add_partition(struct mtd_info *m
  		      long long offset, long long length);
  int mtd_del_partition(struct mtd_info *master, int partno);
  uint64_t mtd_get_device_size(const struct mtd_info *mtd);
@@ -127,6 +121,3 @@ index c4beb70dacbd..320a791290c5 100644
 +				       const char *name, int offset, int size);
  
  #endif
--- 
-2.11.0
-

+ 2 - 9
target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch

@@ -8,11 +8,9 @@ Signed-off-by: Gabor Juhos <[email protected]>
  include/linux/mtd/partitions.h |  2 ++
  2 files changed, 39 insertions(+)
 
-diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
-index f20207e32075..28f76315dfa0 100644
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -761,6 +761,36 @@ int mtd_del_partition(struct mtd_info *mtd, int partno)
+@@ -761,6 +761,36 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -57,7 +55,7 @@ index f20207e32075..28f76315dfa0 100644
  }
  
  void __weak arch_split_mtd_part(struct mtd_info *master, const char *name,
-@@ -783,6 +814,12 @@ static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
+@@ -783,6 +814,12 @@ static void mtd_partition_split(struct m
  	if (rootfs_found)
  		return;
  
@@ -70,8 +68,6 @@ index f20207e32075..28f76315dfa0 100644
  	if (!strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) &&
  	    IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE))
  		split_firmware(master, part);
-diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
-index baafd542432e..356e29815aa2 100644
 --- a/include/linux/mtd/partitions.h
 +++ b/include/linux/mtd/partitions.h
 @@ -74,6 +74,8 @@ struct mtd_part_parser_data {
@@ -83,6 +79,3 @@ index baafd542432e..356e29815aa2 100644
  };
  
  struct mtd_part_parser {
--- 
-2.11.0
-

+ 0 - 7
target/linux/generic/pending-4.9/403-mtd-hook-mtdsplit-to-Kbuild.patch

@@ -8,8 +8,6 @@ Signed-off-by: Gabor Juhos <[email protected]>
  drivers/mtd/Makefile | 2 ++
  2 files changed, 4 insertions(+)
 
-diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
-index f5ac04e288eb..4185e04760dd 100644
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
 @@ -27,6 +27,8 @@ config MTD_SPLIT_FIRMWARE_NAME
@@ -21,8 +19,6 @@ index f5ac04e288eb..4185e04760dd 100644
  endmenu
  
  config MTD_TESTS
-diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
-index 151d60df303a..48fd01e9f6e3 100644
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
 @@ -6,6 +6,8 @@
@@ -34,6 +30,3 @@ index 151d60df303a..48fd01e9f6e3 100644
  obj-$(CONFIG_MTD_OF_PARTS)	+= ofpart.o
  obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
  obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
--- 
-2.11.0
-

+ 4 - 13
target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch

@@ -9,11 +9,9 @@ Signed-off-by: Gabor Juhos <[email protected]>
  include/linux/mtd/partitions.h |  2 ++
  3 files changed, 49 insertions(+)
 
-diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
-index 28f76315dfa0..fce83882fd4e 100644
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -791,6 +791,17 @@ run_parsers_by_type(struct mtd_part *slave, enum mtd_parser_type type)
+@@ -791,6 +791,17 @@ run_parsers_by_type(struct mtd_part *sla
  	return nr_parts;
  }
  
@@ -31,7 +29,7 @@ index 28f76315dfa0..fce83882fd4e 100644
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME	CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -1146,6 +1157,24 @@ int mtd_is_partition(const struct mtd_info *mtd)
+@@ -1146,6 +1157,24 @@ int mtd_is_partition(const struct mtd_in
  }
  EXPORT_SYMBOL_GPL(mtd_is_partition);
  
@@ -56,11 +54,9 @@ index 28f76315dfa0..fce83882fd4e 100644
  /* Returns the size of the entire flash chip */
  uint64_t mtd_get_device_size(const struct mtd_info *mtd)
  {
-diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
-index 5bb42c6dacdc..e7d5091bb447 100644
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
-@@ -485,6 +485,24 @@ static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd)
+@@ -485,6 +485,24 @@ static inline uint32_t mtd_mod_by_eb(uin
  	return do_div(sz, mtd->erasesize);
  }
  
@@ -85,11 +81,9 @@ index 5bb42c6dacdc..e7d5091bb447 100644
  static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
  {
  	if (mtd->writesize_shift)
-diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
-index 356e29815aa2..c0937ff4797b 100644
 --- a/include/linux/mtd/partitions.h
 +++ b/include/linux/mtd/partitions.h
-@@ -114,6 +114,8 @@ int mtd_is_partition(const struct mtd_info *mtd);
+@@ -114,6 +114,8 @@ int mtd_is_partition(const struct mtd_in
  int mtd_add_partition(struct mtd_info *master, const char *name,
  		      long long offset, long long length);
  int mtd_del_partition(struct mtd_info *master, int partno);
@@ -98,6 +92,3 @@ index 356e29815aa2..c0937ff4797b 100644
  uint64_t mtd_get_device_size(const struct mtd_info *mtd);
  extern void __weak arch_split_mtd_part(struct mtd_info *master,
  				       const char *name, int offset, int size);
--- 
-2.11.0
-

+ 3 - 10
target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch

@@ -8,8 +8,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  include/linux/mtd/mtd.h |  4 +++
  2 files changed, 85 insertions(+), 9 deletions(-)
 
-diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
-index fce83882fd4e..0238b0babe2f 100644
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
 @@ -36,6 +36,8 @@
@@ -21,7 +19,7 @@ index fce83882fd4e..0238b0babe2f 100644
  /* Our partition linked list */
  static LIST_HEAD(mtd_partitions);
  static DEFINE_MUTEX(mtd_partitions_mutex);
-@@ -241,13 +243,61 @@ static int part_erase(struct mtd_info *mtd, struct erase_info *instr)
+@@ -241,13 +243,61 @@ static int part_erase(struct mtd_info *m
  	struct mtd_part *part = mtd_to_part(mtd);
  	int ret;
  
@@ -83,7 +81,7 @@ index fce83882fd4e..0238b0babe2f 100644
  	return ret;
  }
  
-@@ -255,6 +305,25 @@ void mtd_erase_callback(struct erase_info *instr)
+@@ -255,6 +305,25 @@ void mtd_erase_callback(struct erase_inf
  {
  	if (instr->mtd->_erase == part_erase) {
  		struct mtd_part *part = mtd_to_part(instr->mtd);
@@ -109,7 +107,7 @@ index fce83882fd4e..0238b0babe2f 100644
  
  		if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN)
  			instr->fail_addr -= part->offset;
-@@ -590,19 +659,22 @@ static struct mtd_part *allocate_partition(struct mtd_info *parent,
+@@ -590,19 +659,22 @@ static struct mtd_part *allocate_partiti
  	remainder = do_div(tmp, wr_alignment);
  	if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
  		/* Doesn't start on a boundary of major erase size */
@@ -141,8 +139,6 @@ index fce83882fd4e..0238b0babe2f 100644
  	}
  
  	mtd_set_ooblayout(&slave->mtd, &part_ooblayout_ops);
-diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
-index e7d5091bb447..0db85491f085 100644
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
 @@ -55,6 +55,10 @@ struct erase_info {
@@ -156,6 +152,3 @@ index e7d5091bb447..0db85491f085 100644
  };
  
  struct mtd_erase_region_info {
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/412-mtd-partial_eraseblock_unlock.patch

@@ -18,11 +18,9 @@ Signed-off-by: Tim Harvey <[email protected]>
  drivers/mtd/mtdpart.c | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
-index 0238b0babe2f..d41418524833 100644
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -343,7 +343,16 @@ static int part_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
+@@ -343,7 +343,16 @@ static int part_lock(struct mtd_info *mt
  static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
  {
  	struct mtd_part *part = mtd_to_part(mtd);
@@ -40,6 +38,3 @@ index 0238b0babe2f..d41418524833 100644
  }
  
  static int part_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/420-mtd-redboot_space.patch

@@ -9,11 +9,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/mtd/redboot.c | 19 +++++++++++++------
  1 file changed, 13 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
-index 7623ac5fc586..181ea0fb3c91 100644
 --- a/drivers/mtd/redboot.c
 +++ b/drivers/mtd/redboot.c
-@@ -265,14 +265,21 @@ static int parse_redboot_partitions(struct mtd_info *master,
+@@ -265,14 +265,21 @@ static int parse_redboot_partitions(stru
  #endif
  		names += strlen(names)+1;
  
@@ -41,6 +39,3 @@ index 7623ac5fc586..181ea0fb3c91 100644
  		tmp_fl = fl;
  		fl = fl->next;
  		kfree(tmp_fl);
--- 
-2.11.0
-

+ 0 - 7
target/linux/generic/pending-4.9/430-mtd-add-myloader-partition-parser.patch

@@ -10,8 +10,6 @@ Signed-off-by: Florian Fainelli <[email protected]>
  drivers/mtd/Makefile |  1 +
  2 files changed, 17 insertions(+)
 
-diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
-index 4185e04760dd..cb55144d4db6 100644
 --- a/drivers/mtd/Kconfig
 +++ b/drivers/mtd/Kconfig
 @@ -178,6 +178,22 @@ menu "Partition parsers"
@@ -37,8 +35,6 @@ index 4185e04760dd..cb55144d4db6 100644
  comment "User Modules And Translation Layers"
  
  #
-diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
-index 48fd01e9f6e3..5bca69c63bdc 100644
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
 @@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)	+= afs.o
@@ -49,6 +45,3 @@ index 48fd01e9f6e3..5bca69c63bdc 100644
  obj-y				+= parsers/
  
  # 'Users' - code which presents functionality to userspace.
--- 
-2.11.0
-

+ 9 - 14
target/linux/generic/pending-4.9/440-block2mtd_init.patch

@@ -6,8 +6,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/mtd/devices/block2mtd.c | 30 ++++++++++++++++++++----------
  1 file changed, 20 insertions(+), 10 deletions(-)
 
-diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
-index 7c887f111a7d..22135cc48879 100644
 --- a/drivers/mtd/devices/block2mtd.c
 +++ b/drivers/mtd/devices/block2mtd.c
 @@ -26,6 +26,7 @@
@@ -18,7 +16,7 @@ index 7c887f111a7d..22135cc48879 100644
  #include <linux/mutex.h>
  #include <linux/mount.h>
  #include <linux/slab.h>
-@@ -219,7 +220,7 @@ static void block2mtd_free_device(struct block2mtd_dev *dev)
+@@ -219,7 +220,7 @@ static void block2mtd_free_device(struct
  
  
  static struct block2mtd_dev *add_device(char *devname, int erase_size,
@@ -27,7 +25,7 @@ index 7c887f111a7d..22135cc48879 100644
  {
  #ifndef MODULE
  	int i;
-@@ -227,6 +228,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size,
+@@ -227,6 +228,7 @@ static struct block2mtd_dev *add_device(
  	const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
  	struct block_device *bdev = ERR_PTR(-ENODEV);
  	struct block2mtd_dev *dev;
@@ -35,7 +33,7 @@ index 7c887f111a7d..22135cc48879 100644
  	char *name;
  
  	if (!devname)
-@@ -283,13 +285,16 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size,
+@@ -283,13 +285,16 @@ static struct block2mtd_dev *add_device(
  
  	/* Setup the MTD structure */
  	/* make the name contain the block device in */
@@ -54,7 +52,7 @@ index 7c887f111a7d..22135cc48879 100644
  	dev->mtd.erasesize = erase_size;
  	dev->mtd.writesize = 1;
  	dev->mtd.writebufsize = PAGE_SIZE;
-@@ -302,7 +307,11 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size,
+@@ -302,7 +307,11 @@ static struct block2mtd_dev *add_device(
  	dev->mtd.priv = dev;
  	dev->mtd.owner = THIS_MODULE;
  
@@ -67,7 +65,7 @@ index 7c887f111a7d..22135cc48879 100644
  		/* Device didn't get added, so free the entry */
  		goto err_destroy_mutex;
  	}
-@@ -310,8 +319,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size,
+@@ -310,8 +319,7 @@ static struct block2mtd_dev *add_device(
  	list_add(&dev->list, &blkmtd_device_list);
  	pr_info("mtd%d: [%s] erase_size = %dKiB [%d]\n",
  		dev->mtd.index,
@@ -77,7 +75,7 @@ index 7c887f111a7d..22135cc48879 100644
  	return dev;
  
  err_destroy_mutex:
-@@ -384,7 +392,7 @@ static int block2mtd_setup2(const char *val)
+@@ -384,7 +392,7 @@ static int block2mtd_setup2(const char *
  	/* 80 for device, 12 for erase size, 80 for name, 8 for timeout */
  	char buf[80 + 12 + 80 + 8];
  	char *str = buf;
@@ -86,7 +84,7 @@ index 7c887f111a7d..22135cc48879 100644
  	char *name;
  	size_t erase_size = PAGE_SIZE;
  	unsigned long timeout = MTD_DEFAULT_TIMEOUT;
-@@ -398,7 +406,7 @@ static int block2mtd_setup2(const char *val)
+@@ -398,7 +406,7 @@ static int block2mtd_setup2(const char *
  	strcpy(str, val);
  	kill_final_newline(str);
  
@@ -95,7 +93,7 @@ index 7c887f111a7d..22135cc48879 100644
  		token[i] = strsep(&str, ",");
  
  	if (str) {
-@@ -424,8 +432,10 @@ static int block2mtd_setup2(const char *val)
+@@ -424,8 +432,10 @@ static int block2mtd_setup2(const char *
  			return 0;
  		}
  	}
@@ -107,7 +105,7 @@ index 7c887f111a7d..22135cc48879 100644
  
  	return 0;
  }
-@@ -459,7 +469,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
+@@ -459,7 +469,7 @@ static int block2mtd_setup(const char *v
  
  
  module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
@@ -116,6 +114,3 @@ index 7c887f111a7d..22135cc48879 100644
  
  static int __init block2mtd_init(void)
  {
--- 
-2.11.0
-

+ 4 - 9
target/linux/generic/pending-4.9/441-block2mtd_probe.patch

@@ -6,11 +6,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/mtd/devices/block2mtd.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
-index 22135cc48879..9865041c347b 100644
 --- a/drivers/mtd/devices/block2mtd.c
 +++ b/drivers/mtd/devices/block2mtd.c
-@@ -392,7 +392,7 @@ static int block2mtd_setup2(const char *val)
+@@ -392,7 +392,7 @@ static int block2mtd_setup2(const char *
  	/* 80 for device, 12 for erase size, 80 for name, 8 for timeout */
  	char buf[80 + 12 + 80 + 8];
  	char *str = buf;
@@ -19,7 +17,7 @@ index 22135cc48879..9865041c347b 100644
  	char *name;
  	size_t erase_size = PAGE_SIZE;
  	unsigned long timeout = MTD_DEFAULT_TIMEOUT;
-@@ -406,7 +406,7 @@ static int block2mtd_setup2(const char *val)
+@@ -406,7 +406,7 @@ static int block2mtd_setup2(const char *
  	strcpy(str, val);
  	kill_final_newline(str);
  
@@ -28,7 +26,7 @@ index 22135cc48879..9865041c347b 100644
  		token[i] = strsep(&str, ",");
  
  	if (str) {
-@@ -435,6 +435,9 @@ static int block2mtd_setup2(const char *val)
+@@ -435,6 +435,9 @@ static int block2mtd_setup2(const char *
  	if (token[2] && (strlen(token[2]) + 1 > 80))
  		pr_err("mtd device name too long\n");
  
@@ -38,7 +36,7 @@ index 22135cc48879..9865041c347b 100644
  	add_device(name, erase_size, token[2], timeout);
  
  	return 0;
-@@ -469,7 +472,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
+@@ -469,7 +472,7 @@ static int block2mtd_setup(const char *v
  
  
  module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
@@ -47,6 +45,3 @@ index 22135cc48879..9865041c347b 100644
  
  static int __init block2mtd_init(void)
  {
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/460-mtd-cfi_cmdset_0002-no-erase_suspend.patch

@@ -12,11 +12,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/mtd/chips/cfi_cmdset_0002.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
-index 9dca881bb378..ea4db1917334 100644
 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -807,7 +807,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
+@@ -807,7 +807,7 @@ static int get_chip(struct map_info *map
  		return 0;
  
  	case FL_ERASING:
@@ -25,6 +23,3 @@ index 9dca881bb378..ea4db1917334 100644
  		    !(mode == FL_READY || mode == FL_POINT ||
  		    (mode == FL_WRITING && (cfip->EraseSuspend & 0x2))))
  			goto sleep;
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/465-m25p80-mx-disable-software-protection.patch

@@ -6,11 +6,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/mtd/spi-nor/spi-nor.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
-index 54868b19bf32..30adbc34ccac 100644
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1588,6 +1588,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
+@@ -1595,6 +1595,7 @@ int spi_nor_scan(struct spi_nor *nor, co
  
  	if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
  	    JEDEC_MFR(info) == SNOR_MFR_INTEL ||
@@ -18,6 +16,3 @@ index 54868b19bf32..30adbc34ccac 100644
  	    JEDEC_MFR(info) == SNOR_MFR_SST ||
  	    info->flags & SPI_NOR_HAS_LOCK) {
  		write_enable(nor);
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/476-mtd-spi-nor-add-eon-en25q128.patch

@@ -6,11 +6,9 @@ Signed-off-by: Piotr Dymacz <[email protected]>
  drivers/mtd/spi-nor/spi-nor.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
-index 30adbc34ccac..8c0ad628ddc6 100644
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -954,6 +954,7 @@ static const struct flash_info spi_nor_ids[] = {
+@@ -954,6 +954,7 @@ static const struct flash_info spi_nor_i
  	{ "en25q32b",   INFO(0x1c3016, 0, 64 * 1024,   64, 0) },
  	{ "en25p64",    INFO(0x1c2017, 0, 64 * 1024,  128, 0) },
  	{ "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
@@ -18,6 +16,3 @@ index 30adbc34ccac..8c0ad628ddc6 100644
  	{ "en25qh128",  INFO(0x1c7018, 0, 64 * 1024,  256, 0) },
  	{ "en25qh256",  INFO(0x1c7019, 0, 64 * 1024,  512, 0) },
  	{ "en25s64",	INFO(0x1c3817, 0, 64 * 1024,  128, SECT_4K) },
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/477-mtd-add-spi-nor-add-mx25u3235f.patch

@@ -6,11 +6,9 @@ Signed-off-by: André Valentin <[email protected]>
  drivers/mtd/spi-nor/spi-nor.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
-index 8c0ad628ddc6..5288fcfbdb3b 100644
 --- a/drivers/mtd/spi-nor/spi-nor.c
 +++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1014,6 +1014,7 @@ static const struct flash_info spi_nor_ids[] = {
+@@ -1014,6 +1014,7 @@ static const struct flash_info spi_nor_i
  	{ "mx25l3205d",  INFO(0xc22016, 0, 64 * 1024,  64, SECT_4K) },
  	{ "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64, SECT_4K) },
  	{ "mx25l6405d",  INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
@@ -18,6 +16,3 @@ index 8c0ad628ddc6..5288fcfbdb3b 100644
  	{ "mx25u6435f",  INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) },
  	{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
  	{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/pending-4.9/480-mtd-set-rootfs-to-be-root-dev.patch

@@ -10,8 +10,6 @@ Signed-off-by: Gabor Juhos <[email protected]>
  drivers/mtd/mtdcore.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
 
-diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
-index d46e4adf6d2b..4d62d898dadc 100644
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
 @@ -40,6 +40,7 @@
@@ -38,6 +36,3 @@ index d46e4adf6d2b..4d62d898dadc 100644
  	return 0;
  
  fail_added:
--- 
-2.11.0
-

+ 1 - 8
target/linux/generic/pending-4.9/494-mtd-ubi-add-EOF-marker-support.patch

@@ -7,8 +7,6 @@ Signed-off-by: Gabor Juhos <[email protected]>
  drivers/mtd/ubi/ubi.h    |  1 +
  2 files changed, 23 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
-index 93ceea4f27d5..a4f849d69104 100644
 --- a/drivers/mtd/ubi/attach.c
 +++ b/drivers/mtd/ubi/attach.c
 @@ -939,6 +939,13 @@ static bool vol_ignored(int vol_id)
@@ -25,7 +23,7 @@ index 93ceea4f27d5..a4f849d69104 100644
  /**
   * scan_peb - scan and process UBI headers of a PEB.
   * @ubi: UBI device description object
-@@ -971,9 +978,21 @@ static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai,
+@@ -971,9 +978,21 @@ static int scan_peb(struct ubi_device *u
  		return 0;
  	}
  
@@ -50,8 +48,6 @@ index 93ceea4f27d5..a4f849d69104 100644
  	switch (err) {
  	case 0:
  		break;
-diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
-index 697dbcba7371..92d207ff2458 100644
 --- a/drivers/mtd/ubi/ubi.h
 +++ b/drivers/mtd/ubi/ubi.h
 @@ -779,6 +779,7 @@ struct ubi_attach_info {
@@ -62,6 +58,3 @@ index 697dbcba7371..92d207ff2458 100644
  	struct kmem_cache *aeb_slab_cache;
  	struct ubi_ec_hdr *ech;
  	struct ubi_vid_io_buf *vidb;
--- 
-2.11.0
-

+ 1 - 53
target/linux/generic/pending-4.9/530-jffs2_make_lzma_available.patch

@@ -36,8 +36,6 @@ Signed-off-by: Alexandros C. Couloumbis <[email protected]>
  create mode 100644 lib/lzma/LzmaEnc.c
  create mode 100644 lib/lzma/Makefile
 
-diff --git a/fs/jffs2/Kconfig b/fs/jffs2/Kconfig
-index d8bb6c411e96..74bf4b162e36 100644
 --- a/fs/jffs2/Kconfig
 +++ b/fs/jffs2/Kconfig
 @@ -139,6 +139,15 @@ config JFFS2_LZO
@@ -56,11 +54,9 @@ index d8bb6c411e96..74bf4b162e36 100644
  config JFFS2_RTIME
  	bool "JFFS2 RTIME compression support" if JFFS2_COMPRESSION_OPTIONS
  	depends on JFFS2_FS
-diff --git a/fs/jffs2/Makefile b/fs/jffs2/Makefile
-index 60e5d49ca03e..23ba6efd1f3f 100644
 --- a/fs/jffs2/Makefile
 +++ b/fs/jffs2/Makefile
-@@ -18,4 +18,7 @@ jffs2-$(CONFIG_JFFS2_RUBIN)	+= compr_rubin.o
+@@ -18,4 +18,7 @@ jffs2-$(CONFIG_JFFS2_RUBIN)	+= compr_rub
  jffs2-$(CONFIG_JFFS2_RTIME)	+= compr_rtime.o
  jffs2-$(CONFIG_JFFS2_ZLIB)	+= compr_zlib.o
  jffs2-$(CONFIG_JFFS2_LZO)	+= compr_lzo.o
@@ -68,8 +64,6 @@ index 60e5d49ca03e..23ba6efd1f3f 100644
  jffs2-$(CONFIG_JFFS2_SUMMARY)   += summary.o
 +
 +CFLAGS_compr_lzma.o += -Iinclude/linux -Ilib/lzma
-diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
-index 4849a4c9a0e2..6ec806abb7b9 100644
 --- a/fs/jffs2/compr.c
 +++ b/fs/jffs2/compr.c
 @@ -378,6 +378,9 @@ int __init jffs2_compressors_init(void)
@@ -92,8 +86,6 @@ index 4849a4c9a0e2..6ec806abb7b9 100644
  #ifdef CONFIG_JFFS2_LZO
  	jffs2_lzo_exit();
  #endif
-diff --git a/fs/jffs2/compr.h b/fs/jffs2/compr.h
-index 5e91d578f4ed..32db2e1ec610 100644
 --- a/fs/jffs2/compr.h
 +++ b/fs/jffs2/compr.h
 @@ -29,9 +29,9 @@
@@ -119,9 +111,6 @@ index 5e91d578f4ed..32db2e1ec610 100644
 +#endif
  
  #endif /* __JFFS2_COMPR_H__ */
-diff --git a/fs/jffs2/compr_lzma.c b/fs/jffs2/compr_lzma.c
-new file mode 100644
-index 000000000000..0fe3b75d7dcc
 --- /dev/null
 +++ b/fs/jffs2/compr_lzma.c
 @@ -0,0 +1,128 @@
@@ -253,8 +242,6 @@ index 000000000000..0fe3b75d7dcc
 +	jffs2_unregister_compressor(&jffs2_lzma_comp);
 +	lzma_free_workspace();
 +}
-diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
-index 5ef21f4c4c77..62e730216e7d 100644
 --- a/fs/jffs2/super.c
 +++ b/fs/jffs2/super.c
 @@ -372,14 +372,41 @@ static int __init init_jffs2_fs(void)
@@ -302,9 +289,6 @@ index 5ef21f4c4c77..62e730216e7d 100644
  
  	jffs2_inode_cachep = kmem_cache_create("jffs2_i",
  					     sizeof(struct jffs2_inode_info),
-diff --git a/include/linux/lzma.h b/include/linux/lzma.h
-new file mode 100644
-index 000000000000..5f31334dfc31
 --- /dev/null
 +++ b/include/linux/lzma.h
 @@ -0,0 +1,62 @@
@@ -370,9 +354,6 @@ index 000000000000..5f31334dfc31
 +static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
 +
 +#endif
-diff --git a/include/linux/lzma/LzFind.h b/include/linux/lzma/LzFind.h
-new file mode 100644
-index 000000000000..010c4b92ba33
 --- /dev/null
 +++ b/include/linux/lzma/LzFind.h
 @@ -0,0 +1,115 @@
@@ -491,9 +472,6 @@ index 000000000000..010c4b92ba33
 +#endif
 +
 +#endif
-diff --git a/include/linux/lzma/LzHash.h b/include/linux/lzma/LzHash.h
-new file mode 100644
-index 000000000000..f3e89966cc70
 --- /dev/null
 +++ b/include/linux/lzma/LzHash.h
 @@ -0,0 +1,54 @@
@@ -551,9 +529,6 @@ index 000000000000..f3e89966cc70
 +  hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
 +
 +#endif
-diff --git a/include/linux/lzma/LzmaDec.h b/include/linux/lzma/LzmaDec.h
-new file mode 100644
-index 000000000000..bf7f084ba3dd
 --- /dev/null
 +++ b/include/linux/lzma/LzmaDec.h
 @@ -0,0 +1,231 @@
@@ -788,9 +763,6 @@ index 000000000000..bf7f084ba3dd
 +#endif
 +
 +#endif
-diff --git a/include/linux/lzma/LzmaEnc.h b/include/linux/lzma/LzmaEnc.h
-new file mode 100644
-index 000000000000..200d60eb83cd
 --- /dev/null
 +++ b/include/linux/lzma/LzmaEnc.h
 @@ -0,0 +1,80 @@
@@ -874,9 +846,6 @@ index 000000000000..200d60eb83cd
 +#endif
 +
 +#endif
-diff --git a/include/linux/lzma/Types.h b/include/linux/lzma/Types.h
-new file mode 100644
-index 000000000000..4751acde0722
 --- /dev/null
 +++ b/include/linux/lzma/Types.h
 @@ -0,0 +1,226 @@
@@ -1106,8 +1075,6 @@ index 000000000000..4751acde0722
 +EXTERN_C_END
 +
 +#endif
-diff --git a/include/uapi/linux/jffs2.h b/include/uapi/linux/jffs2.h
-index a18b719f49d4..f3431a5ff4ff 100644
 --- a/include/uapi/linux/jffs2.h
 +++ b/include/uapi/linux/jffs2.h
 @@ -46,6 +46,7 @@
@@ -1118,8 +1085,6 @@ index a18b719f49d4..f3431a5ff4ff 100644
  /* Compatibility flags. */
  #define JFFS2_COMPAT_MASK 0xc000      /* What do to if an unknown nodetype is found */
  #define JFFS2_NODE_ACCURATE 0x2000
-diff --git a/lib/Kconfig b/lib/Kconfig
-index 260a80e313b9..2e20b2b1ba02 100644
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
 @@ -241,6 +241,12 @@ config LZ4_DECOMPRESS
@@ -1135,8 +1100,6 @@ index 260a80e313b9..2e20b2b1ba02 100644
  #
  # These all provide a common interface (hence the apparent duplication with
  # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
-diff --git a/lib/Makefile b/lib/Makefile
-index 50144a3aeebd..603630df298d 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -2,6 +2,16 @@
@@ -1165,9 +1128,6 @@ index 50144a3aeebd..603630df298d 100644
  
  lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
  lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
-diff --git a/lib/lzma/LzFind.c b/lib/lzma/LzFind.c
-new file mode 100644
-index 000000000000..e3ecb05420eb
 --- /dev/null
 +++ b/lib/lzma/LzFind.c
 @@ -0,0 +1,761 @@
@@ -1932,9 +1892,6 @@ index 000000000000..e3ecb05420eb
 +    vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
 +  }
 +}
-diff --git a/lib/lzma/LzmaDec.c b/lib/lzma/LzmaDec.c
-new file mode 100644
-index 000000000000..2036761bf146
 --- /dev/null
 +++ b/lib/lzma/LzmaDec.c
 @@ -0,0 +1,999 @@
@@ -2937,9 +2894,6 @@ index 000000000000..2036761bf146
 +  LzmaDec_FreeProbs(&p, alloc);
 +  return res;
 +}
-diff --git a/lib/lzma/LzmaEnc.c b/lib/lzma/LzmaEnc.c
-new file mode 100644
-index 000000000000..6dadf00dfab2
 --- /dev/null
 +++ b/lib/lzma/LzmaEnc.c
 @@ -0,0 +1,2271 @@
@@ -5214,9 +5168,6 @@ index 000000000000..6dadf00dfab2
 +  LzmaEnc_Destroy(p, alloc, allocBig);
 +  return res;
 +}
-diff --git a/lib/lzma/Makefile b/lib/lzma/Makefile
-new file mode 100644
-index 000000000000..02e799c99381
 --- /dev/null
 +++ b/lib/lzma/Makefile
 @@ -0,0 +1,7 @@
@@ -5227,6 +5178,3 @@ index 000000000000..02e799c99381
 +obj-$(CONFIG_LZMA_DECOMPRESS) += lzma_decompress.o
 +
 +EXTRA_CFLAGS += -Iinclude/linux -Iinclude/linux/lzma -include types.h
--- 
-2.11.0
-

+ 3 - 10
target/linux/generic/pending-4.9/532-jffs2_eofdetect.patch

@@ -7,11 +7,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  fs/jffs2/scan.c  | 21 +++++++++++++++++++--
  2 files changed, 29 insertions(+), 2 deletions(-)
 
-diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
-index b288c8ae1236..e768f9d41661 100644
 --- a/fs/jffs2/build.c
 +++ b/fs/jffs2/build.c
-@@ -117,6 +117,16 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c)
+@@ -117,6 +117,16 @@ static int jffs2_build_filesystem(struct
  	dbg_fsbuild("scanned flash completely\n");
  	jffs2_dbg_dump_block_lists_nolock(c);
  
@@ -28,11 +26,9 @@ index b288c8ae1236..e768f9d41661 100644
  	dbg_fsbuild("pass 1 starting\n");
  	c->flags |= JFFS2_SB_FLAG_BUILDING;
  	/* Now scan the directory tree, increasing nlink according to every dirent found. */
-diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
-index 90431dd613b8..8c78ab19cdab 100644
 --- a/fs/jffs2/scan.c
 +++ b/fs/jffs2/scan.c
-@@ -148,8 +148,14 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
+@@ -148,8 +148,14 @@ int jffs2_scan_medium(struct jffs2_sb_in
  		/* reset summary info for next eraseblock scan */
  		jffs2_sum_reset_collected(s);
  
@@ -49,7 +45,7 @@ index 90431dd613b8..8c78ab19cdab 100644
  
  		if (ret < 0)
  			goto out;
-@@ -561,6 +567,17 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
+@@ -561,6 +567,17 @@ full_scan:
  			return err;
  	}
  
@@ -67,6 +63,3 @@ index 90431dd613b8..8c78ab19cdab 100644
  	/* We temporarily use 'ofs' as a pointer into the buffer/jeb */
  	ofs = 0;
  	max_ofs = EMPTY_SCAN_SIZE(c->sector_size);
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/551-ubifs-fix-default-compression-selection.patch

@@ -6,8 +6,6 @@ Signed-off-by: Gabor Juhos <[email protected]>
  fs/ubifs/sb.c | 13 ++++++++++++-
  1 file changed, 12 insertions(+), 1 deletion(-)
 
-diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
-index 3cbb904a6d7d..460cb9e3b4ea 100644
 --- a/fs/ubifs/sb.c
 +++ b/fs/ubifs/sb.c
 @@ -63,6 +63,17 @@
@@ -28,7 +26,7 @@ index 3cbb904a6d7d..460cb9e3b4ea 100644
  /**
   * create_default_filesystem - format empty UBI volume.
   * @c: UBIFS file-system description object
-@@ -183,7 +194,7 @@ static int create_default_filesystem(struct ubifs_info *c)
+@@ -183,7 +194,7 @@ static int create_default_filesystem(str
  	if (c->mount_opts.override_compr)
  		sup->default_compr = cpu_to_le16(c->mount_opts.compr_type);
  	else
@@ -37,6 +35,3 @@ index 3cbb904a6d7d..460cb9e3b4ea 100644
  
  	generate_random_uuid(sup->uuid);
  
--- 
-2.11.0
-

+ 2 - 7
target/linux/generic/pending-4.9/600-netfilter_conntrack_flush.patch

@@ -7,8 +7,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/netfilter/nf_conntrack_standalone.c | 59 ++++++++++++++++++++++++++++++++-
  1 file changed, 58 insertions(+), 1 deletion(-)
 
-diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
-index 5f446cd9f3fd..4c1856b5151f 100644
 --- a/net/netfilter/nf_conntrack_standalone.c
 +++ b/net/netfilter/nf_conntrack_standalone.c
 @@ -17,6 +17,7 @@
@@ -19,7 +17,7 @@ index 5f446cd9f3fd..4c1856b5151f 100644
  #include <net/net_namespace.h>
  #ifdef CONFIG_SYSCTL
  #include <linux/sysctl.h>
-@@ -298,10 +299,66 @@ static int ct_open(struct inode *inode, struct file *file)
+@@ -298,10 +299,66 @@ static int ct_open(struct inode *inode,
  			sizeof(struct ct_iter_state));
  }
  
@@ -86,7 +84,7 @@ index 5f446cd9f3fd..4c1856b5151f 100644
  	.llseek  = seq_lseek,
  	.release = seq_release_net,
  };
-@@ -405,7 +462,7 @@ static int nf_conntrack_standalone_init_proc(struct net *net)
+@@ -405,7 +462,7 @@ static int nf_conntrack_standalone_init_
  	kuid_t root_uid;
  	kgid_t root_gid;
  
@@ -95,6 +93,3 @@ index 5f446cd9f3fd..4c1856b5151f 100644
  	if (!pde)
  		goto out_nf_conntrack;
  
--- 
-2.11.0
-

+ 6 - 13
target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch

@@ -7,8 +7,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/ipv4/netfilter/ip_tables.c                | 37 +++++++++++++++++++++++++++
  2 files changed, 38 insertions(+)
 
-diff --git a/include/uapi/linux/netfilter_ipv4/ip_tables.h b/include/uapi/linux/netfilter_ipv4/ip_tables.h
-index d0da53d96d93..f279daa13c0f 100644
 --- a/include/uapi/linux/netfilter_ipv4/ip_tables.h
 +++ b/include/uapi/linux/netfilter_ipv4/ip_tables.h
 @@ -88,6 +88,7 @@ struct ipt_ip {
@@ -19,8 +17,6 @@ index d0da53d96d93..f279daa13c0f 100644
  
  /* Values for "inv" field in struct ipt_ip. */
  #define IPT_INV_VIA_IN		0x01	/* Invert the sense of IN IFACE. */
-diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
-index 7c00ce90adb8..d919350a0e8b 100644
 --- a/net/ipv4/netfilter/ip_tables.c
 +++ b/net/ipv4/netfilter/ip_tables.c
 @@ -58,6 +58,9 @@ ip_packet_match(const struct iphdr *ip,
@@ -63,7 +59,7 @@ index 7c00ce90adb8..d919350a0e8b 100644
  static bool
  ip_checkentry(const struct ipt_ip *ip)
  {
-@@ -545,6 +571,8 @@ find_check_entry(struct ipt_entry *e, struct net *net, const char *name,
+@@ -545,6 +571,8 @@ find_check_entry(struct ipt_entry *e, st
  	struct xt_entry_match *ematch;
  	unsigned long pcnt;
  
@@ -72,7 +68,7 @@ index 7c00ce90adb8..d919350a0e8b 100644
  	pcnt = xt_percpu_counter_alloc();
  	if (IS_ERR_VALUE(pcnt))
  		return -ENOMEM;
-@@ -824,6 +852,7 @@ copy_entries_to_user(unsigned int total_size,
+@@ -824,6 +852,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -80,10 +76,11 @@ index 7c00ce90adb8..d919350a0e8b 100644
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -851,6 +880,14 @@ copy_entries_to_user(unsigned int total_size,
+@@ -850,6 +879,14 @@ copy_entries_to_user(unsigned int total_
+ 			ret = -EFAULT;
  			goto free_counters;
  		}
- 
++
 +		flags = e->ip.flags & IPT_F_MASK;
 +		if (copy_to_user(userptr + off
 +				 + offsetof(struct ipt_entry, ip.flags),
@@ -91,10 +88,6 @@ index 7c00ce90adb8..d919350a0e8b 100644
 +			ret = -EFAULT;
 +			goto free_counters;
 +		}
-+
+ 
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
- 		     i += m->u.match_size) {
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/611-netfilter_match_bypass_default_table.patch

@@ -6,11 +6,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/ipv4/netfilter/ip_tables.c | 79 +++++++++++++++++++++++++++++++-----------
  1 file changed, 58 insertions(+), 21 deletions(-)
 
-diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
-index d919350a0e8b..9178930fca17 100644
 --- a/net/ipv4/netfilter/ip_tables.c
 +++ b/net/ipv4/netfilter/ip_tables.c
-@@ -254,6 +254,33 @@ struct ipt_entry *ipt_next_entry(const struct ipt_entry *entry)
+@@ -254,6 +254,33 @@ struct ipt_entry *ipt_next_entry(const s
  	return (void *)entry + entry->next_offset;
  }
  
@@ -119,6 +117,3 @@ index d919350a0e8b..9178930fca17 100644
  
  	do {
  		const struct xt_entry_target *t;
--- 
-2.11.0
-

+ 0 - 5
target/linux/generic/pending-4.9/612-netfilter_match_reduce_memory_access.patch

@@ -6,8 +6,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/ipv4/netfilter/ip_tables.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
-index 9178930fca17..35d1db7b78f1 100644
 --- a/net/ipv4/netfilter/ip_tables.c
 +++ b/net/ipv4/netfilter/ip_tables.c
 @@ -61,9 +61,9 @@ ip_packet_match(const struct iphdr *ip,
@@ -22,6 +20,3 @@ index 9178930fca17..35d1db7b78f1 100644
  		    (ip->daddr & ipinfo->dmsk.s_addr) != ipinfo->dst.s_addr))
  		return false;
  
--- 
-2.11.0
-

+ 2 - 7
target/linux/generic/pending-4.9/613-netfilter_optional_tcp_window_check.patch

@@ -6,8 +6,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/netfilter/nf_conntrack_proto_tcp.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)
 
-diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
-index 69f687740c76..f24b62668dc8 100644
 --- a/net/netfilter/nf_conntrack_proto_tcp.c
 +++ b/net/netfilter/nf_conntrack_proto_tcp.c
 @@ -33,6 +33,9 @@
@@ -20,7 +18,7 @@ index 69f687740c76..f24b62668dc8 100644
  /* "Be conservative in what you do,
      be liberal in what you accept from others."
      If it's non-zero, we mark only out of window RST segments as INVALID. */
-@@ -513,6 +516,9 @@ static bool tcp_in_window(const struct nf_conn *ct,
+@@ -513,6 +516,9 @@ static bool tcp_in_window(const struct n
  	s32 receiver_offset;
  	bool res, in_recv_win;
  
@@ -30,7 +28,7 @@ index 69f687740c76..f24b62668dc8 100644
  	/*
  	 * Get the required data from the packet.
  	 */
-@@ -1479,6 +1485,13 @@ static struct ctl_table tcp_sysctl_table[] = {
+@@ -1479,6 +1485,13 @@ static struct ctl_table tcp_sysctl_table
  		.mode		= 0644,
  		.proc_handler	= proc_dointvec,
  	},
@@ -44,6 +42,3 @@ index 69f687740c76..f24b62668dc8 100644
  	{ }
  };
  #endif /* CONFIG_SYSCTL */
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/616-net_optimize_xfrm_calls.patch

@@ -6,11 +6,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/netfilter/nf_nat_core.c | 3 +++
  1 file changed, 3 insertions(+)
 
-diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
-index 5b9c884a452e..4ea363755085 100644
 --- a/net/netfilter/nf_nat_core.c
 +++ b/net/netfilter/nf_nat_core.c
-@@ -95,6 +95,9 @@ int nf_xfrm_me_harder(struct net *net, struct sk_buff *skb, unsigned int family)
+@@ -95,6 +95,9 @@ int nf_xfrm_me_harder(struct net *net, s
  	struct dst_entry *dst;
  	int err;
  
@@ -20,6 +18,3 @@ index 5b9c884a452e..4ea363755085 100644
  	err = xfrm_decode_session(skb, &fl, family);
  	if (err < 0)
  		return err;
--- 
-2.11.0
-

+ 8 - 17
target/linux/generic/pending-4.9/630-packet_socket_type.patch

@@ -9,8 +9,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/packet/internal.h          |  1 +
  3 files changed, 31 insertions(+), 7 deletions(-)
 
-diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
-index 9e7edfd8141e..40fdf8907900 100644
 --- a/include/uapi/linux/if_packet.h
 +++ b/include/uapi/linux/if_packet.h
 @@ -31,6 +31,8 @@ struct sockaddr_ll {
@@ -30,11 +28,9 @@ index 9e7edfd8141e..40fdf8907900 100644
  
  #define PACKET_FANOUT_HASH		0
  #define PACKET_FANOUT_LB		1
-diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
-index 6a563e6e24de..e412c5a4f6d4 100644
 --- a/net/packet/af_packet.c
 +++ b/net/packet/af_packet.c
-@@ -1772,6 +1772,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
+@@ -1772,6 +1772,7 @@ static int packet_rcv_spkt(struct sk_buf
  {
  	struct sock *sk;
  	struct sockaddr_pkt *spkt;
@@ -42,7 +38,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  
  	/*
  	 *	When we registered the protocol we saved the socket in the data
-@@ -1779,6 +1780,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
+@@ -1779,6 +1780,7 @@ static int packet_rcv_spkt(struct sk_buf
  	 */
  
  	sk = pt->af_packet_priv;
@@ -50,7 +46,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  
  	/*
  	 *	Yank back the headers [hope the device set this
-@@ -1791,7 +1793,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
+@@ -1791,7 +1793,7 @@ static int packet_rcv_spkt(struct sk_buf
  	 *	so that this procedure is noop.
  	 */
  
@@ -59,7 +55,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  		goto out;
  
  	if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2029,12 +2031,12 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
+@@ -2029,12 +2031,12 @@ static int packet_rcv(struct sk_buff *sk
  	unsigned int snaplen, res;
  	bool is_drop_n_account = false;
  
@@ -75,7 +71,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -2159,12 +2161,12 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
+@@ -2159,12 +2161,12 @@ static int tpacket_rcv(struct sk_buff *s
  	BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
  	BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
  
@@ -91,7 +87,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3234,6 +3236,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
+@@ -3234,6 +3236,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -99,7 +95,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3815,6 +3818,16 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
+@@ -3820,6 +3823,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -116,7 +112,7 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3867,6 +3880,13 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
+@@ -3872,6 +3885,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
@@ -130,8 +126,6 @@ index 6a563e6e24de..e412c5a4f6d4 100644
  	case PACKET_VERSION:
  		val = po->tp_version;
  		break;
-diff --git a/net/packet/internal.h b/net/packet/internal.h
-index 9ee46314b7d7..76c895fcf22f 100644
 --- a/net/packet/internal.h
 +++ b/net/packet/internal.h
 @@ -129,6 +129,7 @@ struct packet_sock {
@@ -142,6 +136,3 @@ index 9ee46314b7d7..76c895fcf22f 100644
  };
  
  static struct packet_sock *pkt_sk(struct sock *sk)
--- 
-2.11.0
-

+ 2 - 7
target/linux/generic/pending-4.9/650-pppoe_header_pad.patch

@@ -7,11 +7,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/net/ppp/pppoe.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
-index 4ddae8118c85..49ef11f92fc9 100644
 --- a/drivers/net/ppp/pppoe.c
 +++ b/drivers/net/ppp/pppoe.c
-@@ -861,7 +861,7 @@ static int pppoe_sendmsg(struct socket *sock, struct msghdr *m,
+@@ -861,7 +861,7 @@ static int pppoe_sendmsg(struct socket *
  		goto end;
  
  
@@ -20,7 +18,7 @@ index 4ddae8118c85..49ef11f92fc9 100644
  			   0, GFP_KERNEL);
  	if (!skb) {
  		error = -ENOMEM;
-@@ -869,7 +869,7 @@ static int pppoe_sendmsg(struct socket *sock, struct msghdr *m,
+@@ -869,7 +869,7 @@ static int pppoe_sendmsg(struct socket *
  	}
  
  	/* Reserve space for headers. */
@@ -29,6 +27,3 @@ index 4ddae8118c85..49ef11f92fc9 100644
  	skb_reset_network_header(skb);
  
  	skb->dev = dev;
--- 
-2.11.0
-

+ 1 - 6
target/linux/generic/pending-4.9/655-increase_skb_pad.patch

@@ -7,11 +7,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
  include/linux/skbuff.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 32810f279f8e..5f3343ae25ef 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -2298,7 +2298,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
+@@ -2298,7 +2298,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
@@ -20,6 +18,3 @@ index 32810f279f8e..5f3343ae25ef 100644
  #endif
  
  int ___pskb_trim(struct sk_buff *skb, unsigned int len);
--- 
-2.11.0
-

+ 11 - 11
target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch

@@ -300,7 +300,7 @@ Signed-off-by: Steven Barth <[email protected]>
  /**
   * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
   *   @t: the outgoing tunnel device
-@@ -1283,6 +1423,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1285,6 +1425,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
  {
  	struct ip6_tnl *t = netdev_priv(dev);
  	struct ipv6hdr *ipv6h = ipv6_hdr(skb);
@@ -308,7 +308,7 @@ Signed-off-by: Steven Barth <[email protected]>
  	int encap_limit = -1;
  	__u16 offset;
  	struct flowi6 fl6;
-@@ -1338,6 +1479,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1343,6 +1484,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
  			fl6.flowi6_mark = skb->mark;
  	}
  
@@ -327,7 +327,7 @@ Signed-off-by: Steven Barth <[email protected]>
  	if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
  		return -1;
  
-@@ -1463,6 +1616,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
+@@ -1470,6 +1623,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
  	t->parms.flowinfo = p->flowinfo;
  	t->parms.link = p->link;
  	t->parms.proto = p->proto;
@@ -342,7 +342,7 @@ Signed-off-by: Steven Barth <[email protected]>
  	dst_cache_reset(&t->dst_cache);
  	ip6_tnl_link_config(t);
  	return 0;
-@@ -1501,6 +1662,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
+@@ -1508,6 +1669,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
  	p->flowinfo = u->flowinfo;
  	p->link = u->link;
  	p->proto = u->proto;
@@ -350,7 +350,7 @@ Signed-off-by: Steven Barth <[email protected]>
  	memcpy(p->name, u->name, sizeof(u->name));
  }
  
-@@ -1878,6 +2040,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1885,6 +2047,15 @@ static int ip6_tnl_validate(struct nlatt
  	return 0;
  }
  
@@ -366,7 +366,7 @@ Signed-off-by: Steven Barth <[email protected]>
  static void ip6_tnl_netlink_parms(struct nlattr *data[],
  				  struct __ip6_tnl_parm *parms)
  {
-@@ -1912,6 +2083,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -1919,6 +2090,46 @@ static void ip6_tnl_netlink_parms(struct
  
  	if (data[IFLA_IPTUN_COLLECT_METADATA])
  		parms->collect_md = true;
@@ -413,7 +413,7 @@ Signed-off-by: Steven Barth <[email protected]>
  }
  
  static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
-@@ -2021,6 +2232,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2028,6 +2239,12 @@ static void ip6_tnl_dellink(struct net_d
  
  static size_t ip6_tnl_get_size(const struct net_device *dev)
  {
@@ -426,7 +426,7 @@ Signed-off-by: Steven Barth <[email protected]>
  	return
  		/* IFLA_IPTUN_LINK */
  		nla_total_size(4) +
-@@ -2048,6 +2265,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2055,6 +2272,24 @@ static size_t ip6_tnl_get_size(const str
  		nla_total_size(2) +
  		/* IFLA_IPTUN_COLLECT_METADATA */
  		nla_total_size(0) +
@@ -451,7 +451,7 @@ Signed-off-by: Steven Barth <[email protected]>
  		0;
  }
  
-@@ -2055,6 +2290,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2062,6 +2297,9 @@ static int ip6_tnl_fill_info(struct sk_b
  {
  	struct ip6_tnl *tunnel = netdev_priv(dev);
  	struct __ip6_tnl_parm *parm = &tunnel->parms;
@@ -461,7 +461,7 @@ Signed-off-by: Steven Barth <[email protected]>
  
  	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
  	    nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
-@@ -2063,9 +2301,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2070,9 +2308,27 @@ static int ip6_tnl_fill_info(struct sk_b
  	    nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
  	    nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
  	    nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
@@ -490,7 +490,7 @@ Signed-off-by: Steven Barth <[email protected]>
  	if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
  	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
  	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
-@@ -2103,6 +2359,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2110,6 +2366,7 @@ static const struct nla_policy ip6_tnl_p
  	[IFLA_IPTUN_ENCAP_SPORT]	= { .type = NLA_U16 },
  	[IFLA_IPTUN_ENCAP_DPORT]	= { .type = NLA_U16 },
  	[IFLA_IPTUN_COLLECT_METADATA]	= { .type = NLA_FLAG },

+ 7 - 7
target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch

@@ -86,7 +86,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  	default:
 --- a/net/ipv6/fib6_rules.c
 +++ b/net/ipv6/fib6_rules.c
-@@ -88,6 +88,10 @@ static int fib6_rule_action(struct fib_r
+@@ -77,6 +77,10 @@ static int fib6_rule_action(struct fib_r
  		err = -EACCES;
  		rt = net->ipv6.ip6_prohibit_entry;
  		goto discard_pkt;
@@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  		cfg->fc_flags |= RTF_REJECT;
  
  	if (rtm->rtm_type == RTN_LOCAL)
-@@ -3213,6 +3247,9 @@ static int rt6_fill_node(struct net *net
+@@ -3207,6 +3241,9 @@ static int rt6_fill_node(struct net *net
  		case -EACCES:
  			rtm->rtm_type = RTN_PROHIBIT;
  			break;
@@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  		case -EAGAIN:
  			rtm->rtm_type = RTN_THROW;
  			break;
-@@ -3489,6 +3526,8 @@ static int ip6_route_dev_notify(struct n
+@@ -3483,6 +3520,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		net->ipv6.ip6_prohibit_entry->dst.dev = dev;
  		net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  		net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
  		net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
-@@ -3711,6 +3750,17 @@ static int __net_init ip6_route_net_init
+@@ -3705,6 +3744,17 @@ static int __net_init ip6_route_net_init
  	net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
  	dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
  			 ip6_template_metrics, true);
@@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  #endif
  
  	net->ipv6.sysctl.flush_delay = 0;
-@@ -3729,6 +3779,8 @@ out:
+@@ -3723,6 +3773,8 @@ out:
  	return ret;
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  out_ip6_prohibit_entry:
  	kfree(net->ipv6.ip6_prohibit_entry);
  out_ip6_null_entry:
-@@ -3746,6 +3798,7 @@ static void __net_exit ip6_route_net_exi
+@@ -3740,6 +3792,7 @@ static void __net_exit ip6_route_net_exi
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	kfree(net->ipv6.ip6_prohibit_entry);
  	kfree(net->ipv6.ip6_blk_hole_entry);
@@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  #endif
  	dst_entries_destroy(&net->ipv6.ip6_dst_ops);
  }
-@@ -3819,6 +3872,9 @@ void __init ip6_route_init_special_entri
+@@ -3813,6 +3866,9 @@ void __init ip6_route_init_special_entri
  	init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
  	init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
  	init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

+ 6 - 17
target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch

@@ -9,8 +9,6 @@ Signed-off-by: Felix Fietkau <[email protected]>
  net/ethernet/eth.c        | 18 +++++++++++++++++-
  4 files changed, 69 insertions(+), 2 deletions(-)
 
-diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index 780e7171f548..6b738c662bc1 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
 @@ -1749,6 +1749,8 @@ struct net_device {
@@ -22,8 +20,6 @@ index 780e7171f548..6b738c662bc1 100644
  #ifdef CONFIG_SYSFS
  	struct kset		*queues_kset;
  #endif
-diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 5f3343ae25ef..3a04baab9b28 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
 @@ -742,7 +742,8 @@ struct sk_buff {
@@ -36,11 +32,9 @@ index 5f3343ae25ef..3a04baab9b28 100644
  
  #ifdef CONFIG_NET_SCHED
  	__u16			tc_index;	/* traffic control index */
-diff --git a/net/core/dev.c b/net/core/dev.c
-index 2e04fd188081..c7c96308bc84 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4512,6 +4512,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
+@@ -4520,6 +4520,9 @@ static enum gro_result dev_gro_receive(s
  	enum gro_result ret;
  	int grow;
  
@@ -50,7 +44,7 @@ index 2e04fd188081..c7c96308bc84 100644
  	if (!(skb->dev->features & NETIF_F_GRO))
  		goto normal;
  
-@@ -5789,6 +5792,48 @@ static void __netdev_adjacent_dev_unlink_neighbour(struct net_device *dev,
+@@ -5807,6 +5810,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -99,7 +93,7 @@ index 2e04fd188081..c7c96308bc84 100644
  static int __netdev_upper_dev_link(struct net_device *dev,
  				   struct net_device *upper_dev, bool master,
  				   void *upper_priv, void *upper_info)
-@@ -5987,6 +6032,8 @@ void netdev_upper_dev_unlink(struct net_device *dev,
+@@ -6005,6 +6050,8 @@ void netdev_upper_dev_unlink(struct net_
  	list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
  		__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
  
@@ -108,7 +102,7 @@ index 2e04fd188081..c7c96308bc84 100644
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  }
-@@ -6587,6 +6634,7 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa)
+@@ -6605,6 +6652,7 @@ int dev_set_mac_address(struct net_devic
  	if (err)
  		return err;
  	dev->addr_assign_type = NET_ADDR_SET;
@@ -116,11 +110,9 @@ index 2e04fd188081..c7c96308bc84 100644
  	call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
  	add_device_randomness(dev->dev_addr, dev->addr_len);
  	return 0;
-diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
-index fbf1de965a9a..6a6d90b9a880 100644
 --- a/net/ethernet/eth.c
 +++ b/net/ethernet/eth.c
-@@ -143,6 +143,18 @@ u32 eth_get_headlen(void *data, unsigned int len)
+@@ -143,6 +143,18 @@ u32 eth_get_headlen(void *data, unsigned
  }
  EXPORT_SYMBOL(eth_get_headlen);
  
@@ -139,7 +131,7 @@ index fbf1de965a9a..6a6d90b9a880 100644
  /**
   * eth_type_trans - determine the packet's protocol ID.
   * @skb: received socket data
-@@ -171,8 +183,12 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
+@@ -171,8 +183,12 @@ __be16 eth_type_trans(struct sk_buff *sk
  			skb->pkt_type = PACKET_MULTICAST;
  	}
  	else if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
@@ -153,6 +145,3 @@ index fbf1de965a9a..6a6d90b9a880 100644
  
  	/*
  	 * Some variants of DSA tagging don't have an ethertype field
--- 
-2.11.0
-

+ 2 - 9
target/linux/generic/pending-4.9/701-phy_extension.patch

@@ -7,11 +7,9 @@ Signed-off-by: John Crispin <[email protected]>
  include/linux/phy.h   |  1 +
  2 files changed, 45 insertions(+)
 
-diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
-index a9be26f1f677..d0a5ac1d6445 100644
 --- a/drivers/net/phy/phy.c
 +++ b/drivers/net/phy/phy.c
-@@ -466,6 +466,50 @@ int phy_ethtool_ksettings_get(struct phy_device *phydev,
+@@ -466,6 +466,50 @@ int phy_ethtool_ksettings_get(struct phy
  }
  EXPORT_SYMBOL(phy_ethtool_ksettings_get);
  
@@ -62,11 +60,9 @@ index a9be26f1f677..d0a5ac1d6445 100644
  /**
   * phy_mii_ioctl - generic PHY MII ioctl interface
   * @phydev: the phy_device struct
-diff --git a/include/linux/phy.h b/include/linux/phy.h
-index bd22670e2182..93c1e74afc44 100644
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -813,6 +813,7 @@ int phy_ethtool_ksettings_get(struct phy_device *phydev,
+@@ -820,6 +820,7 @@ int phy_ethtool_ksettings_get(struct phy
  			      struct ethtool_link_ksettings *cmd);
  int phy_ethtool_ksettings_set(struct phy_device *phydev,
  			      const struct ethtool_link_ksettings *cmd);
@@ -74,6 +70,3 @@ index bd22670e2182..93c1e74afc44 100644
  int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
  int phy_start_interrupts(struct phy_device *phydev);
  void phy_print_status(struct phy_device *phydev);
--- 
-2.11.0
-

+ 2 - 9
target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch

@@ -9,11 +9,9 @@ Signed-off-by: Gabor Juhos <[email protected]>
  include/linux/phy.h          | 6 ++++++
  2 files changed, 9 insertions(+)
 
-diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
-index 14d57d0d1c04..c37d3a27e372 100644
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1001,6 +1001,9 @@ void phy_detach(struct phy_device *phydev)
+@@ -1001,6 +1001,9 @@ void phy_detach(struct phy_device *phyde
  	struct mii_bus *bus;
  	int i;
  
@@ -23,11 +21,9 @@ index 14d57d0d1c04..c37d3a27e372 100644
  	phydev->attached_dev->phydev = NULL;
  	phydev->attached_dev = NULL;
  	phy_suspend(phydev);
-diff --git a/include/linux/phy.h b/include/linux/phy.h
-index 93c1e74afc44..d97a418f2cf7 100644
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -508,6 +508,12 @@ struct phy_driver {
+@@ -511,6 +511,12 @@ struct phy_driver {
  	 */
  	int (*did_interrupt)(struct phy_device *phydev);
  
@@ -40,6 +36,3 @@ index 93c1e74afc44..d97a418f2cf7 100644
  	/* Clears up any memory if needed */
  	void (*remove)(struct phy_device *phydev);
  
--- 
-2.11.0
-

+ 10 - 21
target/linux/generic/pending-4.9/704-phy-no-genphy-soft-reset.patch

@@ -6,37 +6,26 @@ Signed-off-by: Felix Fietkau <[email protected]>
  drivers/net/phy/phy_device.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
-index c37d3a27e372..069f7ee3e65c 100644
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1482,7 +1482,7 @@ int genphy_config_init(struct phy_device *phydev)
+@@ -1524,11 +1524,6 @@ int genphy_config_init(struct phy_device
  	return 0;
  }
  
 -static int gen10g_soft_reset(struct phy_device *phydev)
-+static int no_soft_reset(struct phy_device *phydev)
- {
- 	/* Do nothing for now */
- 	return 0;
-@@ -1721,7 +1721,7 @@ static struct phy_driver genphy_driver[] = {
- 	.phy_id		= 0xffffffff,
- 	.phy_id_mask	= 0xffffffff,
- 	.name		= "Generic PHY",
--	.soft_reset	= genphy_soft_reset,
-+	.soft_reset	= no_soft_reset,
- 	.config_init	= genphy_config_init,
- 	.features	= PHY_GBIT_FEATURES | SUPPORTED_MII |
- 			  SUPPORTED_AUI | SUPPORTED_FIBRE |
-@@ -1735,7 +1735,7 @@ static struct phy_driver genphy_driver[] = {
+-{
+-	/* Do nothing for now */
+-	return 0;
+-}
+ EXPORT_SYMBOL(genphy_config_init);
+ 
+ static int gen10g_config_init(struct phy_device *phydev)
+@@ -1811,7 +1806,7 @@ static struct phy_driver genphy_driver[]
  	.phy_id         = 0xffffffff,
  	.phy_id_mask    = 0xffffffff,
  	.name           = "Generic 10G PHY",
 -	.soft_reset	= gen10g_soft_reset,
-+	.soft_reset	= no_soft_reset,
++	.soft_reset	= genphy_no_soft_reset,
  	.config_init    = gen10g_config_init,
  	.features       = 0,
  	.config_aneg    = gen10g_config_aneg,
--- 
-2.11.0
-

+ 4 - 12
target/linux/generic/pending-4.9/734-net-phy-at803x-allow-to-configure-via-pdata.patch

@@ -11,8 +11,6 @@ Signed-off-by: Gabor Juhos <[email protected]>
  2 files changed, 67 insertions(+)
  create mode 100644 include/linux/platform_data/phy-at803x.h
 
-diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
-index c0f45dde60aa..4a55130dcb1c 100644
 --- a/drivers/net/phy/at803x.c
 +++ b/drivers/net/phy/at803x.c
 @@ -12,12 +12,14 @@
@@ -50,7 +48,7 @@ index c0f45dde60aa..4a55130dcb1c 100644
  };
  
  struct at803x_context {
-@@ -276,8 +284,16 @@ static int at803x_probe(struct phy_device *phydev)
+@@ -276,8 +284,16 @@ does_not_require_reset_workaround:
  	return 0;
  }
  
@@ -67,7 +65,7 @@ index c0f45dde60aa..4a55130dcb1c 100644
  	int ret;
  
  	ret = genphy_config_init(phydev);
-@@ -298,6 +314,26 @@ static int at803x_config_init(struct phy_device *phydev)
+@@ -298,6 +314,26 @@ static int at803x_config_init(struct phy
  			return ret;
  	}
  
@@ -94,7 +92,7 @@ index c0f45dde60aa..4a55130dcb1c 100644
  	return 0;
  }
  
-@@ -335,6 +371,8 @@ static int at803x_config_intr(struct phy_device *phydev)
+@@ -335,6 +371,8 @@ static int at803x_config_intr(struct phy
  static void at803x_link_change_notify(struct phy_device *phydev)
  {
  	struct at803x_priv *priv = phydev->priv;
@@ -103,7 +101,7 @@ index c0f45dde60aa..4a55130dcb1c 100644
  
  	/*
  	 * Conduct a hardware reset for AT8030/2 every time a link loss is
-@@ -363,6 +401,24 @@ static void at803x_link_change_notify(struct phy_device *phydev)
+@@ -363,6 +401,24 @@ static void at803x_link_change_notify(st
  	} else {
  		priv->phy_reset = false;
  	}
@@ -128,9 +126,6 @@ index c0f45dde60aa..4a55130dcb1c 100644
  }
  
  static int at803x_aneg_done(struct phy_device *phydev)
-diff --git a/include/linux/platform_data/phy-at803x.h b/include/linux/platform_data/phy-at803x.h
-new file mode 100644
-index 000000000000..a5df74b4f38d
 --- /dev/null
 +++ b/include/linux/platform_data/phy-at803x.h
 @@ -0,0 +1,11 @@
@@ -145,6 +140,3 @@ index 000000000000..a5df74b4f38d
 +};
 +
 +#endif /* _PHY_AT803X_PDATA_H */
--- 
-2.11.0
-

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است