Browse Source

Merge branch 'v1.5' into LTS : v1.5.2

RISCi_ATOM 3 years ago
parent
commit
6d3dc7a6ae
100 changed files with 1742 additions and 347 deletions
  1. 2 2
      include/kernel-version.mk
  2. 8 6
      include/prereq-build.mk
  3. 4 4
      include/prereq.mk
  4. 0 23
      include/scons.mk
  5. 1 1
      include/version.mk
  6. 1 0
      package/devel/perf/Makefile
  7. 1 0
      package/firmware/wireless-regdb/Makefile
  8. 47 0
      package/firmware/wireless-regdb/patches/600-wireless-regdb-Fix-overlapping-ranges-for-Switzerlan.patch
  9. 843 0
      package/firmware/wireless-regdb/patches/601-wireless-regdb-Fix-ranges-of-EU-countries-as-they-ar.patch
  10. 44 0
      package/firmware/wireless-regdb/patches/602-wireless-regdb-Update-regulatory-rules-for-Russia-RU.patch
  11. 3 3
      package/kernel/mac80211/Makefile
  12. 1 1
      package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch
  13. 3 3
      package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch
  14. 82 0
      package/kernel/mac80211/patches/subsys/305-mac80211-fix-tx-status-for-no-ack-cases.patch
  15. 3 3
      package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch
  16. 6 6
      package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch
  17. 1 1
      package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch
  18. 4 4
      package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch
  19. 7 7
      package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch
  20. 5 5
      package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch
  21. 3 3
      package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch
  22. 3 3
      package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch
  23. 4 4
      package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch
  24. 4 4
      package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch
  25. 3 3
      package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch
  26. 3 3
      package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch
  27. 1 1
      package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch
  28. 1 1
      package/libs/libjson-c/Makefile
  29. 1 1
      package/libs/libjson-c/patches/000-libm.patch
  30. 32 0
      package/libs/libjson-c/patches/001-Prevent-division-by-zero-in-linkhash.patch
  31. 83 0
      package/libs/libjson-c/patches/002-Fix-integer-overflows.patch
  32. 1 1
      package/libs/libpcap/Makefile
  33. 3 3
      package/libs/libubox/Makefile
  34. 3 3
      package/libs/uclient/Makefile
  35. 4 4
      package/libs/ustream-ssl/Makefile
  36. 1 1
      package/network/config/qos-scripts/Makefile
  37. 13 7
      package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
  38. 1 1
      package/network/services/dnsmasq/Makefile
  39. 2 3
      package/network/services/dnsmasq/files/dnsmasq.init
  40. 1 1
      package/network/services/hostapd/Makefile
  41. 1 5
      package/network/services/hostapd/files/hostapd.sh
  42. 26 0
      package/network/services/hostapd/patches/090-wolfssl-fix-crypto_bignum_sum.patch
  43. 31 0
      package/network/services/hostapd/patches/091-0001-wolfssl-Fix-compiler-warnings-on-size_t-printf-forma.patch
  44. 49 0
      package/network/services/hostapd/patches/091-0002-wolfssl-Fix-crypto_bignum_rand-implementation.patch
  45. 26 0
      package/network/services/hostapd/patches/091-0003-wolfssl-Do-not-hardcode-include-directory-in-wpa_sup.patch
  46. 7 1
      package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch
  47. 3 3
      package/network/services/odhcpd/Makefile
  48. 3 3
      package/network/services/relayd/Makefile
  49. 3 3
      package/network/services/uhttpd/Makefile
  50. 3 3
      package/network/services/umdns/Makefile
  51. 5 3
      package/network/services/wireguard/Makefile
  52. 1 1
      package/network/utils/curl/Makefile
  53. 44 0
      package/network/utils/curl/patches/100-file-on-Windows-refuse-paths-that-start-with.patch
  54. 1 1
      package/network/utils/dante/Makefile
  55. 53 0
      package/network/utils/dante/patches/210-deactivate-sched_setscheduler.patch
  56. 2 2
      package/network/utils/wireguard-tools/Makefile
  57. 4 4
      package/system/ca-certificates/Makefile
  58. 3 3
      package/system/fstools/Makefile
  59. 3 3
      package/system/opkg/Makefile
  60. 3 3
      package/system/rpcd/Makefile
  61. 3 3
      package/system/ucert/Makefile
  62. 3 3
      package/system/usign/Makefile
  63. 2 2
      target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
  64. 2 2
      target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c
  65. 1 1
      target/linux/ar71xx/patches-4.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch
  66. 1 1
      target/linux/ar71xx/patches-4.14/451-gpio-74x164-improve-platform-device-support.patch
  67. 1 1
      target/linux/ar71xx/patches-4.14/452-gpio-add-gpio-latch-driver.patch
  68. 1 1
      target/linux/ar71xx/patches-4.14/500-MIPS-fw-myloader.patch
  69. 3 3
      target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
  70. 21 0
      target/linux/ath79/dts/ar7161_netgear_wndr3700.dts
  71. 19 0
      target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
  72. 1 0
      target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
  73. 5 5
      target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
  74. 2 2
      target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
  75. 1 1
      target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
  76. 1 1
      target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
  77. 69 0
      target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch
  78. 2 2
      target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch
  79. 8 8
      target/linux/generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch
  80. 1 1
      target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
  81. 2 2
      target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch
  82. 0 71
      target/linux/generic/backport-4.14/600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
  83. 2 2
      target/linux/generic/hack-4.14/207-disable-modorder.patch
  84. 1 1
      target/linux/generic/hack-4.14/220-gc_sections.patch
  85. 2 2
      target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch
  86. 1 1
      target/linux/generic/hack-4.14/901-debloat_sock_diag.patch
  87. 5 5
      target/linux/generic/hack-4.14/902-debloat_proc.patch
  88. 1 1
      target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
  89. 2 2
      target/linux/generic/pending-4.14/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch
  90. 5 23
      target/linux/generic/pending-4.14/201-extra_optimization.patch
  91. 1 1
      target/linux/generic/pending-4.14/304-mips_disable_fpu.patch
  92. 2 2
      target/linux/generic/pending-4.14/332-arc-add-OWRTDTB-section.patch
  93. 5 5
      target/linux/generic/pending-4.14/630-packet_socket_type.patch
  94. 18 15
      target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
  95. 1 1
      target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch
  96. 11 11
      target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
  97. 5 5
      target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
  98. 2 2
      target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch
  99. 4 4
      target/linux/generic/pending-4.14/810-pci_disable_common_quirks.patch
  100. 21 0
      target/linux/mvebu/Makefile

+ 2 - 2
include/kernel-version.mk

@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 endif
 
 
-LINUX_VERSION-4.14 = .173
+LINUX_VERSION-4.14 = .185
 
 
-LINUX_KERNEL_HASH-4.14.173 = 615f3a798d99b2e986627f0c5618bee8dfd61e7f645bcc3bb90cfaf953d9cb26
+LINUX_KERNEL_HASH-4.14.185 = 181f18ab15236ea3f6ec83ad95b4b9c630933a35f3ce15a722eb60555fce924c
 
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

+ 8 - 6
include/prereq-build.mk

@@ -127,12 +127,14 @@ $(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \
 $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
 $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
 	perl --version | grep "perl.*v5"))
 	perl --version | grep "perl.*v5"))
 
 
-$(eval $(call CleanupPython3))
-
-$(eval $(call SetupHostCommand,python,Please install Python 2.x, \
-	python2.7 -V 2>&1 | grep 'Python 2.7', \
-	python2 -V 2>&1 | grep 'Python 2', \
-	python -V 2>&1 | grep 'Python 2'))
+$(eval $(call CleanupPython2))
+
+$(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \
+	python3.8 -V 2>&1 | grep 'Python 3', \
+	python3.7 -V 2>&1 | grep 'Python 3', \
+	python3.6 -V 2>&1 | grep 'Python 3', \
+	python3.5 -V 2>&1 | grep 'Python 3', \
+	python3 -V 2>&1 | grep -E 'Python 3\.[5-9]\.?'))
 
 
 $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
 $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
 	git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))
 	git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))

+ 4 - 4
include/prereq.mk

@@ -66,16 +66,16 @@ define RequireHeader
   $$(eval $$(call Require,$(1),$(2)))
   $$(eval $$(call Require,$(1),$(2)))
 endef
 endef
 
 
-define CleanupPython3
-  define Require/python3-cleanup
+define CleanupPython2
+  define Require/python2-cleanup
 	if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
 	if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
 		$(STAGING_DIR_HOST)/bin/python -V 2>&1 | \
 		$(STAGING_DIR_HOST)/bin/python -V 2>&1 | \
-		grep -q 'Python 3'; then \
+		grep -q 'Python 2'; then \
 			rm $(STAGING_DIR_HOST)/bin/python; \
 			rm $(STAGING_DIR_HOST)/bin/python; \
 	fi
 	fi
   endef
   endef
 
 
-  $$(eval $$(call Require,python3-cleanup))
+  $$(eval $$(call Require,python2-cleanup))
 endef
 endef
 
 
 define QuoteHostCommand
 define QuoteHostCommand

+ 0 - 23
include/scons.mk

@@ -1,23 +0,0 @@
-export PLATFORM=posix
-
-SCONS_VARS = \
-	CC="$(TARGET_CC_NOCACHE)" \
-	CXX="$(TARGET_CXX_NOCACHE)" \
-	CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
-	CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
-	CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
-	LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
-	DESTDIR="$(PKG_INSTALL_DIR)"
-
-define Build/Configure/Default
-	(cd $(PKG_BUILD_DIR); \
-		$(SCONS_VARS) \
-		scons \
-			prefix=/usr \
-			$(SCONS_OPTIONS) \
-		install \
-	)
-endef
-
-define Build/Compile
-endef

+ 1 - 1
include/version.mk

@@ -26,7 +26,7 @@ PKG_CONFIG_DEPENDS += \
 sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
 sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
 
 
 VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
 VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
-VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),v1.5.1)
+VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),v1.5.2)
 
 
 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
 VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
 VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))

+ 1 - 0
package/devel/perf/Makefile

@@ -52,6 +52,7 @@ MAKE_FLAGS = \
 	NO_LIBAUDIT=1 \
 	NO_LIBAUDIT=1 \
 	NO_LIBCRYPTO=1 \
 	NO_LIBCRYPTO=1 \
 	NO_LIBUNWIND=1 \
 	NO_LIBUNWIND=1 \
+	NO_LIBCAP=1 \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	CC="$(TARGET_CC)" \
 	CC="$(TARGET_CC)" \
 	LD="$(TARGET_CROSS)ld" \
 	LD="$(TARGET_CROSS)ld" \

+ 1 - 0
package/firmware/wireless-regdb/Makefile

@@ -2,6 +2,7 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=wireless-regdb
 PKG_NAME:=wireless-regdb
 PKG_VERSION:=2019.06.03
 PKG_VERSION:=2019.06.03
+PKG_RELEASE:=1
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
 PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/

+ 47 - 0
package/firmware/wireless-regdb/patches/600-wireless-regdb-Fix-overlapping-ranges-for-Switzerlan.patch

@@ -0,0 +1,47 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Martin Willi <martin@strongswan.org>
+Date: Tue, 2 Jul 2019 16:19:44 +0200
+Subject: [PATCH] wireless-regdb: Fix overlapping ranges for Switzerland and
+ Liechtenstein
+
+The commit referenced below changes the 5GHz frequency range 5250-5330
+to 5150-5330, making that range overlapping with the existing range
+5170-5250. This imposes DFS limitations and a reduced maximum power
+level for the range 5170-5250.
+
+The change of the frequency range seems not intentional. Instead the
+commit should have changed the 5170-5250 range to 5150-5250, and the
+5250-5330 range to 5250-5350 (see [1]).
+
+[1] https://www.ofcomnet.ch/api/rir/1010/05
+
+Fixes: 957a7cff72a3 ("wireless-regdb: update regulatory rules for Switzerland (CH), and Liechtenstein (LI) on 5GHz")
+Signed-off-by: Martin Willi <martin@strongswan.org>
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+
+diff --git a/db.txt b/db.txt
+index d47ab94c3aa5..37393e6a793e 100644
+--- a/db.txt
++++ b/db.txt
+@@ -271,8 +271,8 @@ country CF: DFS-FCC
+ # transmitter power control is in use: 5250-5330@23db, 5490-5710@30db
+ country CH: DFS-ETSI
+ 	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5150 - 5330 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+ 	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+ 	# 60 GHz band channels 1-4, ref: Etsi En 302 567
+ 	(57000 - 66000 @ 2160), (40)
+@@ -747,8 +747,8 @@ country LC: DFS-ETSI
+ # transmitter power control is in use: 5250-5330@23db, 5490-5710@30db
+ country LI: DFS-ETSI
+ 	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5150 - 5330 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+ 	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+ 	# 60 GHz band channels 1-4, ref: Etsi En 302 567
+ 	(57000 - 66000 @ 2160), (40)

+ 843 - 0
package/firmware/wireless-regdb/patches/601-wireless-regdb-Fix-ranges-of-EU-countries-as-they-ar.patch

@@ -0,0 +1,843 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Emil Petersky <emil.petersky@streamunlimited.com>
+Date: Tue, 17 Sep 2019 09:49:19 +0200
+Subject: [PATCH] wireless-regdb: Fix ranges of EU countries as they are
+ harmonized since 2014
+
+This patch unites entries for EU countries, as they have been harmonized
+latest by July 2014...
+
+EU decision 2005/513/EC:
+https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
+EU decision 2006/771/EC:
+https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
+
+Signed-off-by: Emil Petersky <emil.petersky@streamunlimited.com>
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+
+diff --git a/db.txt b/db.txt
+index 2e149b6e0ea2..a57452479a9b 100644
+--- a/db.txt
++++ b/db.txt
+@@ -87,12 +87,20 @@ country AS: DFS-FCC
+ 	(5490 - 5730 @ 160), (24), DFS
+ 	(5735 - 5835 @ 80), (30)
+ 
++# AT as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# AT: https://www.rtr.at/en/tk/Spektrum5GHz/1997_bmvit-info-052010en.pdf
++# AT: acceptance https://www.ris.bka.gv.at/Dokumente/BgblAuth/BGBLA_2014_II_63/BGBLA_2014_II_63.pdfsig
+ country AT: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ # Source:
+@@ -139,12 +147,22 @@ country BD: DFS-JP
+ 	(2402 - 2482 @ 40), (20)
+ 	(5735 - 5835 @ 80), (30)
+ 
++# BE as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# BE: https://www.ibpt.be/public/files/en/21760/B03-01_2.1_EN.pdf
++# BE: https://www.ibpt.be/public/files/en/21761/B03-02_2.1_EN.pdf
++# BE: https://www.ibpt.be/public/files/en/21762/B03-03_2.1_EN.pdf
++# BE: https://www.ibpt.be/public/files/en/22165/B01-28_3.1_EN.pdf
+ country BE: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country BF: DFS-FCC
+@@ -167,22 +185,29 @@ country BF: DFS-FCC
+ #
+ # Note: The transmit power limits in the 5250-5350 MHz and 5470-5725 MHz bands
+ # can be raised by 3 dBm if TPC is enabled. Refer to BDS EN 301 893 for details.
++#
++# BG as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# BG: https://crc.bg/files/_en/Electronic_Communications_Revised_EN1.pdf
++# BG: acceptance of 2006/771/EC https://crc.bg/files/Pravila_06_12_2018.pdf
+ country BG: DFS-ETSI
+ 	# Wideband data transmission systems (WDTS) in the 2.4GHz ISM band, ref:
+ 	# I.22 of the List, BDS EN 300 328
+-	(2402 - 2482 @ 40), (20)
++	(2400 - 2483.5 @ 40), (100 mW)
+ 	# 5 GHz Radio Local Area Networks (RLANs), ref:
+ 	# II.H01 of the List, BDS EN 301 893
+-	(5170 - 5250 @ 80), (23), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+ 	# II.H01 of the List, I.54 from the List, BDS EN 301 893
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# Short range devices (SRDs) in the 5725-5875 MHz frequency range, ref:
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
+ 	# I.43 of the List, BDS EN 300 440-2, BDS EN 300 440-1
+-	(5725 - 5875 @ 80), (14)
+-	# 60 GHz Multiple-Gigabit RLAN Systems, ref:
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	# II.H03 of the List, BDS EN 302 567-2
+-	(57000 - 66000 @ 2160), (40), NO-OUTDOOR
++	(57000 - 66000 @ 2160), (40)
+ 
+ country BH: DFS-JP
+ 	(2402 - 2482 @ 40), (20)
+@@ -265,16 +290,22 @@ country CF: DFS-FCC
+ 	(5490 - 5730 @ 40), (24), DFS
+ 	(5735 - 5835 @ 40), (30)
+ 
+-# Source:
+-# https://www.ofcomnet.ch/#/fatTable
+-# Note that the maximum transmitter power can be doubled for 5250-5710MHz if
+-# transmitter power control is in use: 5250-5330@23db, 5490-5710@30db
++# CH as part of CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# CH: https://www.ofcomnet.ch/api/rir/1010/05
++# CH: https://www.ofcomnet.ch/api/rir/1010/04
++# CH: https://www.ofcomnet.ch/api/rir/1008/12
++# CH: https://www.ofcomnet.ch/#/fatTable
+ country CH: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country CI: DFS-FCC
+@@ -329,26 +360,42 @@ country CX: DFS-FCC
+ 	(5490 - 5730 @ 160), (24), DFS
+ 	(5735 - 5835 @ 80), (30)
+ 
++# CY as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# CY: http://www.mcw.gov.cy/mcw/dec/dec.nsf/all/292484CFC7013DD4C2256EBA0023D447/$file/Sxedio%20Radiosyxnothtwn%20ths%20Dhmokratias-3-8-2018-E2.2(English%20Unified%20Unofficial).pdf?openelement
+ country CY: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+-# Data from http://www.ctu.eu/164/download/VOR/VOR-12-08-2005-34.pdf
+-# and http://www.ctu.eu/164/download/VOR/VOR-12-05-2007-6-AN.pdf
+-# Power at 5250 - 5350 MHz and 5470 - 5725 MHz can be doubled if TPC is
+-# implemented.
++# CZ as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# CZ: https://www.ctu.cz/cs/download/vseobecna-opravneni/archiv/vo-r_12-06_2010-09.pdf
++# CZ: https://www.ctu.cz/sites/default/files/obsah/ctu/vseobecne-opravneni-c.vo-r/10/12.2017-10/obrazky/vo-r10-122017-10.pdf
+ country CZ: DFS-ETSI
+ 	(2400 - 2483.5 @ 40), (100 mW)
+ 	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+ 	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+ 	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
++# DE as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++#
+ # Allocation for the 2.4 GHz band (Vfg 10 / 2013, Allgemeinzuteilung von
+ # Frequenzen für die Nutzung in lokalen Netzwerken; Wireless Local Area
+ # Networks (WLAN-Funkanwendungen).
+@@ -379,16 +426,22 @@ country DE: DFS-ETSI
+ 	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+-# Sources:
++# DK as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# DK: https://ens.dk/sites/ens.dk/files/Tele/frekvensplan_0.pdf
+ # 5GHz: https://erhvervsstyrelsen.dk/sites/default/files/007_interface-datanet_5-6_ghz.pdf.pdf
+ # 60GHz: https://erhvervsstyrelsen.dk/sites/default/files/radiograenseflader-63.pdf
+ country DK: DFS-ETSI
+-	(2400 - 2483.5 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5725 @ 160), (27), DFS, wmmrule=ETSI
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
+ 	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+-	(57000 - 66000 @ 2160), (40), NO-OUTDOOR
++	(57000 - 66000 @ 2160), (40)
+ 
+ # Source:
+ # http://www.ntrcdom.org/index.php?option=com_content&view=category&layout=blog&id=10&Itemid=55
+@@ -417,12 +470,20 @@ country EC: DFS-FCC
+ 	(5490 - 5730 @ 20), (24), DFS
+ 	(5735 - 5835 @ 20), (30)
+ 
++# EE as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# EE: https://www.ttja.ee/et/ettevottele-organisatsioonile/sideteenused/raadioseadmed/wifi-seade
++# EE: https://www.itu.int/ITU-D/study_groups/SGP_1998-2002/JGRES09/pdf/estonia.pdf
+ country EE: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country EG: DFS-ETSI
+@@ -430,17 +491,19 @@ country EG: DFS-ETSI
+ 	(5170 - 5250 @ 40), (20)
+ 	(5250 - 5330 @ 40), (20), DFS
+ 
+-# Source:
+-# Cuadro nacional de atribución de frecuencias (CNAF)
+-# https://avancedigital.gob.es/espectro/Paginas/cnaf.aspx
++# ES as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# ES: https://avancedigital.gob.es/espectro/Paginas/cnaf.aspx
+ country ES: DFS-ETSI
+ 	(2400 - 2483.5 @ 40), (100 mW)
+ 	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+ 	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+ 	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
+-	# Short Range Devices (SRD) (ETSI EN 300 440)
++	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country ET: DFS-ETSI
+@@ -449,14 +512,18 @@ country ET: DFS-ETSI
+ 	(5250 - 5330 @ 80), (20), DFS, AUTO-BW
+ 	(5490 - 5710 @ 160), (27), DFS
+ 
++# FI as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
+ country FI: DFS-ETSI
+-	(2400 - 2483.5 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5725 @ 160), (27), DFS, wmmrule=ETSI
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
+ 	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country FM: DFS-FCC
+@@ -466,22 +533,34 @@ country FM: DFS-FCC
+ 	(5490 - 5730 @ 160), (24), DFS
+ 	(5735 - 5835 @ 80), (30)
+ 
++# FR as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
+ country FR: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5725 @ 160), (27), DFS, wmmrule=ETSI
+-        # short range devices (ETSI EN 300 440)
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
++# GB as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# GB: https://www.ofcom.org.uk/__data/assets/pdf_file/0019/136009/Ofcom-Information-Sheet-5-GHz-RLANs.pdf
++# GB: https://www.ofcom.org.uk/__data/assets/pdf_file/0028/84970/ir-2030.pdf
+ country GB: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country GD: DFS-FCC
+@@ -523,12 +602,20 @@ country GP: DFS-ETSI
+ 	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+ 	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+ 
++# GR as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# GR: https://www.eett.gr/opencms/export/sites/default/EETT_EN/Electronic_Communications/Radio_Communications/TelecommunicationEquipment/Radio_equipment_interface_requirement_2012.pdf
++# GR: https://www.eett.gr/opencms/export/sites/default/EETT_EN/Electronic_Communications/Radio_Communications/TelecommunicationEquipment/Radio_equipment_interface_requirement_107.pdf
+ country GR: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country GT: DFS-FCC
+@@ -563,11 +650,18 @@ country HN: DFS-FCC
+ 	(5735 - 5835 @ 80), (30)
+ 
+ country HR: DFS-ETSI
+-	(2400 - 2483.5 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5725 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++# HR as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# HR: http://tablice.hakom.hr:8080/vis?lang=en
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country HT: DFS-FCC
+@@ -577,37 +671,42 @@ country HT: DFS-FCC
+ 	(5490 - 5730 @ 160), (24), DFS
+ 	(5735 - 5835 @ 80), (30)
+ 
+-# http://stir.nmhh.hu/?oldal=dokumentumGeneralo&root_rendeletelem_id=3&hatalyos=1
+-# http://english.nmhh.hu/cikk/297/Eljarasi_tajekoztato_a_24_GHzes_es_az_5_GHzes_savban_mukodo_berendezesek_engedelyezeserol
+-# http://nmhh.hu/dokumentum/319/kis_hatotavolsagu_eszkozok_srdk.pdf
++# HU as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# HU: http://stir.nmhh.hu/?oldal=dokumentumGeneralo&root_rendeletelem_id=3&hatalyos=1
++# HU: http://english.nmhh.hu/cikk/297/Eljarasi_tajekoztato_a_24_GHzes_es_az_5_GHzes_savban_mukodo_berendezesek_engedelyezeserol
++# HU: http://nmhh.hu/dokumentum/319/kis_hatotavolsagu_eszkozok_srdk.pdf
+ country HU: DFS-ETSI
+-	# ref: 2006/771/EK, (EU) 2017/1483, MSZ EN 300 328
+-	# additionally: 100mW @ 10MHz channels, 50mW @ 5MHz (max. 10mW/MHz)
+-	(2400 - 2483.5 @ 40), (20)
+-	# ref: 2005/513/EK
+-	# note: TPC not needed @ 5150-5250
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	# note: max would be +3dB with TPC @ 5250-5725
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5725 @ 160), (27), DFS, wmmrule=ETSI
+-	# "Short Range Devices (SRD)"
+-	# ref: 2006/771/EK, (EU) 2017/1483, MSZ EN 300 440, MSZ EN 302 064
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, "Fixed outdoor installation not allowed"
+-	# ref: 2006/771/EK, (EU) 2017/1483, MSZ EN 302 567
+-	(57000 - 66000 @ 2160), (40), NO-OUTDOOR
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
++	(57000 - 66000 @ 2160), (40)
+ 
+ country ID: DFS-JP
+ 	# ref: http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf
+ 	(2402 - 2482 @ 20), (20)
+ 	(5735 - 5815 @ 20), (23)
+ 
++# IE as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# IE: https://www.comreg.ie/publication-download/interface-requirements-for-radio-services-in-ireland
++# IE: https://www.comreg.ie/publication-download/permitted-short-range-devices-ireland
+ country IE: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country IL: DFS-ETSI
+@@ -626,20 +725,33 @@ country IR: DFS-JP
+ 	(2402 - 2482 @ 40), (20)
+ 	(5735 - 5835 @ 80), (30)
+ 
++# IS as part of CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# IS: https://www.pfs.is/library/Skrar/Tidnir-og-taekni/MHZ_21022019.pdf
+ country IS: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
++# IT as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
+ country IT: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country JM: DFS-FCC
+@@ -741,16 +853,22 @@ country LC: DFS-ETSI
+ 	(5490 - 5710 @ 160), (30), DFS
+ 	(5735 - 5815 @ 80), (30)
+ 
+-# Source:
+-# https://www.ofcomnet.ch/#/fatTable
+-# Note that the maximum transmitter power can be doubled for 5250-5710MHz if
+-# transmitter power control is in use: 5250-5330@23db, 5490-5710@30db
++# LI as part of CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# LI: https://www.ofcomnet.ch/api/rir/1010/05
++# LI: https://www.ofcomnet.ch/api/rir/1010/04
++# LI: https://www.ofcomnet.ch/api/rir/1008/12
++# LI: https://www.ofcomnet.ch/#/fatTable
+ country LI: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country LK: DFS-FCC
+@@ -768,28 +886,50 @@ country LS: DFS-ETSI
+ 	(5250 - 5330 @ 80), (20), DFS, AUTO-BW
+ 	(5490 - 5710 @ 160), (27), DFS
+ 
++# LT as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# LT: https://www.rrt.lt/en/radio-spectrum/frequency-management/ or direct link:
++# LT: https://www.e-tar.lt/portal/lt/legalAct/6e718fd037a011e69101aaab2992cbcd/dGRioCBBHb
+ country LT: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
++# LU as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# LU: https://assets.ilr.lu/frequences/Documents/ILRLU-1723895916-183.pdf#search=en%20300%20440
+ country LU: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
++# LV as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# LV: http://likumi.lv/doc.php?id=198903
+ country LV: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country MA: DFS-ETSI
+@@ -875,12 +1015,19 @@ country MR: DFS-ETSI
+ 	(5250 - 5330 @ 80), (20), DFS, AUTO-BW
+ 	(5490 - 5710 @ 160), (27), DFS
+ 
++# MT as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# MT: https://www.mca.org.mt/sites/default/files/NFP_edition%206-1.pdf
+ country MT: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country MU: DFS-FCC
+@@ -930,34 +1077,36 @@ country NI: DFS-FCC
+ 	(5490 - 5730 @ 160), (24), DFS
+ 	(5735 - 5835 @ 80), (30)
+ 
+-# Regulation on the use of frequency space without a license and
+-# without notification 2015
+-#
+-# http://wetten.overheid.nl/BWBR0036378/2015-03-05
+-
++# NL as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# NL: http://wetten.overheid.nl/BWBR0036378/2015-03-05
+ country NL: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
+ 	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+-# Data from http://www.lovdata.no/dokument/SF/forskrift/2012-01-19-77
+-# Power at 5250 - 5350 MHz, 5470 - 5725 MHz and 5815 – 5850 MHz can
+-# be doubled if TPC is implemented.
+-# Up to 2W (or 4W with TPC) is allowed in the 5725 – 5795 MHz band
+-# which has been merged with 5470 - 5725 MHz to allow wide channels
++# NO as part of CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# NO: https://eng.nkom.no/technical/temporary-licenses/mobile-videolink/wireless-cameras-mobile-video-links/_attachment/9947
++# NO: http://www.lovdata.no/dokument/SF/forskrift/2012-01-19-77
++# In addition to EU NO can use 5725–5795 MHz and 5815–5850 bands with limit of 4 W EIRP (with DFS and TPC)
+ country NO: DFS-ETSI
+ 	(2400 - 2483.5 @ 40), (100 mW)
+-	(5150 - 5250 @ 80), (200 mW), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5350 @ 80), (100 mW), DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5795 @ 160), (500 mW), DFS, wmmrule=ETSI
+-	(5815 - 5850 @ 35), (2000 mW), DFS
+-	(17100 - 17300 @ 200), (100 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country NP: DFS-JP
+@@ -1020,12 +1169,18 @@ country PK: DFS-JP
+ 	(2402 - 2482 @ 40), (20)
+ 	(5735 - 5835 @ 80), (30)
+ 
++# PL as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
+ country PL: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country PM: DFS-ETSI
+@@ -1041,14 +1196,19 @@ country PR: DFS-FCC
+ 	(5490 - 5730 @ 160), (24), DFS
+ 	(5735 - 5835 @ 80), (30)
+ 
++# PT as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# PT: https://www.anacom.pt/render.jsp?categoryId=336334
+ country PT: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
+ 	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ country PW: DFS-FCC
+@@ -1079,15 +1239,21 @@ country RE: DFS-ETSI
+ 	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+ 	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+ 
++# RO as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# RO: http://www.ancom.org.ro/en/uploads/links_files/ordin_262_2006.pdf
+ country RO: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+-
+ # Source:
+ # http://www.ratel.rs/upload/documents/Plan_namene/Plan_namene-sl_glasnik.pdf
+ country RS: DFS-ETSI
+@@ -1119,18 +1285,20 @@ country SA: DFS-ETSI
+ 	(5250 - 5330 @ 80), (20), DFS, AUTO-BW
+ 	(5490 - 5710 @ 160), (27), DFS
+ 
+-# Source:
+-# https://pts.se/globalassets/startpage/dokument/legala-dokument/foreskrifter/radio/beslutade_ptsfs-2018-3-undantagsforeskrifter.pdf
++# SE as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# SE: https://pts.se/globalassets/startpage/dokument/legala-dokument/foreskrifter/radio/beslutade_ptsfs-2018-3-undantagsforeskrifter.pdf
+ country SE: DFS-ETSI
+-	(2400 - 2483.5 @ 40), (20)
+-	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
+-	# note: max would be +3dB with TPC @ 5250-5725
+-	(5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
+-	(5470 - 5725 @ 160), (27), DFS, wmmrule=ETSI
+-	# short range devices (ETSI EN 300 440)
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
+ 	(5725 - 5875 @ 80), (25 mW)
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
+-	(57000 - 66000 @ 2160), (40), NO-OUTDOOR
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
++	(57000 - 66000 @ 2160), (40)
+ 
+ # Source
+ # https://www.imda.gov.sg/~/media/imda/files/regulation%20licensing%20and%20consultations/ict%20standards/telecommunication%20standards/radio-comms/imdatssrd.pdf?la=en
+@@ -1144,20 +1312,36 @@ country SG: DFS-FCC
+ 	# (5470 - 5725 @ 160), (30), DFS
+ 	(5725 - 5850 @ 80), (30)
+ 
++# SI as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# SI: https://www.akos-rs.si/bwa
+ country SI: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
++# SK as part of EU/CEPT accepted decisions 2005/513/EC (5GHz RLAN, EN 301 893)
++# and 2006/771/EC (amended by 2008/432/EC, Short-Range Devices, EN 300 440)
++#  EU decision 2005/513/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02005D0513-20070213
++#  EU decision 2006/771/EC: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02008D0432-20080611
++# SK: https://www.teleoff.gov.sk/data/files/25911.pdf
++# SK: https://www.teleoff.gov.sk/data/files/41072.pdf
++# SK: https://www.teleoff.gov.sk/data/files/49125_vpr-01_2018-rusi-vpr-10_2014a21_2012-nespecifik-srd_021018.pdf
+ country SK: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW, wmmrule=ETSI
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW, wmmrule=ETSI
+-	(5490 - 5710 @ 160), (27), DFS, wmmrule=ETSI
+-	# 60 GHz band channels 1-4, ref: Etsi En 302 567
++	(2400 - 2483.5 @ 40), (100 mW)
++	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
++	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
++	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
++	# short range devices (ETSI EN 300 440-1)
++	(5725 - 5875 @ 80), (25 mW)
++	# 60 GHz band channels 1-4 (ETSI EN 302 567)
+ 	(57000 - 66000 @ 2160), (40)
+ 
+ # Source:

+ 44 - 0
package/firmware/wireless-regdb/patches/602-wireless-regdb-Update-regulatory-rules-for-Russia-RU.patch

@@ -0,0 +1,44 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+Date: Sat, 24 Aug 2019 11:48:10 +0300
+Subject: [PATCH] wireless-regdb: Update regulatory rules for Russia (RU)
+
+Russian entry is incorrect. According to the last regulations
+document of Feb 29, 2016, 160 MHz channels and 802.11ad are allowed.
+
+http://rfs-rf.ru/upload/medialibrary/c1a/prilozhenie-1-k-resheniyu-gkrch-_-16_36_03.pdf
+
+Note that there was never a DFS requirement in Russia, but always was
+NO-OUTDOOR on 5GHz.
+Maximum power is 200mW that is ~23dBm on all 5GHz channels.
+Also Russia has never been regulated by ETSI.
+
+EIRP has been reduced by 4dBm because of TPC requirement.
+
+Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+
+diff --git a/db.txt b/db.txt
+index f6b2f921416c..9c4b447536e4 100644
+--- a/db.txt
++++ b/db.txt
+@@ -1349,14 +1349,12 @@ country RS: DFS-ETSI
+ 	# 60 GHz band channels 1-4, ref: Etsi En 302 567
+ 	(57000 - 66000 @ 2160), (40)
+ 
+-country RU: DFS-ETSI
+-	(2402 - 2482 @ 40), (20)
+-	(5170 - 5250 @ 80), (20), AUTO-BW
+-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW
+-	(5650 - 5730 @ 80), (30), DFS
+-	(5735 - 5835 @ 80), (30)
++country RU:
++	(2400 - 2483.5 @ 40), (20)
++	(5150 - 5350 @ 160), (20), NO-OUTDOOR
++	(5650 - 5850 @ 160), (20), NO-OUTDOOR
+ 	# 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf
+-	(57000 - 66000 @ 2160), (40)
++	(57000 - 66000 @ 2160), (40), NO-OUTDOOR
+ 
+ country RW: DFS-FCC
+ 	(2402 - 2482 @ 40), (20)

+ 3 - 3
package/kernel/mac80211/Makefile

@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
 
 
 PKG_NAME:=mac80211
 PKG_NAME:=mac80211
 
 
-PKG_VERSION:=4.19.112-1
+PKG_VERSION:=4.19.120-1
 PKG_RELEASE:=1
 PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.112/
-PKG_HASH:=e60a7aec902638c538b150d0d6165d866eb804845b97d7770acd653fd6a6b718
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.120/
+PKG_HASH:=2bafd75da301a30a5f2b98f433b6545d7b58c1fc3af15e9e9aa085df7f9db1d4
 
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)

+ 1 - 1
package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch

@@ -1,6 +1,6 @@
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3800,6 +3800,12 @@ out:
+@@ -3822,6 +3822,12 @@ out:
  netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
  netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
  				       struct net_device *dev)
  				       struct net_device *dev)
  {
  {

+ 3 - 3
package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch

@@ -77,7 +77,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  
  	atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
  	atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
  
  
-@@ -2046,6 +2048,7 @@ void ieee80211_txq_remove_vlan(struct ie
+@@ -2047,6 +2049,7 @@ void ieee80211_txq_remove_vlan(struct ie
  			       struct ieee80211_sub_if_data *sdata);
  			       struct ieee80211_sub_if_data *sdata);
  void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
  void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
  			      struct txq_info *txqi);
  			      struct txq_info *txqi);
@@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		     (unsigned long) local);
  		     (unsigned long) local);
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3485,13 +3485,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
+@@ -3487,13 +3487,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
  	struct ieee80211_tx_info *info;
  	struct ieee80211_tx_info *info;
  	struct ieee80211_tx_data tx;
  	struct ieee80211_tx_data tx;
  	ieee80211_tx_result r;
  	ieee80211_tx_result r;
@@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	/* Make sure fragments stay together. */
  	/* Make sure fragments stay together. */
  	skb = __skb_dequeue(&txqi->frags);
  	skb = __skb_dequeue(&txqi->frags);
  	if (skb)
  	if (skb)
-@@ -3586,6 +3592,7 @@ begin:
+@@ -3606,6 +3612,7 @@ begin:
  	}
  	}
  
  
  	IEEE80211_SKB_CB(skb)->control.vif = vif;
  	IEEE80211_SKB_CB(skb)->control.vif = vif;

+ 82 - 0
package/kernel/mac80211/patches/subsys/305-mac80211-fix-tx-status-for-no-ack-cases.patch

@@ -0,0 +1,82 @@
+From: Markus Theil <markus.theil@tu-ilmenau.de>
+Date: Wed, 18 Dec 2019 15:27:36 +0100
+Subject: [PATCH] mac80211: fix tx status for no ack cases
+
+Before this patch, frames which where successfully transmitted without
+requiring acks where accounted as lost frames.
+
+Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
+Link: https://lore.kernel.org/r/20191218142736.15843-1-markus.theil@tu-ilmenau.de
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+---
+
+--- a/net/mac80211/status.c
++++ b/net/mac80211/status.c
+@@ -719,6 +719,7 @@ static void __ieee80211_tx_status(struct
+ 	int rates_idx;
+ 	bool send_to_cooked;
+ 	bool acked;
++	bool noack_success;
+ 	struct ieee80211_bar *bar;
+ 	int shift = 0;
+ 	int tid = IEEE80211_NUM_TIDS;
+@@ -736,6 +737,8 @@ static void __ieee80211_tx_status(struct
+ 			clear_sta_flag(sta, WLAN_STA_SP);
+ 
+ 		acked = !!(info->flags & IEEE80211_TX_STAT_ACK);
++		noack_success = !!(info->flags &
++				   IEEE80211_TX_STAT_NOACK_TRANSMITTED);
+ 
+ 		/* mesh Peer Service Period support */
+ 		if (ieee80211_vif_is_mesh(&sta->sdata->vif) &&
+@@ -800,12 +803,12 @@ static void __ieee80211_tx_status(struct
+ 			ieee80211_handle_filtered_frame(local, sta, skb);
+ 			return;
+ 		} else {
+-			if (!acked)
++			if (!acked && !noack_success)
+ 				sta->status_stats.retry_failed++;
+ 			sta->status_stats.retry_count += retry_count;
+ 
+ 			if (ieee80211_is_data_present(fc)) {
+-				if (!acked)
++				if (!acked && !noack_success)
+ 					sta->status_stats.msdu_failed[tid]++;
+ 
+ 				sta->status_stats.msdu_retries[tid] +=
+@@ -826,7 +829,7 @@ static void __ieee80211_tx_status(struct
+ 						acked, info->status.tx_time);
+ 
+ 		if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) {
+-			if (info->flags & IEEE80211_TX_STAT_ACK) {
++			if (acked) {
+ 				if (sta->status_stats.lost_packets)
+ 					sta->status_stats.lost_packets = 0;
+ 
+@@ -834,6 +837,8 @@ static void __ieee80211_tx_status(struct
+ 				if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH))
+ 					sta->status_stats.last_tdls_pkt_time =
+ 						jiffies;
++			} else if (noack_success) {
++				/* nothing to do here, do not account as lost */
+ 			} else {
+ 				ieee80211_lost_packet(sta, info);
+ 			}
+@@ -959,7 +964,7 @@ void ieee80211_tx_status_ext(struct ieee
+ 
+ 		sta = container_of(pubsta, struct sta_info, sta);
+ 
+-		if (!acked)
++		if (!acked && !noack_success)
+ 			sta->status_stats.retry_failed++;
+ 		sta->status_stats.retry_count += retry_count;
+ 
+@@ -974,6 +979,8 @@ void ieee80211_tx_status_ext(struct ieee
+ 				sta->status_stats.last_tdls_pkt_time = jiffies;
+ 		} else if (test_sta_flag(sta, WLAN_STA_PS_STA)) {
+ 			return;
++		} else if (noack_success) {
++			/* nothing to do here, do not account as lost */
+ 		} else {
+ 			ieee80211_lost_packet(sta, info);
+ 		}

+ 3 - 3
package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch

@@ -191,7 +191,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  
 --- a/net/mac80211/sta_info.c
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -1244,7 +1244,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
+@@ -1249,7 +1249,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
  			if (!txq_has_queue(sta->sta.txq[i]))
  			if (!txq_has_queue(sta->sta.txq[i]))
  				continue;
  				continue;
  
  
@@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  
  	return true;
  	return true;
  }
  }
-@@ -3600,6 +3604,60 @@ out:
+@@ -3620,6 +3624,60 @@ out:
  }
  }
  EXPORT_SYMBOL(ieee80211_tx_dequeue);
  EXPORT_SYMBOL(ieee80211_tx_dequeue);
  
  
@@ -289,4 +289,4 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
 +
 +
  void __ieee80211_subif_start_xmit(struct sk_buff *skb,
  void __ieee80211_subif_start_xmit(struct sk_buff *skb,
  				  struct net_device *dev,
  				  struct net_device *dev,
- 				  u32 info_flags)
+ 				  u32 info_flags,

+ 6 - 6
package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch

@@ -302,7 +302,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	}
  	}
  
  
  	for (i = 0; i < IEEE80211_NUM_TIDS; i++)
  	for (i = 0; i < IEEE80211_NUM_TIDS; i++)
-@@ -1821,6 +1821,27 @@ void ieee80211_sta_set_buffered(struct i
+@@ -1826,6 +1826,27 @@ void ieee80211_sta_set_buffered(struct i
  }
  }
  EXPORT_SYMBOL(ieee80211_sta_set_buffered);
  EXPORT_SYMBOL(ieee80211_sta_set_buffered);
  
  
@@ -330,7 +330,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  int sta_info_move_state(struct sta_info *sta,
  int sta_info_move_state(struct sta_info *sta,
  			enum ieee80211_sta_state new_state)
  			enum ieee80211_sta_state new_state)
  {
  {
-@@ -2187,6 +2208,23 @@ void sta_set_sinfo(struct sta_info *sta,
+@@ -2192,6 +2213,23 @@ void sta_set_sinfo(struct sta_info *sta,
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
  	}
  	}
  
  
@@ -385,7 +385,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	 */
  	 */
 --- a/net/mac80211/status.c
 --- a/net/mac80211/status.c
 +++ b/net/mac80211/status.c
 +++ b/net/mac80211/status.c
-@@ -825,6 +825,12 @@ static void __ieee80211_tx_status(struct
+@@ -828,6 +828,12 @@ static void __ieee80211_tx_status(struct
  			ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data,
  			ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data,
  						acked, info->status.tx_time);
  						acked, info->status.tx_time);
  
  
@@ -396,7 +396,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
 +						       info->status.tx_time, 0);
 +						       info->status.tx_time, 0);
 +
 +
  		if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) {
  		if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) {
- 			if (info->flags & IEEE80211_TX_STAT_ACK) {
+ 			if (acked) {
  				if (sta->status_stats.lost_packets)
  				if (sta->status_stats.lost_packets)
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
@@ -412,7 +412,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
  	spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
  	list_del_init(&txqi->schedule_order);
  	list_del_init(&txqi->schedule_order);
  	spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
  	spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
-@@ -3611,11 +3614,28 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3631,11 +3634,28 @@ struct ieee80211_txq *ieee80211_next_txq
  
  
  	lockdep_assert_held(&local->active_txq_lock[ac]);
  	lockdep_assert_held(&local->active_txq_lock[ac]);
  
  
@@ -442,7 +442,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		return NULL;
  		return NULL;
  
  
  	list_del_init(&txqi->schedule_order);
  	list_del_init(&txqi->schedule_order);
-@@ -3633,12 +3653,74 @@ void ieee80211_return_txq(struct ieee802
+@@ -3653,12 +3673,74 @@ void ieee80211_return_txq(struct ieee802
  	lockdep_assert_held(&local->active_txq_lock[txq->ac]);
  	lockdep_assert_held(&local->active_txq_lock[txq->ac]);
  
  
  	if (list_empty(&txqi->schedule_order) &&
  	if (list_empty(&txqi->schedule_order) &&

+ 1 - 1
package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch

@@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3673,6 +3673,19 @@ void ieee80211_return_txq(struct ieee802
+@@ -3693,6 +3693,19 @@ void ieee80211_return_txq(struct ieee802
  }
  }
  EXPORT_SYMBOL(ieee80211_return_txq);
  EXPORT_SYMBOL(ieee80211_return_txq);
  
  

+ 4 - 4
package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch

@@ -48,15 +48,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (likely(sta)) {
  	if (likely(sta)) {
  		if (!IS_ERR(sta))
  		if (!IS_ERR(sta))
  			tx->sta = sta;
  			tx->sta = sta;
-@@ -3523,6 +3523,7 @@ begin:
+@@ -3525,6 +3525,7 @@ begin:
  	tx.local = local;
  	tx.local = local;
  	tx.skb = skb;
  	tx.skb = skb;
  	tx.sdata = vif_to_sdata(info->control.vif);
  	tx.sdata = vif_to_sdata(info->control.vif);
 +	tx.hdrlen = ieee80211_hdrlen(hdr->frame_control);
 +	tx.hdrlen = ieee80211_hdrlen(hdr->frame_control);
  
  
- 	if (txq->sta)
+ 	if (txq->sta) {
  		tx.sta = container_of(txq->sta, struct sta_info, sta);
  		tx.sta = container_of(txq->sta, struct sta_info, sta);
-@@ -3549,7 +3550,7 @@ begin:
+@@ -3569,7 +3570,7 @@ begin:
  
  
  		if (tx.key &&
  		if (tx.key &&
  		    (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
  		    (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
@@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  		ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
  		ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
  					   tx.key, skb);
  					   tx.key, skb);
-@@ -4006,6 +4007,7 @@ ieee80211_build_data_template(struct iee
+@@ -4028,6 +4029,7 @@ ieee80211_build_data_template(struct iee
  	hdr = (void *)skb->data;
  	hdr = (void *)skb->data;
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	tx.skb = skb;
  	tx.skb = skb;

+ 7 - 7
package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch

@@ -236,7 +236,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (skb->len < len_rthdr + hdrlen)
  	if (skb->len < len_rthdr + hdrlen)
  		goto fail;
  		goto fail;
-@@ -2440,7 +2439,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2441,7 +2440,7 @@ static struct sk_buff *ieee80211_build_h
  	struct ieee80211_chanctx_conf *chanctx_conf;
  	struct ieee80211_chanctx_conf *chanctx_conf;
  	struct ieee80211_sub_if_data *ap_sdata;
  	struct ieee80211_sub_if_data *ap_sdata;
  	enum nl80211_band band;
  	enum nl80211_band band;
@@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (IS_ERR(sta))
  	if (IS_ERR(sta))
  		sta = NULL;
  		sta = NULL;
-@@ -2739,7 +2738,9 @@ static struct sk_buff *ieee80211_build_h
+@@ -2740,7 +2739,9 @@ static struct sk_buff *ieee80211_build_h
  	}
  	}
  
  
  	skb_pull(skb, skip_header_bytes);
  	skb_pull(skb, skip_header_bytes);
@@ -255,7 +255,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	/*
  	/*
  	 * So we need to modify the skb header and hence need a copy of
  	 * So we need to modify the skb header and hence need a copy of
-@@ -2772,6 +2773,9 @@ static struct sk_buff *ieee80211_build_h
+@@ -2773,6 +2774,9 @@ static struct sk_buff *ieee80211_build_h
  		memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
  		memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
  #endif
  #endif
  
  
@@ -265,7 +265,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (ieee80211_is_data_qos(fc)) {
  	if (ieee80211_is_data_qos(fc)) {
  		__le16 *qos_control;
  		__le16 *qos_control;
  
  
-@@ -2947,6 +2951,8 @@ void ieee80211_check_fast_xmit(struct st
+@@ -2949,6 +2953,8 @@ void ieee80211_check_fast_xmit(struct st
  		fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
  		fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
  	}
  	}
  
  
@@ -274,16 +274,16 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	/* We store the key here so there's no point in using rcu_dereference()
  	/* We store the key here so there's no point in using rcu_dereference()
  	 * but that's fine because the code that changes the pointers will call
  	 * but that's fine because the code that changes the pointers will call
  	 * this function after doing so. For a single CPU that would be enough,
  	 * this function after doing so. For a single CPU that would be enough,
-@@ -3523,7 +3529,7 @@ begin:
+@@ -3525,7 +3531,7 @@ begin:
  	tx.local = local;
  	tx.local = local;
  	tx.skb = skb;
  	tx.skb = skb;
  	tx.sdata = vif_to_sdata(info->control.vif);
  	tx.sdata = vif_to_sdata(info->control.vif);
 -	tx.hdrlen = ieee80211_hdrlen(hdr->frame_control);
 -	tx.hdrlen = ieee80211_hdrlen(hdr->frame_control);
 +	tx.hdrlen = ieee80211_padded_hdrlen(hw, hdr->frame_control);
 +	tx.hdrlen = ieee80211_padded_hdrlen(hw, hdr->frame_control);
  
  
- 	if (txq->sta)
+ 	if (txq->sta) {
  		tx.sta = container_of(txq->sta, struct sta_info, sta);
  		tx.sta = container_of(txq->sta, struct sta_info, sta);
-@@ -4007,7 +4013,7 @@ ieee80211_build_data_template(struct iee
+@@ -4029,7 +4035,7 @@ ieee80211_build_data_template(struct iee
  	hdr = (void *)skb->data;
  	hdr = (void *)skb->data;
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	tx.skb = skb;
  	tx.skb = skb;

+ 5 - 5
package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch

@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
   * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3617,16 +3617,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
+@@ -3637,16 +3637,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
  {
  {
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct ieee80211_local *local = hw_to_local(hw);
@@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (txqi->txq.sta) {
  	if (txqi->txq.sta) {
  		struct sta_info *sta = container_of(txqi->txq.sta,
  		struct sta_info *sta = container_of(txqi->txq.sta,
-@@ -3643,21 +3644,25 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3663,21 +3664,25 @@ struct ieee80211_txq *ieee80211_next_txq
  
  
  
  
  	if (txqi->schedule_round == local->schedule_round[ac])
  	if (txqi->schedule_round == local->schedule_round[ac])
@@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (list_empty(&txqi->schedule_order) &&
  	if (list_empty(&txqi->schedule_order) &&
  	    (!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) {
  	    (!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) {
-@@ -3677,18 +3682,7 @@ void ieee80211_return_txq(struct ieee802
+@@ -3697,18 +3702,7 @@ void ieee80211_return_txq(struct ieee802
  			list_add_tail(&txqi->schedule_order,
  			list_add_tail(&txqi->schedule_order,
  				      &local->active_txqs[txq->ac]);
  				      &local->active_txqs[txq->ac]);
  	}
  	}
@@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	spin_unlock_bh(&local->active_txq_lock[txq->ac]);
  	spin_unlock_bh(&local->active_txq_lock[txq->ac]);
  }
  }
  EXPORT_SYMBOL(ieee80211_schedule_txq);
  EXPORT_SYMBOL(ieee80211_schedule_txq);
-@@ -3701,7 +3695,7 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -3721,7 +3715,7 @@ bool ieee80211_txq_may_transmit(struct i
  	struct sta_info *sta;
  	struct sta_info *sta;
  	u8 ac = txq->ac;
  	u8 ac = txq->ac;
  
  
@@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (!txqi->txq.sta)
  	if (!txqi->txq.sta)
  		goto out;
  		goto out;
-@@ -3731,34 +3725,27 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -3751,34 +3745,27 @@ bool ieee80211_txq_may_transmit(struct i
  
  
  	sta->airtime[ac].deficit += sta->airtime_weight;
  	sta->airtime[ac].deficit += sta->airtime_weight;
  	list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
  	list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);

+ 3 - 3
package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch

@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		}
  		}
  	}
  	}
  
  
-@@ -1146,13 +1142,10 @@ int mesh_nexthop_resolve(struct ieee8021
+@@ -1147,13 +1143,10 @@ int mesh_nexthop_resolve(struct ieee8021
  	info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
  	info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
  	ieee80211_set_qos_hdr(sdata, skb);
  	ieee80211_set_qos_hdr(sdata, skb);
  	skb_queue_tail(&mpath->frame_queue, skb);
  	skb_queue_tail(&mpath->frame_queue, skb);
@@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  }
  
  
  /**
  /**
-@@ -1172,13 +1165,10 @@ int mesh_nexthop_lookup(struct ieee80211
+@@ -1173,13 +1166,10 @@ int mesh_nexthop_lookup(struct ieee80211
  	struct sta_info *next_hop;
  	struct sta_info *next_hop;
  	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
  	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
  	u8 *target_addr = hdr->addr3;
  	u8 *target_addr = hdr->addr3;
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (time_after(jiffies,
  	if (time_after(jiffies,
  		       mpath->exp_time -
  		       mpath->exp_time -
-@@ -1193,12 +1183,10 @@ int mesh_nexthop_lookup(struct ieee80211
+@@ -1194,12 +1184,10 @@ int mesh_nexthop_lookup(struct ieee80211
  		memcpy(hdr->addr1, next_hop->sta.addr, ETH_ALEN);
  		memcpy(hdr->addr1, next_hop->sta.addr, ETH_ALEN);
  		memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
  		memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
  		ieee80211_mps_set_frame_flags(sdata, next_hop, hdr);
  		ieee80211_mps_set_frame_flags(sdata, next_hop, hdr);

+ 3 - 3
package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch

@@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	schedule_and_wake_txq(local, txqi);
  	schedule_and_wake_txq(local, txqi);
  
  
-@@ -3198,6 +3199,7 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3200,6 +3201,7 @@ static bool ieee80211_amsdu_aggregate(st
  	u8 max_subframes = sta->sta.max_amsdu_subframes;
  	u8 max_subframes = sta->sta.max_amsdu_subframes;
  	int max_frags = local->hw.max_tx_fragments;
  	int max_frags = local->hw.max_tx_fragments;
  	int max_amsdu_len = sta->sta.max_amsdu_len;
  	int max_amsdu_len = sta->sta.max_amsdu_len;
@@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	int orig_truesize;
  	int orig_truesize;
  	__be16 len;
  	__be16 len;
  	void *data;
  	void *data;
-@@ -3220,6 +3222,8 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3222,6 +3224,8 @@ static bool ieee80211_amsdu_aggregate(st
  		max_amsdu_len = min_t(int, max_amsdu_len,
  		max_amsdu_len = min_t(int, max_amsdu_len,
  				      sta->sta.max_rc_amsdu_len);
  				      sta->sta.max_rc_amsdu_len);
  
  
@@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	spin_lock_bh(&fq->lock);
  	spin_lock_bh(&fq->lock);
  
  
  	/* TODO: Ideally aggregation should be done on dequeue to remain
  	/* TODO: Ideally aggregation should be done on dequeue to remain
-@@ -3227,7 +3231,8 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3229,7 +3233,8 @@ static bool ieee80211_amsdu_aggregate(st
  	 */
  	 */
  
  
  	tin = &txqi->tin;
  	tin = &txqi->tin;

+ 4 - 4
package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3505,6 +3505,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
+@@ -3507,6 +3507,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
  	ieee80211_tx_result r;
  	ieee80211_tx_result r;
  	struct ieee80211_vif *vif = txq->vif;
  	struct ieee80211_vif *vif = txq->vif;
  
  
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	spin_lock_bh(&fq->lock);
  	spin_lock_bh(&fq->lock);
  
  
  	if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
  	if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
-@@ -3521,11 +3522,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
+@@ -3523,11 +3524,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
  	if (skb)
  	if (skb)
  		goto out;
  		goto out;
  
  
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	hdr = (struct ieee80211_hdr *)skb->data;
  	hdr = (struct ieee80211_hdr *)skb->data;
  	info = IEEE80211_SKB_CB(skb);
  	info = IEEE80211_SKB_CB(skb);
  
  
-@@ -3571,8 +3573,11 @@ begin:
+@@ -3591,8 +3593,11 @@ begin:
  
  
  		skb = __skb_dequeue(&tx.skbs);
  		skb = __skb_dequeue(&tx.skbs);
  
  
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	}
  	}
  
  
  	if (skb && skb_has_frag_list(skb) &&
  	if (skb && skb_has_frag_list(skb) &&
-@@ -3611,6 +3616,7 @@ begin:
+@@ -3631,6 +3636,7 @@ begin:
  	}
  	}
  
  
  	IEEE80211_SKB_CB(skb)->control.vif = vif;
  	IEEE80211_SKB_CB(skb)->control.vif = vif;

+ 4 - 4
package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch

@@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 
 --- a/net/mac80211/ieee80211_i.h
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1761,6 +1761,9 @@ void ieee80211_clear_fast_xmit(struct st
+@@ -1762,6 +1762,9 @@ void ieee80211_clear_fast_xmit(struct st
  int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
  int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
  			      const u8 *buf, size_t len,
  			      const u8 *buf, size_t len,
  			      const u8 *dest, __be16 proto, bool unencrypted);
  			      const u8 *dest, __be16 proto, bool unencrypted);
@@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		ieee80211_free_txskb(&local->hw, skb);
  		ieee80211_free_txskb(&local->hw, skb);
  		return;
  		return;
  	}
  	}
-@@ -2740,30 +2746,14 @@ static struct sk_buff *ieee80211_build_h
+@@ -2741,30 +2747,14 @@ static struct sk_buff *ieee80211_build_h
  
  
  	skb_pull(skb, skip_header_bytes);
  	skb_pull(skb, skip_header_bytes);
  	padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
  	padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
@@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	}
  	}
  
  
  	if (encaps_data)
  	if (encaps_data)
-@@ -3375,7 +3365,6 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3377,7 +3367,6 @@ static bool ieee80211_xmit_fast(struct i
  	struct ieee80211_local *local = sdata->local;
  	struct ieee80211_local *local = sdata->local;
  	u16 ethertype = (skb->data[12] << 8) | skb->data[13];
  	u16 ethertype = (skb->data[12] << 8) | skb->data[13];
  	int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
  	int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
@@ -188,7 +188,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	struct ethhdr eth;
  	struct ethhdr eth;
  	struct ieee80211_tx_info *info;
  	struct ieee80211_tx_info *info;
  	struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
  	struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
-@@ -3427,10 +3416,7 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3429,10 +3418,7 @@ static bool ieee80211_xmit_fast(struct i
  	 * as the may-encrypt argument for the resize to not account for
  	 * as the may-encrypt argument for the resize to not account for
  	 * more room than we already have in 'extra_head'
  	 * more room than we already have in 'extra_head'
  	 */
  	 */

+ 3 - 3
package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch

@@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /**
  /**
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3653,8 +3653,9 @@ out:
+@@ -3673,8 +3673,9 @@ out:
  }
  }
  EXPORT_SYMBOL(ieee80211_next_txq);
  EXPORT_SYMBOL(ieee80211_next_txq);
  
  
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  {
  {
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct txq_info *txqi = to_txq_info(txq);
  	struct txq_info *txqi = to_txq_info(txq);
-@@ -3662,7 +3663,8 @@ void ieee80211_schedule_txq(struct ieee8
+@@ -3682,7 +3683,8 @@ void ieee80211_schedule_txq(struct ieee8
  	spin_lock_bh(&local->active_txq_lock[txq->ac]);
  	spin_lock_bh(&local->active_txq_lock[txq->ac]);
  
  
  	if (list_empty(&txqi->schedule_order) &&
  	if (list_empty(&txqi->schedule_order) &&
@@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		/* If airtime accounting is active, always enqueue STAs at the
  		/* If airtime accounting is active, always enqueue STAs at the
  		 * head of the list to ensure that they only get moved to the
  		 * head of the list to ensure that they only get moved to the
  		 * back by the airtime DRR scheduler once they have a negative
  		 * back by the airtime DRR scheduler once they have a negative
-@@ -3682,7 +3684,7 @@ void ieee80211_schedule_txq(struct ieee8
+@@ -3702,7 +3704,7 @@ void ieee80211_schedule_txq(struct ieee8
  
  
  	spin_unlock_bh(&local->active_txq_lock[txq->ac]);
  	spin_unlock_bh(&local->active_txq_lock[txq->ac]);
  }
  }

+ 3 - 3
package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch

@@ -13,15 +13,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 
 --- a/net/mac80211/tx.c
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3751,6 +3751,7 @@ void __ieee80211_subif_start_xmit(struct
- 				  u32 info_flags)
+@@ -3772,6 +3772,7 @@ void __ieee80211_subif_start_xmit(struct
+ 				  u32 ctrl_flags)
  {
  {
  	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 +	struct ieee80211_local *local = sdata->local;
 +	struct ieee80211_local *local = sdata->local;
  	struct sta_info *sta;
  	struct sta_info *sta;
  	struct sk_buff *next;
  	struct sk_buff *next;
  
  
-@@ -3764,7 +3765,15 @@ void __ieee80211_subif_start_xmit(struct
+@@ -3785,7 +3786,15 @@ void __ieee80211_subif_start_xmit(struct
  	if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
  	if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
  		goto out_free;
  		goto out_free;
  
  

+ 1 - 1
package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch

@@ -54,7 +54,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	}
  	}
 --- a/net/mac80211/ieee80211_i.h
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -2070,7 +2070,8 @@ void ieee80211_send_auth(struct ieee8021
+@@ -2071,7 +2071,8 @@ void ieee80211_send_auth(struct ieee8021
  			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
  			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
  			 u32 tx_flags);
  			 u32 tx_flags);
  void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
  void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,

+ 1 - 1
package/libs/libjson-c/Makefile

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=json-c
 PKG_NAME:=json-c
 PKG_VERSION:=0.12.1
 PKG_VERSION:=0.12.1
-PKG_RELEASE:=3
+PKG_RELEASE:=3.1
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
 PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
 PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/

+ 1 - 1
package/libs/libjson-c/patches/000-libm.patch

@@ -1,6 +1,6 @@
 --- a/configure.ac
 --- a/configure.ac
 +++ b/configure.ac
 +++ b/configure.ac
-@@ -43,12 +43,6 @@
+@@ -43,12 +43,6 @@ AC_FUNC_MEMCMP
  AC_FUNC_MALLOC
  AC_FUNC_MALLOC
  AC_FUNC_REALLOC
  AC_FUNC_REALLOC
  AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
  AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)

+ 32 - 0
package/libs/libjson-c/patches/001-Prevent-division-by-zero-in-linkhash.patch

@@ -0,0 +1,32 @@
+From 77d935b7ae7871a1940cd827e850e6063044ec45 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Mon, 4 May 2020 19:46:45 +0200
+Subject: [PATCH 2/2] Prevent division by zero in linkhash.
+
+If a linkhash with a size of zero is created, then modulo operations
+are prone to division by zero operations.
+
+Purely protective measure against bad usage.
+---
+ linkhash.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/linkhash.c
++++ b/linkhash.c
+@@ -10,6 +10,7 @@
+  *
+  */
+ 
++#include <assert.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -431,6 +432,8 @@ struct lh_table* lh_table_new(int size,
+ 	int i;
+ 	struct lh_table *t;
+ 
++  /* Allocate space for elements to avoid divisions by zero. */
++  assert(size > 0);
+ 	t = (struct lh_table*)calloc(1, sizeof(struct lh_table));
+ 	if(!t) lh_abort("lh_table_new: calloc failed\n");
+ 	t->count = 0;

+ 83 - 0
package/libs/libjson-c/patches/002-Fix-integer-overflows.patch

@@ -0,0 +1,83 @@
+From d07b91014986900a3a75f306d302e13e005e9d67 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Mon, 4 May 2020 19:47:25 +0200
+Subject: [PATCH] Fix integer overflows.
+
+The data structures linkhash and printbuf are limited to 2 GB in size
+due to a signed integer being used to track their current size.
+
+If too much data is added, then size variable can overflow, which is
+an undefined behaviour in C programming language.
+
+Assuming that a signed int overflow just leads to a negative value,
+like it happens on many sytems (Linux i686/amd64 with gcc), then
+printbuf is vulnerable to an out of boundary write on 64 bit systems.
+---
+ linkhash.c |  7 +++++--
+ printbuf.c | 19 ++++++++++++++++---
+ 2 files changed, 21 insertions(+), 5 deletions(-)
+
+--- a/linkhash.c
++++ b/linkhash.c
+@@ -498,7 +498,12 @@ int lh_table_insert(struct lh_table *t,
+ 	unsigned long h, n;
+ 
+ 	t->inserts++;
+-	if(t->count >= t->size * LH_LOAD_FACTOR) lh_table_resize(t, t->size * 2);
++	if(t->count >= t->size * LH_LOAD_FACTOR) {
++		/* Avoid signed integer overflow with large tables. */
++		int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2);
++		if (t->size != INT_MAX)
++			lh_table_resize(t, new_size);
++	}
+ 
+ 	h = t->hash_fn(k);
+ 	n = h % t->size;
+--- a/printbuf.c
++++ b/printbuf.c
+@@ -15,6 +15,7 @@
+ 
+ #include "config.h"
+ 
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -63,7 +64,16 @@ static int printbuf_extend(struct printb
+ 	if (p->size >= min_size)
+ 		return 0;
+ 
+-	new_size = json_max(p->size * 2, min_size + 8);
++	/* Prevent signed integer overflows with large buffers. */
++	if (min_size > INT_MAX - 8)
++		return -1;
++	if (p->size > INT_MAX / 2)
++		new_size = min_size + 8;
++	else {
++		new_size = p->size * 2;
++		if (new_size < min_size + 8)
++			new_size = min_size + 8;
++	}
+ #ifdef PRINTBUF_DEBUG
+ 	MC_DEBUG("printbuf_memappend: realloc "
+ 	  "bpos=%d min_size=%d old_size=%d new_size=%d\n",
+@@ -78,6 +88,9 @@ static int printbuf_extend(struct printb
+ 
+ int printbuf_memappend(struct printbuf *p, const char *buf, int size)
+ {
++  /* Prevent signed integer overflows with large buffers. */
++  if (size > INT_MAX - p->bpos - 1)
++    return -1;
+   if (p->size <= p->bpos + size + 1) {
+     if (printbuf_extend(p, p->bpos + size + 1) < 0)
+       return -1;
+@@ -94,6 +107,9 @@ int printbuf_memset(struct printbuf *pb,
+ 
+ 	if (offset == -1)
+ 		offset = pb->bpos;
++	/* Prevent signed integer overflows with large buffers. */
++	if (len > INT_MAX - offset)
++		return -1;
+ 	size_needed = offset + len;
+ 	if (pb->size < size_needed)
+ 	{

+ 1 - 1
package/libs/libpcap/Makefile

@@ -20,7 +20,7 @@ PKG_FIXUP:=patch-libtool
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 
 
 PKG_INSTALL:=1
 PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=0
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE:=BSD-3-Clause
 
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/package.mk

+ 3 - 3
package/libs/libubox/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/libubox.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/libubox.git
-PKG_MIRROR_HASH:=c53aae4b8d5ec15625a4cbf7f37e6b62a6cb258ef0310c0f620064ba94589377
-PKG_SOURCE_DATE:=2020-01-20
-PKG_SOURCE_VERSION:=43a103ff17ee5872669f8712606578c90c14591d
+PKG_MIRROR_HASH:=3d58def8e415ceda8aacfd8453813d8bf2a05991c0df0c074744639ab04321ba
+PKG_SOURCE_DATE:=2020-05-25
+PKG_SOURCE_VERSION:=66195aee50424cbda0c2d858014e4cc58a2dc029
 CMAKE_INSTALL:=1
 CMAKE_INSTALL:=1
 
 
 PKG_LICENSE:=ISC
 PKG_LICENSE:=ISC

+ 3 - 3
package/libs/uclient/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/uclient.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/uclient.git
-PKG_MIRROR_HASH:=b1127b28f98c9b45e046a76086b281b35c094fad1dc511ce0af095b733c86359
-PKG_SOURCE_DATE:=2019-05-30
-PKG_SOURCE_VERSION:=3b3e368dead01979e985cb167873fe9868b15d19
+PKG_MIRROR_HASH:=09857c0463c9ff56ae37fff4a73f58008ea2d844c909aab6669277afa8ef1e72
+PKG_SOURCE_DATE:=2020-06-17
+PKG_SOURCE_VERSION:=51e16ebffc740c6afcdd45aced20fc0354a502d7
 CMAKE_INSTALL:=1
 CMAKE_INSTALL:=1
 
 
 PKG_BUILD_DEPENDS:=ustream-ssl
 PKG_BUILD_DEPENDS:=ustream-ssl

+ 4 - 4
package/libs/ustream-ssl/Makefile

@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=ustream-ssl
 PKG_NAME:=ustream-ssl
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/ustream-ssl.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/ustream-ssl.git
-PKG_SOURCE_DATE:=2019-11-05
-PKG_SOURCE_VERSION:=c9b6668215a27f2346d5eedd6f29cc720985b448
-PKG_MIRROR_HASH:=28b53b7e27b68d62c8fbbc57660d915bdcb6a464157c1930f16ed67e151398e9
+PKG_SOURCE_DATE:=2020-03-13
+PKG_SOURCE_VERSION:=40b563b1ea89dabb2b6cd90644908134a0c8eff2
+PKG_MIRROR_HASH:=db562c9919b4045c7b735c935b0a93983686b827ec4d537e8aa875c7e6df21a1
 CMAKE_INSTALL:=1
 CMAKE_INSTALL:=1
 
 
 PKG_LICENSE:=ISC
 PKG_LICENSE:=ISC

+ 1 - 1
package/network/config/qos-scripts/Makefile

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=qos-scripts
 PKG_NAME:=qos-scripts
 PKG_VERSION:=1.3.1
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0
 
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

+ 13 - 7
package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

@@ -22,15 +22,20 @@ add_insmod() {
 [ -e /etc/config/network ] && {
 [ -e /etc/config/network ] && {
 	# only try to parse network config on librecmc
 	# only try to parse network config on librecmc
 
 
-	find_ifname() {(
-		reset_cb
-		include /lib/network
-		scan_interfaces
-		config_get "$1" ifname
-	)}
+	. /lib/functions/network.sh
+
+	find_ifname() {
+		local ifname
+		if network_get_device ifname "$1"; then
+			echo "$ifname"
+		else
+			echo "Device for interface $1 not found." >&2
+			exit 1
+		fi
+	}
 } || {
 } || {
 	find_ifname() {
 	find_ifname() {
-		echo "Interface not found."
+		echo "Interface not found." >&2
 		exit 1
 		exit 1
 	}
 	}
 }
 }
@@ -218,6 +223,7 @@ qos_parse_config() {
 				config_get device "$1" device
 				config_get device "$1" device
 				[ -z "$device" ] && {
 				[ -z "$device" ] && {
 					device="$(find_ifname $1)"
 					device="$(find_ifname $1)"
+					[ -z "$device" ] && exit 1
 					config_set "$1" device "$device"
 					config_set "$1" device "$device"
 				}
 				}
 			}
 			}

+ 1 - 1
package/network/services/dnsmasq/Makefile

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=dnsmasq
 PKG_NAME:=dnsmasq
 PKG_UPSTREAM_VERSION:=2.80
 PKG_UPSTREAM_VERSION:=2.80
 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
-PKG_RELEASE:=16
+PKG_RELEASE:=16.1
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq

+ 2 - 3
package/network/services/dnsmasq/files/dnsmasq.init

@@ -963,10 +963,9 @@ dnsmasq_start()
 		xappend "--conf-file=$TRUSTANCHORSFILE"
 		xappend "--conf-file=$TRUSTANCHORSFILE"
 		xappend "--dnssec"
 		xappend "--dnssec"
 		[ -x /etc/init.d/sysntpd ] && {
 		[ -x /etc/init.d/sysntpd ] && {
-			/etc/init.d/sysntpd enabled
-			[ "$?" -ne 0 -o "$(uci_get system.ntp.enabled)" = "1" ] && {
+			if /etc/init.d/sysntpd enabled || [ "$(uci_get system.ntp.enabled)" = "1" ] ; then
 				[ -f "$TIMEVALIDFILE" ] || xappend "--dnssec-no-timecheck"
 				[ -f "$TIMEVALIDFILE" ] || xappend "--dnssec-no-timecheck"
-			}
+			fi
 		}
 		}
 		append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
 		append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
 	}
 	}

+ 1 - 1
package/network/services/hostapd/Makefile

@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=hostapd
 PKG_NAME:=hostapd
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git

+ 1 - 5
package/network/services/hostapd/files/hostapd.sh

@@ -704,12 +704,9 @@ wpa_supplicant_prepare_interface() {
 	local ap_scan=
 	local ap_scan=
 
 
 	_w_mode="$mode"
 	_w_mode="$mode"
-	_w_modestr=
 
 
 	[[ "$mode" = adhoc ]] && {
 	[[ "$mode" = adhoc ]] && {
 		ap_scan="ap_scan=2"
 		ap_scan="ap_scan=2"
-
-		_w_modestr="mode=1"
 	}
 	}
 
 
 	local country_str=
 	local country_str=
@@ -790,6 +787,7 @@ wpa_supplicant_add_network() {
 	[[ "$_w_mode" = "adhoc" ]] && {
 	[[ "$_w_mode" = "adhoc" ]] && {
 		append network_data "mode=1" "$N$T"
 		append network_data "mode=1" "$N$T"
 		[ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode"
 		[ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode"
+		[ "$noscan" = "1" ] && append network_data "noscan=1" "$N$T"
 
 
 		scan_ssid="scan_ssid=0"
 		scan_ssid="scan_ssid=0"
 
 
@@ -809,8 +807,6 @@ wpa_supplicant_add_network() {
 		scan_ssid=""
 		scan_ssid=""
 	}
 	}
 
 
-	[ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ] && append network_data "$_w_modestr" "$N$T"
-
 	[ "$multi_ap" = 1 -a "$_w_mode" = "sta" ] && append network_data "multi_ap_backhaul_sta=1" "$N$T"
 	[ "$multi_ap" = 1 -a "$_w_mode" = "sta" ] && append network_data "multi_ap_backhaul_sta=1" "$N$T"
 
 
 	case "$auth_type" in
 	case "$auth_type" in

+ 26 - 0
package/network/services/hostapd/patches/090-wolfssl-fix-crypto_bignum_sum.patch

@@ -0,0 +1,26 @@
+From 1766e608ba1114220f3b3598e77aa53b50c38a6e Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@codeaurora.org>
+Date: Mon, 14 Oct 2019 19:27:47 +0300
+Subject: [PATCH] wolfSSL: Fix crypto_bignum_sub()
+
+The initial crypto wrapper implementation for wolfSSL seems to have
+included a copy-paste error in crypto_bignum_sub() implementation that
+was identical to crypto_bignum_add() while mp_sub() should have been
+used instead of mp_add().
+
+Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
+---
+ src/crypto/crypto_wolfssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/crypto/crypto_wolfssl.c
++++ b/src/crypto/crypto_wolfssl.c
+@@ -1151,7 +1151,7 @@ int crypto_bignum_sub(const struct crypt
+ 	if (TEST_FAIL())
+ 		return -1;
+ 
+-	return mp_add((mp_int *) a, (mp_int *) b,
++	return mp_sub((mp_int *) a, (mp_int *) b,
+ 		      (mp_int *) r) == MP_OKAY ? 0 : -1;
+ }
+ 

+ 31 - 0
package/network/services/hostapd/patches/091-0001-wolfssl-Fix-compiler-warnings-on-size_t-printf-forma.patch

@@ -0,0 +1,31 @@
+From 6a28c4dbc102de3fed9db44637f47a10e7adfb78 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 16 May 2020 21:01:51 +0300
+Subject: [PATCH 1/3] wolfssl: Fix compiler warnings on size_t printf format
+ use
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/crypto/tls_wolfssl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/crypto/tls_wolfssl.c
++++ b/src/crypto/tls_wolfssl.c
+@@ -1741,7 +1741,7 @@ struct wpabuf * tls_connection_encrypt(v
+ 	if (!conn)
+ 		return NULL;
+ 
+-	wpa_printf(MSG_DEBUG, "SSL: encrypt: %ld bytes", wpabuf_len(in_data));
++	wpa_printf(MSG_DEBUG, "SSL: encrypt: %zu bytes", wpabuf_len(in_data));
+ 
+ 	wolfssl_reset_out_data(&conn->output);
+ 
+@@ -1792,7 +1792,7 @@ struct wpabuf * tls_connection_decrypt(v
+ 	}
+ 	wpabuf_put(buf, res);
+ 
+-	wpa_printf(MSG_DEBUG, "SSL: decrypt: %ld bytes", wpabuf_len(buf));
++	wpa_printf(MSG_DEBUG, "SSL: decrypt: %zu bytes", wpabuf_len(buf));
+ 
+ 	return buf;
+ }

+ 49 - 0
package/network/services/hostapd/patches/091-0002-wolfssl-Fix-crypto_bignum_rand-implementation.patch

@@ -0,0 +1,49 @@
+From eb595b3e3ab531645a5bde71cf6385335b7a4b95 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 16 May 2020 21:02:17 +0300
+Subject: [PATCH 2/3] wolfssl: Fix crypto_bignum_rand() implementation
+
+The previous implementation used mp_rand_prime() to generate a random
+value in range 0..m. That is insanely slow way of generating a random
+value since mp_rand_prime() is for generating a random _prime_ which is
+not what is needed here. Replace that implementation with generationg of
+a random value in the requested range without doing any kind of prime
+number checks or loops to reject values that are not primes.
+
+This speeds up SAE and EAP-pwd routines by couple of orders of
+magnitude..
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/crypto/crypto_wolfssl.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/src/crypto/crypto_wolfssl.c
++++ b/src/crypto/crypto_wolfssl.c
+@@ -1084,19 +1084,21 @@ int crypto_bignum_rand(struct crypto_big
+ {
+ 	int ret = 0;
+ 	WC_RNG rng;
++	size_t len;
++	u8 *buf;
+ 
+ 	if (TEST_FAIL())
+ 		return -1;
+ 	if (wc_InitRng(&rng) != 0)
+ 		return -1;
+-	if (mp_rand_prime((mp_int *) r,
+-			  (mp_count_bits((mp_int *) m) + 7) / 8 * 2,
+-			  &rng, NULL) != 0)
+-		ret = -1;
+-	if (ret == 0 &&
++	len = (mp_count_bits((mp_int *) m) + 7) / 8;
++	buf = os_malloc(len);
++	if (!buf || wc_RNG_GenerateBlock(&rng, buf, len) != 0 ||
++	    mp_read_unsigned_bin((mp_int *) r, buf, len) != MP_OKAY ||
+ 	    mp_mod((mp_int *) r, (mp_int *) m, (mp_int *) r) != 0)
+ 		ret = -1;
+ 	wc_FreeRng(&rng);
++	bin_clear_free(buf, len);
+ 	return ret;
+ }
+ 

+ 26 - 0
package/network/services/hostapd/patches/091-0003-wolfssl-Do-not-hardcode-include-directory-in-wpa_sup.patch

@@ -0,0 +1,26 @@
+From 79488da576aeeb9400e1742fab7f463eed0fa7a1 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 16 May 2020 21:07:45 +0300
+Subject: [PATCH 3/3] wolfssl: Do not hardcode include directory in
+ wpa_supplicant build
+
+This is not really appropriate for any kind of cross compilations and is
+not really needed in general since system specific values can be set in
+.config.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ wpa_supplicant/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -1086,7 +1086,7 @@ endif
+ 
+ ifeq ($(CONFIG_TLS), wolfssl)
+ ifdef TLS_FUNCS
+-CFLAGS += -DWOLFSSL_DER_LOAD -I/usr/local/include/wolfssl
++CFLAGS += -DWOLFSSL_DER_LOAD
+ OBJS += ../src/crypto/tls_wolfssl.o
+ endif
+ OBJS += ../src/crypto/crypto_wolfssl.o

+ 7 - 1
package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch

@@ -1,11 +1,17 @@
 --- a/wpa_supplicant/wpa_cli.c
 --- a/wpa_supplicant/wpa_cli.c
 +++ b/wpa_supplicant/wpa_cli.c
 +++ b/wpa_supplicant/wpa_cli.c
-@@ -26,6 +26,9 @@
+@@ -26,6 +26,15 @@
  #include <cutils/properties.h>
  #include <cutils/properties.h>
  #endif /* ANDROID */
  #endif /* ANDROID */
  
  
 +#ifndef CONFIG_P2P
 +#ifndef CONFIG_P2P
 +#define CONFIG_P2P
 +#define CONFIG_P2P
++#endif
++#ifndef CONFIG_AP
++#define CONFIG_AP
++#endif
++#ifndef CONFIG_MESH
++#define CONFIG_MESH
 +#endif
 +#endif
  
  
  static const char *const wpa_cli_version =
  static const char *const wpa_cli_version =

+ 3 - 3
package/network/services/odhcpd/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=3
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/odhcpd.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/odhcpd.git
-PKG_SOURCE_DATE:=2019-12-16
-PKG_SOURCE_VERSION:=e53fec897838aca411cb5fcdb9bf795e73414565
-PKG_MIRROR_HASH:=853dfcd464e2c6d09e37720421ebccb20581159763416fcd5ac8aad439e206b7
+PKG_SOURCE_DATE:=2020-05-03
+PKG_SOURCE_VERSION:=49e4949c6dee4a7e528e9bc51e9813228c3c16d8
+PKG_MIRROR_HASH:=5e23b60211a171d17d7015ce604b5fa128f0fbe4d7e7ddd48063b40590e17d4c
 
 
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0

+ 3 - 3
package/network/services/relayd/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 
 PKG_SOURCE_URL=$(PROJECT_GIT)/relayd.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/relayd.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2020-04-20
-PKG_SOURCE_VERSION:=ad0b25ad74345d367c62311e14b279f5ccb8ef13
-PKG_MIRROR_HASH:=e3e3598e5d37ea225db153288726036c5164bfc98e46d76ad8c317cc19b25a22
+PKG_SOURCE_DATE:=2020-04-25
+PKG_SOURCE_VERSION:=f4d759be54ceb37714e9a6ca320d5b50c95e9ce9
+PKG_MIRROR_HASH:=b1ff6e99072867be0975ba0be52ba9da3a876c8b8da893d68301e8238243a51e
 
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0

+ 3 - 3
package/network/services/uhttpd/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=4
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/uhttpd.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/uhttpd.git
-PKG_SOURCE_DATE:=2020-02-12
-PKG_SOURCE_VERSION:=2ee323c01079248baa9465969df9e25b5fb68cdf
-PKG_MIRROR_HASH:=ebec09286cf5f977cac893931a5a4f27ba891db88d5e44a9b0de9446ae431527
+PKG_SOURCE_DATE:=2020-03-13
+PKG_SOURCE_VERSION:=975dce23257e713e5e52eb87b194513eb81110a5
+PKG_MIRROR_HASH:=e5fba74f1519ce461a09bf7e52685d67e99c1157b050b4f91e718146e690e0c1
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=ISC
 PKG_LICENSE:=ISC
 
 

+ 3 - 3
package/network/services/umdns/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 
 PKG_SOURCE_URL=$(PROJECT_GIT)/mdnsd.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/mdnsd.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2020-04-20
-PKG_SOURCE_VERSION:=e74a3f9883199e9db7220d52b78e5fbdb4441ca3
-PKG_MIRROR_HASH:=a54410a6407c3dad985c94e3ca6f9c2bb5786876c9545cf65a56e4dfc2b380ff
+PKG_SOURCE_DATE:=2020-04-25
+PKG_SOURCE_VERSION:=cdac0460ba50dc45735f0be2e19a5a8efc3dafe1
+PKG_MIRROR_HASH:=261cb929dfc03c1f293156cfdec8c2cd1541dcdc57ae42a323f9df5d26e6f7d2
 
 
 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE:=LGPL-2.1

+ 5 - 3
package/network/services/wireguard/Makefile

@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 
 PKG_NAME:=wireguard
 PKG_NAME:=wireguard
 
 
-PKG_VERSION:=1.0.20200330
+PKG_VERSION:=1.0.20200623
 PKG_RELEASE:=1
 PKG_RELEASE:=1
 
 
 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
-PKG_HASH:=2d57b239605be2ee0e4c2da935ff1a23e9ed8bb3ee692e10ae032ae50f280bef
+PKG_HASH:=130937724515799edf05ff8216bc837df8acda879428f3a7f96a3287758f9445
 
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 PKG_LICENSE_FILES:=COPYING
@@ -35,7 +35,9 @@ define Package/wireguard/Default
   CATEGORY:=Network
   CATEGORY:=Network
   SUBMENU:=VPN
   SUBMENU:=VPN
   URL:=https://www.wireguard.com
   URL:=https://www.wireguard.com
-  MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com>
+  MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com> \
+              Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+
 endef
 endef
 
 
 define Package/wireguard/Default/description
 define Package/wireguard/Default/description

+ 1 - 1
package/network/utils/curl/Makefile

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=curl
 PKG_NAME:=curl
 PKG_VERSION:=7.66.0
 PKG_VERSION:=7.66.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \
 PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \

+ 44 - 0
package/network/utils/curl/patches/100-file-on-Windows-refuse-paths-that-start-with.patch

@@ -0,0 +1,44 @@
+From 1b71bc532bde8621fd3260843f8197182a467ff2 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Thu, 7 Nov 2019 10:13:01 +0100
+Subject: [PATCH] file: on Windows, refuse paths that start with \\
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+... as that might cause an unexpected SMB connection to a given host
+name.
+
+Reported-by: Fernando Muñoz
+CVE-2019-15601
+Bug: https://curl.haxx.se/docs/CVE-2019-15601.html
+
+Signed-off-by: Petr Štetiar <ynezz@true.cz>
+---
+ lib/file.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/file.c b/lib/file.c
+index d349cd9241cd..166931d7f1ba 100644
+--- a/lib/file.c
++++ b/lib/file.c
+@@ -136,7 +136,7 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
+   struct Curl_easy *data = conn->data;
+   char *real_path;
+   struct FILEPROTO *file = data->req.protop;
+-  int fd;
++  int fd = -1;
+ #ifdef DOS_FILESYSTEM
+   size_t i;
+   char *actual_path;
+@@ -181,7 +181,9 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
+       return CURLE_URL_MALFORMAT;
+     }
+ 
+-  fd = open_readonly(actual_path, O_RDONLY|O_BINARY);
++  if(strncmp("\\\\", actual_path, 2))
++    /* refuse to open path that starts with two backslashes */
++    fd = open_readonly(actual_path, O_RDONLY|O_BINARY);
+   file->path = actual_path;
+ #else
+   if(memchr(real_path, 0, real_path_len)) {

+ 1 - 1
package/network/utils/dante/Makefile

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=dante
 PKG_NAME:=dante
 PKG_VERSION:=1.4.1
 PKG_VERSION:=1.4.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.inet.no/dante/files/
 PKG_SOURCE_URL:=http://www.inet.no/dante/files/

+ 53 - 0
package/network/utils/dante/patches/210-deactivate-sched_setscheduler.patch

@@ -0,0 +1,53 @@
+When compiled with glibc the config_scan.c wants to use the 
+cpupolicy2numeric() function which is only available when 
+HAVE_SCHED_SETSCHEDULER is set. It looks like the wrong define was used here.
+
+This fixes a build problem with glibc in combination with the force 
+ac_cv_func_sched_setscheduler=no in the OpenWrt CONFIGURE_VARS.
+
+--- a/lib/config_scan.c
++++ b/lib/config_scan.c
+@@ -3891,7 +3891,7 @@ YY_RULE_SETUP
+    SERRX(0);
+ 
+ #else /* !SOCKS_CLIENT */
+-#if HAVE_SCHED_SETAFFINITY
++#if HAVE_SCHED_SETSCHEDULER
+ 
+    BEGIN(0);
+ 
+@@ -3899,9 +3899,9 @@ YY_RULE_SETUP
+       yyerrorx("unknown scheduling policy \"%s\"", yytext);
+ 
+    return SCHEDULEPOLICY;
+-#else /* !HAVE_SCHED_SETAFFINITY */
++#else /* !HAVE_SCHED_SETSCHEDULER */
+    yyerrorx("setting cpu scheduling policy is not supported on this platform");
+-#endif /* !HAVE_SCHED_SETAFFINITY */
++#endif /* !HAVE_SCHED_SETSCHEDULER */
+ 
+ #endif /* SOCKS_CLIENT */
+ }
+--- a/lib/config_scan.l
++++ b/lib/config_scan.l
+@@ -456,7 +456,7 @@ cpu {
+    SERRX(0);
+ 
+ #else /* !SOCKS_CLIENT */
+-#if HAVE_SCHED_SETAFFINITY
++#if HAVE_SCHED_SETSCHEDULER
+ 
+    BEGIN(0);
+ 
+@@ -464,9 +464,9 @@ cpu {
+       yyerrorx("unknown scheduling policy \"%s\"", yytext);
+ 
+    return SCHEDULEPOLICY;
+-#else /* !HAVE_SCHED_SETAFFINITY */
++#else /* !HAVE_SCHED_SETSCHEDULER */
+    yyerrorx("setting cpu scheduling policy is not supported on this platform");
+-#endif /* !HAVE_SCHED_SETAFFINITY */
++#endif /* !HAVE_SCHED_SETSCHEDULER */
+ 
+ #endif /* SOCKS_CLIENT */
+ }

+ 2 - 2
package/network/utils/wireguard-tools/Makefile

@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 
 PKG_NAME:=wireguard-tools
 PKG_NAME:=wireguard-tools
 
 
-PKG_VERSION:=1.0.20200319
+PKG_VERSION:=1.0.20200513
 PKG_RELEASE:=1
 PKG_RELEASE:=1
 
 
 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
-PKG_HASH:=757ed31d4d48d5fd7853bfd9bfa6a3a1b53c24a94fe617439948784a2c0ed987
+PKG_HASH:=e73409a9fb8c90506db241d1e1a4e7372a60dbfa400e37f4ab2fd70a92ba495f
 
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 PKG_LICENSE_FILES:=COPYING

+ 4 - 4
package/system/ca-certificates/Makefile

@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=ca-certificates
 PKG_NAME:=ca-certificates
-PKG_VERSION:=20190110
-PKG_RELEASE:=2
+PKG_VERSION:=20200601
+PKG_RELEASE:=1
 PKG_MAINTAINER:=
 PKG_MAINTAINER:=
 
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
-PKG_HASH:=ee4bf0f4c6398005f5b5ca4e0b87b82837ac5c3b0280a1cb3a63c47555c3a675
-
+PKG_HASH:=43766d5a436519503dfd65ab83488ae33ab4d4ca3d0993797b58c92eb9ed4e63
+PKG_BUILD_DIR:=$(BUILD_DIR)/work
 PKG_INSTALL:=1
 PKG_INSTALL:=1
 
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/package.mk

+ 3 - 3
package/system/fstools/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/fstools.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/fstools.git
-PKG_MIRROR_HASH:=ca3cc1d4a2de3014e63ec1fa223c5250116c6ae5cdc4e41b2053ca7b3c0a3d96
-PKG_SOURCE_DATE:=2020-01-18
-PKG_SOURCE_VERSION:=189b41b6b48786a51eb2b8bc450cb7d560f030f0
+PKG_MIRROR_HASH:=1b875efd7d675d74a56602f57dd27093e2feef8761ba28b567e2d2f43db14b48
+PKG_SOURCE_DATE:=2020-05-12
+PKG_SOURCE_VERSION:=84269037b75de93bdd4ea75b7f50ba77ba976377
 CMAKE_INSTALL:=1
 CMAKE_INSTALL:=1
 
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0

+ 3 - 3
package/system/opkg/Makefile

@@ -14,9 +14,9 @@ PKG_FLAGS:=essential
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
 PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
-PKG_SOURCE_DATE:=2020-01-25
-PKG_SOURCE_VERSION:=c09fe2098718807ddbca13ee36e3e38801822946
-PKG_MIRROR_HASH:=b2fba519fb3bf2da2e325a33eee951b85c7c1886e48ebaac3892435a71ae33d5
+PKG_SOURCE_DATE:=2020-05-07
+PKG_SOURCE_VERSION:=f2166a89b7e96e2c60002959731eebc5f45fa318
+PKG_MIRROR_HASH:=67e55cd9fb93bb5b62e2c7b11946483b5570287bd1504aa2a3886d11f8b750b9
 
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 PKG_LICENSE_FILES:=COPYING

+ 3 - 3
package/system/rpcd/Makefile

@@ -12,10 +12,10 @@ PKG_RELEASE:=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/rpcd.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/rpcd.git
-PKG_SOURCE_DATE:=2019-11-10
-PKG_SOURCE_VERSION:=77ad0de09247b9bdce50f4cecf3e5beb5636f57f
+PKG_SOURCE_DATE:=2020-05-26
+PKG_SOURCE_VERSION:=67c8a3fda26e441d3ec4a19f50ac72eca8deb14b
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_MIRROR_HASH:=d36caff85bebbf7fb1b512359243bdbb7d9b16140e0d631afae9de2c3b8e4dff
+PKG_MIRROR_HASH:=cfe44e600093a424d1133b55a141c5becb708f48ee4fc8b7a98a82495ced7c72
 
 
 PKG_LICENSE:=ISC
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=
 PKG_LICENSE_FILES:=

+ 3 - 3
package/system/ucert/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/ucert.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/ucert.git
-PKG_SOURCE_DATE:=2019-12-19
-PKG_SOURCE_VERSION:=14a279411cff06f9b1363711df4ec3b5db73f042
-PKG_MIRROR_HASH:=797f35138c6e1099a839e768d9e01db022223884d9e0a6d09965e625caf0ae79
+PKG_SOURCE_DATE:=2020-05-24
+PKG_SOURCE_VERSION:=00b921d80ac0dc47339305d803f865ff43c56d63
+PKG_MIRROR_HASH:=839fda1811a58a495ac7bbc41db75222dd5a15e4d72110ca6acc4cdad56908fe
 
 
 CMAKE_INSTALL:=1
 CMAKE_INSTALL:=1
 PKG_CHECK_FORMAT_SECURITY:=1
 PKG_CHECK_FORMAT_SECURITY:=1

+ 3 - 3
package/system/usign/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/usign.git
 PKG_SOURCE_URL=$(PROJECT_GIT)/usign.git
-PKG_SOURCE_DATE:=2019-08-06
-PKG_SOURCE_VERSION:=5a52b379902471cef495687547c7b568142f66d2
-PKG_MIRROR_HASH:=9779f6d6718a7f7cd3e28aa7feefc9b3f4b0c7a85cb58ff18afbeb6b4372177a
+PKG_SOURCE_DATE:=2020-05-23
+PKG_SOURCE_VERSION:=f1f65026a94137c91b5466b149ef3ea3f20091e9
+PKG_MIRROR_HASH:=3f6569a5e63fdfd032976ac0f79d736d3935101ac1b97fb370514b013c5e6bb6
 CMAKE_INSTALL:=1
 CMAKE_INSTALL:=1
 PKG_CHECK_FORMAT_SECURITY:=1
 PKG_CHECK_FORMAT_SECURITY:=1
 PKG_USE_MIPS16:=0
 PKG_USE_MIPS16:=0

+ 2 - 2
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c

@@ -79,7 +79,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
 	},
 	},
 	{
 	{
 		.desc		= "sw1",
 		.desc		= "sw1",
-		.type		= EV_KEY,
+		.type		= EV_SW,
 		.code		= BTN_0,
 		.code		= BTN_0,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_MR3020_GPIO_BTN_SW1,
 		.gpio		= TL_MR3020_GPIO_BTN_SW1,
@@ -87,7 +87,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
 	},
 	},
 	{
 	{
 		.desc		= "sw2",
 		.desc		= "sw2",
-		.type		= EV_KEY,
+		.type		= EV_SW,
 		.code		= BTN_1,
 		.code		= BTN_1,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_MR3020_GPIO_BTN_SW2,
 		.gpio		= TL_MR3020_GPIO_BTN_SW2,

+ 2 - 2
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c

@@ -24,7 +24,7 @@
 #include "machtypes.h"
 #include "machtypes.h"
 
 
 #define TL_WR802N_GPIO_LED_SYSTEM	13
 #define TL_WR802N_GPIO_LED_SYSTEM	13
-#define TL_WR802N_GPIO_BTN_RESET	11
+#define TL_WR802N_GPIO_BTN_RESET	12
 
 
 #define TL_WR802N_KEYS_POLL_INTERVAL		20 /* msecs */
 #define TL_WR802N_KEYS_POLL_INTERVAL		20 /* msecs */
 #define TL_WR802N_KEYS_DEBOUNCE_INTERVAL	(3 * TL_WR802N_KEYS_POLL_INTERVAL)
 #define TL_WR802N_KEYS_DEBOUNCE_INTERVAL	(3 * TL_WR802N_KEYS_POLL_INTERVAL)
@@ -61,7 +61,7 @@ static struct gpio_keys_button tl_wr802n_gpio_keys[] __initdata = {
 		.code		= KEY_RESTART,
 		.code		= KEY_RESTART,
 		.debounce_interval = TL_WR802N_KEYS_DEBOUNCE_INTERVAL,
 		.debounce_interval = TL_WR802N_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_WR802N_GPIO_BTN_RESET,
 		.gpio		= TL_WR802N_GPIO_BTN_RESET,
-		.active_low	= 0,
+		.active_low	= 1,
 	}
 	}
 };
 };
 
 

+ 1 - 1
target/linux/ar71xx/patches-4.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch

@@ -1,6 +1,6 @@
 --- a/drivers/gpio/Kconfig
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1299,4 +1299,12 @@ config GPIO_VIPERBOARD
+@@ -1300,4 +1300,12 @@ config GPIO_VIPERBOARD
  
  
  endmenu
  endmenu
  
  

+ 1 - 1
target/linux/ar71xx/patches-4.14/451-gpio-74x164-improve-platform-device-support.patch

@@ -109,7 +109,7 @@
 +#endif
 +#endif
 --- a/drivers/gpio/Kconfig
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1251,7 +1251,6 @@ menu "SPI GPIO expanders"
+@@ -1252,7 +1252,6 @@ menu "SPI GPIO expanders"
  
  
  config GPIO_74X164
  config GPIO_74X164
  	tristate "74x164 serial-in/parallel-out 8-bits shift register"
  	tristate "74x164 serial-in/parallel-out 8-bits shift register"

+ 1 - 1
target/linux/ar71xx/patches-4.14/452-gpio-add-gpio-latch-driver.patch

@@ -1,6 +1,6 @@
 --- a/drivers/gpio/Kconfig
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1306,4 +1306,9 @@ config GPIO_NXP_74HC153
+@@ -1307,4 +1307,9 @@ config GPIO_NXP_74HC153
  	  Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This
  	  Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This
  	  provides a GPIO interface supporting input mode only.
  	  provides a GPIO interface supporting input mode only.
  
  

+ 1 - 1
target/linux/ar71xx/patches-4.14/500-MIPS-fw-myloader.patch

@@ -10,7 +10,7 @@
  
  
 --- a/arch/mips/Kconfig
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1152,6 +1152,9 @@ config MIPS_MSC
+@@ -1153,6 +1153,9 @@ config MIPS_MSC
  config MIPS_NILE4
  config MIPS_NILE4
  	bool
  	bool
  
  

+ 3 - 3
target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch

@@ -325,7 +325,7 @@
  	for (p = *head; p; p = p->next) {
  	for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look
  	else if (skb)
  	else if (skb)
  		pkey = &ip_hdr(skb)->daddr;
  		pkey = &ip_hdr(skb)->daddr;
  
  
@@ -757,7 +757,7 @@
  EXPORT_SYMBOL(xfrm_parse_spi);
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3874,14 +3874,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3878,14 +3878,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
  
@@ -831,7 +831,7 @@
   * No flags defined yet.
   * No flags defined yet.
 --- a/net/core/utils.c
 --- a/net/core/utils.c
 +++ b/net/core/utils.c
 +++ b/net/core/utils.c
-@@ -424,8 +424,14 @@ void inet_proto_csum_replace16(__sum16 *
+@@ -441,8 +441,14 @@ void inet_proto_csum_replace16(__sum16 *
  			       bool pseudohdr)
  			       bool pseudohdr)
  {
  {
  	__be32 diff[] = {
  	__be32 diff[] = {

+ 21 - 0
target/linux/ath79/dts/ar7161_netgear_wndr3700.dts

@@ -33,3 +33,24 @@
 		read-only;
 		read-only;
 	};
 	};
 };
 };
+
+&ath9k1 {
+	/* The original WNDR3700(v1) variant have four antennae dedicated
+	 * to the 5GHz radio as well. Again, two antennae are available for
+	 * each chain to switch between. The following configuration is the
+	 * default setting which taken from the vendor's wifi
+	 * code for that radio.
+	 *
+	 * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
+	 *	[0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
+	 */
+	antenna-demux {
+		gpio-hog;
+		line-name = "fixed antenna group 2";
+		gpios = <6 GPIO_ACTIVE_LOW>,
+			<7 GPIO_ACTIVE_HIGH>,
+			<8 GPIO_ACTIVE_HIGH>,
+			<9 GPIO_ACTIVE_LOW>;
+		output-high;
+	};
+};

+ 19 - 0
target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi

@@ -158,6 +158,25 @@
 		qca,no-eeprom;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 		gpio-controller;
+
+		/* all WNDR3700 variants have four antennae dedicated
+		 * to the 2.4GHz radio. Two antennae are available for
+		 * each chain. The following configuration is the
+		 * default setting which taken from the vendor's wifi
+		 * code for that radio.
+		 *
+		 * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
+		 *	[0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
+		 */
+		antenna-demux {
+			gpio-hog;
+			line-name = "fixed antenna group 1";
+			gpios = <6 GPIO_ACTIVE_LOW>,
+				<7 GPIO_ACTIVE_HIGH>,
+				<8 GPIO_ACTIVE_LOW>,
+				<9 GPIO_ACTIVE_HIGH>;
+			output-high;
+		};
 	};
 	};
 
 
 	ath9k1: wifi@0,12 {
 	ath9k1: wifi@0,12 {

+ 1 - 0
target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts

@@ -11,6 +11,7 @@
 	compatible = "tplink,tl-mr3040-v2", "qca,ar9331";
 	compatible = "tplink,tl-mr3040-v2", "qca,ar9331";
 
 
 	aliases {
 	aliases {
+		serial0 = &uart;
 		led-boot = &led_lan;
 		led-boot = &led_lan;
 		led-failsafe = &led_lan;
 		led-failsafe = &led_lan;
 	};
 	};

+ 5 - 5
target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch

@@ -18,7 +18,7 @@
  	xip_enable(map, chip, adr);
  	xip_enable(map, chip, adr);
   op_done:
   op_done:
  	if (mode == FL_OTP_WRITE)
  	if (mode == FL_OTP_WRITE)
-@@ -2236,7 +2238,6 @@ static int cfi_amdstd_panic_write(struct
+@@ -2240,7 +2242,6 @@ static int cfi_amdstd_panic_write(struct
  	return 0;
  	return 0;
  }
  }
  
  
@@ -26,7 +26,7 @@
  /*
  /*
   * Handle devices with one erase region, that only implement
   * Handle devices with one erase region, that only implement
   * the chip erase command.
   * the chip erase command.
-@@ -2304,7 +2305,7 @@ static int __xipram do_erase_chip(struct
+@@ -2308,7 +2309,7 @@ static int __xipram do_erase_chip(struct
  		}
  		}
  
  
  		if (chip_good(map, adr, map_word_ff(map)))
  		if (chip_good(map, adr, map_word_ff(map)))
@@ -35,7 +35,7 @@
  
  
  		if (time_after(jiffies, timeo)) {
  		if (time_after(jiffies, timeo)) {
  			printk(KERN_WARNING "MTD %s(): software timeout\n",
  			printk(KERN_WARNING "MTD %s(): software timeout\n",
-@@ -2328,6 +2329,7 @@ static int __xipram do_erase_chip(struct
+@@ -2332,6 +2333,7 @@ static int __xipram do_erase_chip(struct
  		}
  		}
  	}
  	}
  
  
@@ -43,7 +43,7 @@
  	chip->state = FL_READY;
  	chip->state = FL_READY;
  	xip_enable(map, chip, adr);
  	xip_enable(map, chip, adr);
  	DISABLE_VPP(map);
  	DISABLE_VPP(map);
-@@ -2401,7 +2403,7 @@ static int __xipram do_erase_oneblock(st
+@@ -2405,7 +2407,7 @@ static int __xipram do_erase_oneblock(st
  
  
  		if (chip_good(map, adr, map_word_ff(map))) {
  		if (chip_good(map, adr, map_word_ff(map))) {
  			xip_enable(map, chip, adr);
  			xip_enable(map, chip, adr);
@@ -52,7 +52,7 @@
  		}
  		}
  
  
  		if (time_after(jiffies, timeo)) {
  		if (time_after(jiffies, timeo)) {
-@@ -2427,6 +2429,7 @@ static int __xipram do_erase_oneblock(st
+@@ -2431,6 +2433,7 @@ static int __xipram do_erase_oneblock(st
  		}
  		}
  	}
  	}
  
  

+ 2 - 2
target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch

@@ -214,7 +214,7 @@
  #include <linux/uaccess.h>
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
  #include <linux/icmpv6.h>
-@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s
+@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  	topt = (__be32 *)(t1 + 1);
  
  
  	if (tsecr) {
  	if (tsecr) {
@@ -316,7 +316,7 @@
  	for (p = *head; p; p = p->next) {
  	for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -464,7 +464,7 @@ static struct neighbour *ipv4_neigh_look
  	else if (skb)
  	else if (skb)
  		pkey = &ip_hdr(skb)->daddr;
  		pkey = &ip_hdr(skb)->daddr;
  
  

+ 1 - 1
target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch

@@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
  	rwlock_t		sk_callback_lock;
  	rwlock_t		sk_callback_lock;
 --- a/net/core/sock.c
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -2745,6 +2745,7 @@ void sock_init_data(struct socket *sock,
+@@ -2748,6 +2748,7 @@ void sock_init_data(struct socket *sock,
  
  
  	sk->sk_max_pacing_rate = ~0U;
  	sk->sk_max_pacing_rate = ~0U;
  	sk->sk_pacing_rate = ~0U;
  	sk->sk_pacing_rate = ~0U;

+ 1 - 1
target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch

@@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan@kernel.org>
 
 
 --- a/drivers/usb/serial/option.c
 --- a/drivers/usb/serial/option.c
 +++ b/drivers/usb/serial/option.c
 +++ b/drivers/usb/serial/option.c
-@@ -1981,7 +1981,8 @@ static const struct usb_device_id option
+@@ -1987,7 +1987,8 @@ static const struct usb_device_id option
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) },			/* D-Link DWM-156 (variant) */
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) },			/* D-Link DWM-156 (variant) */
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },

+ 69 - 0
target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch

@@ -0,0 +1,69 @@
+From dda9f4b9cac6bdd2a96253b4444d7a6ce5132edb Mon Sep 17 00:00:00 2001
+From: Chao Yu <yuchao0@huawei.com>
+Date: Sat, 11 Aug 2018 23:42:09 +0800
+Subject: f2fs: fix to skip verifying block address for non-regular inode
+
+generic/184 1s ... [failed, exit status 1]- output mismatch
+    --- tests/generic/184.out	2015-01-11 16:52:27.643681072 +0800
+     QA output created by 184 - silence is golden
+    +rm: cannot remove '/mnt/f2fs/null': Bad address
+    +mknod: '/mnt/f2fs/null': Bad address
+    +chmod: cannot access '/mnt/f2fs/null': Bad address
+    +./tests/generic/184: line 36: /mnt/f2fs/null: Bad address
+    ...
+
+F2FS-fs (zram0): access invalid blkaddr:259
+EIP: f2fs_is_valid_blkaddr+0x14b/0x1b0 [f2fs]
+ f2fs_iget+0x927/0x1010 [f2fs]
+ f2fs_lookup+0x26e/0x630 [f2fs]
+ __lookup_slow+0xb3/0x140
+ lookup_slow+0x31/0x50
+ walk_component+0x185/0x1f0
+ path_lookupat+0x51/0x190
+ filename_lookup+0x7f/0x140
+ user_path_at_empty+0x36/0x40
+ vfs_statx+0x61/0xc0
+ __do_sys_stat64+0x29/0x40
+ sys_stat64+0x13/0x20
+ do_fast_syscall_32+0xaa/0x22c
+ entry_SYSENTER_32+0x53/0x86
+
+In f2fs_iget(), we will check inode's first block address, if it is valid,
+we will set FI_FIRST_BLOCK_WRITTEN flag in inode.
+
+But we should only do this for regular inode, otherwise, like special
+inode, i_addr[0] is used for storing device info instead of block address,
+it will fail checking flow obviously.
+
+So for non-regular inode, let's skip verifying address and setting flag.
+
+Signed-off-by: Chao Yu <yuchao0@huawei.com>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+---
+ fs/f2fs/inode.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/fs/f2fs/inode.c
++++ b/fs/f2fs/inode.c
+@@ -310,13 +310,15 @@ static int do_read_inode(struct inode *i
+ 	/* get rdev by using inline_info */
+ 	__get_inode_rdev(inode, ri);
+ 
+-	err = __written_first_block(sbi, ri);
+-	if (err < 0) {
+-		f2fs_put_page(node_page, 1);
+-		return err;
++	if (S_ISREG(inode->i_mode)) {
++		err = __written_first_block(sbi, ri);
++		if (err < 0) {
++			f2fs_put_page(node_page, 1);
++			return err;
++		}
++		if (!err)
++			set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN);
+ 	}
+-	if (!err)
+-		set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN);
+ 
+ 	if (!need_inode_block_update(sbi, inode->i_ino))
+ 		fi->last_disk_size = inode->i_size;

+ 2 - 2
target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch

@@ -48,7 +48,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
  #define	INADDR_ANY		((unsigned long int) 0x00000000)
  #define	INADDR_ANY		((unsigned long int) 0x00000000)
 --- a/net/ipv4/devinet.c
 --- a/net/ipv4/devinet.c
 +++ b/net/ipv4/devinet.c
 +++ b/net/ipv4/devinet.c
-@@ -929,7 +929,7 @@ static int inet_abc_len(__be32 addr)
+@@ -935,7 +935,7 @@ static int inet_abc_len(__be32 addr)
  {
  {
  	int rc = -1;	/* Something else, probably a multicast. */
  	int rc = -1;	/* Something else, probably a multicast. */
  
  
@@ -57,7 +57,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
  		rc = 0;
  		rc = 0;
  	else {
  	else {
  		__u32 haddr = ntohl(addr);
  		__u32 haddr = ntohl(addr);
-@@ -940,6 +940,8 @@ static int inet_abc_len(__be32 addr)
+@@ -946,6 +946,8 @@ static int inet_abc_len(__be32 addr)
  			rc = 16;
  			rc = 16;
  		else if (IN_CLASSC(haddr))
  		else if (IN_CLASSC(haddr))
  			rc = 24;
  			rc = 24;

+ 8 - 8
target/linux/generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch

@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
  
 --- a/net/batman-adv/bat_iv_ogm.c
 --- a/net/batman-adv/bat_iv_ogm.c
 +++ b/net/batman-adv/bat_iv_ogm.c
 +++ b/net/batman-adv/bat_iv_ogm.c
-@@ -51,6 +51,7 @@
+@@ -52,6 +52,7 @@
  #include <linux/workqueue.h>
  #include <linux/workqueue.h>
  #include <net/genetlink.h>
  #include <net/genetlink.h>
  #include <net/netlink.h>
  #include <net/netlink.h>
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  #include <uapi/linux/batman_adv.h>
  #include <uapi/linux/batman_adv.h>
  
  
  #include "bat_algo.h"
  #include "bat_algo.h"
-@@ -62,7 +63,6 @@
+@@ -63,7 +64,6 @@
  #include "netlink.h"
  #include "netlink.h"
  #include "network-coding.h"
  #include "network-coding.h"
  #include "originator.h"
  #include "originator.h"
@@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  #include "translation-table.h"
  #include "translation-table.h"
 --- a/net/batman-adv/bat_v.c
 --- a/net/batman-adv/bat_v.c
 +++ b/net/batman-adv/bat_v.c
 +++ b/net/batman-adv/bat_v.c
-@@ -37,6 +37,7 @@
+@@ -36,6 +36,7 @@
  #include <linux/workqueue.h>
  #include <linux/workqueue.h>
  #include <net/genetlink.h>
  #include <net/genetlink.h>
  #include <net/netlink.h>
  #include <net/netlink.h>
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  #include <uapi/linux/batman_adv.h>
  #include <uapi/linux/batman_adv.h>
  
  
  #include "bat_algo.h"
  #include "bat_algo.h"
-@@ -49,7 +50,6 @@
+@@ -48,7 +49,6 @@
  #include "log.h"
  #include "log.h"
  #include "netlink.h"
  #include "netlink.h"
  #include "originator.h"
  #include "originator.h"
@@ -80,7 +80,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
  
 --- a/net/batman-adv/bat_v_ogm.c
 --- a/net/batman-adv/bat_v_ogm.c
 +++ b/net/batman-adv/bat_v_ogm.c
 +++ b/net/batman-adv/bat_v_ogm.c
-@@ -38,13 +38,13 @@
+@@ -40,13 +40,13 @@
  #include <linux/string.h>
  #include <linux/string.h>
  #include <linux/types.h>
  #include <linux/types.h>
  #include <linux/workqueue.h>
  #include <linux/workqueue.h>
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  /**
  /**
 --- a/net/batman-adv/hard-interface.c
 --- a/net/batman-adv/hard-interface.c
 +++ b/net/batman-adv/hard-interface.c
 +++ b/net/batman-adv/hard-interface.c
-@@ -36,6 +36,7 @@
+@@ -37,6 +37,7 @@
  #include <linux/spinlock.h>
  #include <linux/spinlock.h>
  #include <net/net_namespace.h>
  #include <net/net_namespace.h>
  #include <net/rtnetlink.h>
  #include <net/rtnetlink.h>
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
  
  #include "bat_v.h"
  #include "bat_v.h"
  #include "bridge_loop_avoidance.h"
  #include "bridge_loop_avoidance.h"
-@@ -44,7 +45,6 @@
+@@ -45,7 +46,6 @@
  #include "gateway_client.h"
  #include "gateway_client.h"
  #include "log.h"
  #include "log.h"
  #include "originator.h"
  #include "originator.h"
@@ -1025,7 +1025,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
  
 --- a/net/batman-adv/types.h
 --- a/net/batman-adv/types.h
 +++ b/net/batman-adv/types.h
 +++ b/net/batman-adv/types.h
-@@ -34,10 +34,9 @@
+@@ -35,10 +35,9 @@
  #include <linux/types.h>
  #include <linux/types.h>
  #include <linux/wait.h>
  #include <linux/wait.h>
  #include <linux/workqueue.h>
  #include <linux/workqueue.h>

+ 1 - 1
target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch

@@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 +
 +
  int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
  int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
  		   struct flowi6 *fl6);
  		   struct flowi6 *fl6);
- struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
+ struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6,
 --- a/net/ipv6/ip6_output.c
 --- a/net/ipv6/ip6_output.c
 +++ b/net/ipv6/ip6_output.c
 +++ b/net/ipv6/ip6_output.c
 @@ -381,7 +381,7 @@ static inline int ip6_forward_finish(str
 @@ -381,7 +381,7 @@ static inline int ip6_forward_finish(str

+ 2 - 2
target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch

@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 
 --- a/include/net/ip6_route.h
 --- a/include/net/ip6_route.h
 +++ b/include/net/ip6_route.h
 +++ b/include/net/ip6_route.h
-@@ -252,4 +252,26 @@ static inline bool rt6_duplicate_nexthop
+@@ -253,4 +253,26 @@ static inline bool rt6_duplicate_nexthop
  	       ipv6_addr_equal(&a->rt6i_gateway, &b->rt6i_gateway) &&
  	       ipv6_addr_equal(&a->rt6i_gateway, &b->rt6i_gateway) &&
  	       !lwtunnel_cmp_encap(a->dst.lwtstate, b->dst.lwtstate);
  	       !lwtunnel_cmp_encap(a->dst.lwtstate, b->dst.lwtstate);
  }
  }
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -
 -
  int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
  int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
  		   struct flowi6 *fl6);
  		   struct flowi6 *fl6);
- struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
+ struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6,
 --- a/net/ipv6/ip6_output.c
 --- a/net/ipv6/ip6_output.c
 +++ b/net/ipv6/ip6_output.c
 +++ b/net/ipv6/ip6_output.c
 @@ -381,28 +381,6 @@ static inline int ip6_forward_finish(str
 @@ -381,28 +381,6 @@ static inline int ip6_forward_finish(str

+ 0 - 71
target/linux/generic/backport-4.14/600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch

@@ -1,71 +0,0 @@
-From 82afdcd4ec3c8ca6551cbf7c43c09e2fd240487a Mon Sep 17 00:00:00 2001
-From: Hangbin Liu <liuhangbin@gmail.com>
-Date: Tue, 10 Mar 2020 15:27:37 +0800
-Subject: [PATCH] ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Rafał found an issue that for non-Ethernet interface, if we down and up
-frequently, the memory will be consumed slowly.
-
-The reason is we add allnodes/allrouters addressed in multicast list in
-ipv6_add_dev(). When link down, we call ipv6_mc_down(), store all multicast
-addresses via mld_add_delrec(). But when link up, we don't call ipv6_mc_up()
-for non-Ethernet interface to remove the addresses. This makes idev->mc_tomb
-getting bigger and bigger. The call stack looks like:
-
-addrconf_notify(NETDEV_REGISTER)
-	ipv6_add_dev
-		ipv6_dev_mc_inc(ff01::1)
-		ipv6_dev_mc_inc(ff02::1)
-		ipv6_dev_mc_inc(ff02::2)
-
-addrconf_notify(NETDEV_UP)
-	addrconf_dev_config
-		/* Alas, we support only Ethernet autoconfiguration. */
-		return;
-
-addrconf_notify(NETDEV_DOWN)
-	addrconf_ifdown
-		ipv6_mc_down
-			igmp6_group_dropped(ff02::2)
-				mld_add_delrec(ff02::2)
-			igmp6_group_dropped(ff02::1)
-			igmp6_group_dropped(ff01::1)
-
-After investigating, I can't found a rule to disable multicast on
-non-Ethernet interface. In RFC2460, the link could be Ethernet, PPP, ATM,
-tunnels, etc. In IPv4, it doesn't check the dev type when calls ip_mc_up()
-in inetdev_event(). Even for IPv6, we don't check the dev type and call
-ipv6_add_dev(), ipv6_dev_mc_inc() after register device.
-
-So I think it's OK to fix this memory consumer by calling ipv6_mc_up() for
-non-Ethernet interface.
-
-v2: Also check IFF_MULTICAST flag to make sure the interface supports
-    multicast
-
-Reported-by: Rafał Miłecki <zajec5@gmail.com>
-Tested-by: Rafał Miłecki <zajec5@gmail.com>
-Fixes: 74235a25c673 ("[IPV6] addrconf: Fix IPv6 on tuntap tunnels")
-Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down")
-Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- net/ipv6/addrconf.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/net/ipv6/addrconf.c
-+++ b/net/ipv6/addrconf.c
-@@ -3223,6 +3223,10 @@ static void addrconf_dev_config(struct n
- 	    (dev->type != ARPHRD_TUNNEL) &&
- 	    (dev->type != ARPHRD_NONE)) {
- 		/* Alas, we support only Ethernet autoconfiguration. */
-+		idev = __in6_dev_get(dev);
-+		if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP &&
-+		    dev->flags & IFF_MULTICAST)
-+			ipv6_mc_up(idev);
- 		return;
- 	}
- 

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

@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 
 --- a/Makefile
 --- a/Makefile
 +++ b/Makefile
 +++ b/Makefile
-@@ -1252,7 +1252,6 @@ all: modules
+@@ -1260,7 +1260,6 @@ endif
  
  
  PHONY += modules
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	@$(kecho) '  Building modules, stage 2.';
  	@$(kecho) '  Building modules, stage 2.';
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  
  
-@@ -1281,7 +1280,6 @@ _modinst_:
+@@ -1289,7 +1288,6 @@ _modinst_:
  		rm -f $(MODLIB)/build ; \
  		rm -f $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  	fi
  	fi

+ 1 - 1
target/linux/generic/hack-4.14/220-gc_sections.patch

@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -789,11 +794,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -779,11 +784,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  endif
  
  

+ 2 - 2
target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch

@@ -1,6 +1,6 @@
 --- a/include/linux/phy.h
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -547,6 +547,12 @@ struct phy_driver {
+@@ -549,6 +549,12 @@ struct phy_driver {
  	/* Determines the negotiated speed and duplex */
  	/* Determines the negotiated speed and duplex */
  	int (*read_status)(struct phy_device *phydev);
  	int (*read_status)(struct phy_device *phydev);
  
  
@@ -15,7 +15,7 @@
  
  
 --- a/drivers/net/phy/phy_device.c
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1462,6 +1462,9 @@ int genphy_update_link(struct phy_device
+@@ -1466,6 +1466,9 @@ int genphy_update_link(struct phy_device
  {
  {
  	int status;
  	int status;
  
  

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

@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	u64 res;
  	u64 res;
 --- a/net/ipv4/Kconfig
 --- a/net/ipv4/Kconfig
 +++ b/net/ipv4/Kconfig
 +++ b/net/ipv4/Kconfig
-@@ -420,6 +420,7 @@ config INET_XFRM_MODE_BEET
+@@ -421,6 +421,7 @@ config INET_XFRM_MODE_BEET
  
  
  config INET_DIAG
  config INET_DIAG
  	tristate "INET: socket monitoring interface"
  	tristate "INET: socket monitoring interface"

+ 5 - 5
target/linux/generic/hack-4.14/902-debloat_proc.patch

@@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		return -ENOMEM;
  		return -ENOMEM;
 --- a/mm/vmalloc.c
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
 +++ b/mm/vmalloc.c
-@@ -2783,6 +2783,8 @@ static const struct file_operations proc
+@@ -2798,6 +2798,8 @@ static const struct file_operations proc
  
  
  static int __init proc_vmalloc_init(void)
  static int __init proc_vmalloc_init(void)
  {
  {
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
 --- a/net/core/sock.c
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -3384,6 +3384,8 @@ static __net_initdata struct pernet_oper
+@@ -3387,6 +3387,8 @@ static __net_initdata struct pernet_oper
  
  
  static int __init proto_init(void)
  static int __init proto_init(void)
  {
  {
@@ -338,7 +338,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
 --- a/net/ipv4/fib_trie.c
 --- a/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
-@@ -2740,10 +2740,12 @@ static const struct file_operations fib_
+@@ -2743,10 +2743,12 @@ static const struct file_operations fib_
  
  
  int __net_init fib_proc_init(struct net *net)
  int __net_init fib_proc_init(struct net *net)
  {
  {
@@ -353,7 +353,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  			 &fib_triestat_fops))
  			 &fib_triestat_fops))
  		goto out2;
  		goto out2;
  
  
-@@ -2753,17 +2755,21 @@ int __net_init fib_proc_init(struct net
+@@ -2756,17 +2758,21 @@ int __net_init fib_proc_init(struct net
  	return 0;
  	return 0;
  
  
  out3:
  out3:
@@ -393,7 +393,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
 --- a/net/ipv4/route.c
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -428,6 +428,9 @@ static struct pernet_operations ip_rt_pr
+@@ -426,6 +426,9 @@ static struct pernet_operations ip_rt_pr
  
  
  static int __init ip_rt_proc_init(void)
  static int __init ip_rt_proc_init(void)
  {
  {

+ 1 - 1
target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch

@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
 
 
 --- a/mm/page_alloc.c
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -6145,7 +6145,7 @@ static void __ref alloc_node_mem_map(str
+@@ -6146,7 +6146,7 @@ static void __ref alloc_node_mem_map(str
  		mem_map = NODE_DATA(0)->node_mem_map;
  		mem_map = NODE_DATA(0)->node_mem_map;
  #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
  #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)

+ 2 - 2
target/linux/generic/pending-4.14/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch

@@ -23,7 +23,7 @@ Tested-by: Aaron Brown <aaron.f.brown@intel.com>
 
 
 --- a/drivers/net/ethernet/intel/e1000e/netdev.c
 --- a/drivers/net/ethernet/intel/e1000e/netdev.c
 +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
 +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
-@@ -5082,7 +5082,7 @@ static bool e1000e_has_link(struct e1000
+@@ -5080,7 +5080,7 @@ static bool e1000e_has_link(struct e1000
  
  
  	/* get_link_status is set on LSC (link status) interrupt or
  	/* get_link_status is set on LSC (link status) interrupt or
  	 * Rx sequence error interrupt.  get_link_status will stay
  	 * Rx sequence error interrupt.  get_link_status will stay
@@ -32,7 +32,7 @@ Tested-by: Aaron Brown <aaron.f.brown@intel.com>
  	 * for copper adapters ONLY
  	 * for copper adapters ONLY
  	 */
  	 */
  	switch (hw->phy.media_type) {
  	switch (hw->phy.media_type) {
-@@ -5100,7 +5100,7 @@ static bool e1000e_has_link(struct e1000
+@@ -5098,7 +5098,7 @@ static bool e1000e_has_link(struct e1000
  		break;
  		break;
  	case e1000_media_type_internal_serdes:
  	case e1000_media_type_internal_serdes:
  		ret_val = hw->mac.ops.check_for_link(hw);
  		ret_val = hw->mac.ops.check_for_link(hw);

+ 5 - 23
target/linux/generic/pending-4.14/201-extra_optimization.patch

@@ -1,32 +1,14 @@
-From: Felix Fietkau <nbd@nbd.name>
-Subject: Upgrade to Linux 2.6.19
-
-- Includes large parts of the patch from #1021 by dpalffy
-- Includes RB532 NAND driver changes by n0-1
-
-[john@phrozen.org: feix will add this to his upstream queue]
-
-lede-commit: bff468813f78f81e36ebb2a3f4354de7365e640f
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
 --- a/Makefile
 --- a/Makefile
 +++ b/Makefile
 +++ b/Makefile
-@@ -656,12 +656,12 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
+@@ -652,9 +652,9 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
  KBUILD_CFLAGS	+= $(call cc-disable-warning, attribute-alias)
  KBUILD_CFLAGS	+= $(call cc-disable-warning, attribute-alias)
  
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
--KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
- else
- ifdef CONFIG_PROFILE_ALL_BRANCHES
--KBUILD_CFLAGS	+= -O2 $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS	+= -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
+-KBUILD_CFLAGS   += -Os
++KBUILD_CFLAGS   += -Os $(EXTRA_OPTIMIZATION)
  else
  else
 -KBUILD_CFLAGS   += -O2
 -KBUILD_CFLAGS   += -O2
-+KBUILD_CFLAGS   += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION)
- endif
++KBUILD_CFLAGS   += -O2 $(EXTRA_OPTIMIZATION)
  endif
  endif
  
  
+ # Tell gcc to never replace conditional load with a non-conditional one

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

@@ -47,7 +47,7 @@ v2: incorporated changes suggested by Jonas Gorski
  	select OF
  	select OF
 --- a/arch/mips/Makefile
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -315,7 +315,7 @@ OBJCOPYFLAGS		+= --remove-section=.regin
+@@ -326,7 +326,7 @@ OBJCOPYFLAGS		+= --remove-section=.regin
  head-y := arch/mips/kernel/head.o
  head-y := arch/mips/kernel/head.o
  
  
  libs-y			+= arch/mips/lib/
  libs-y			+= arch/mips/lib/

+ 2 - 2
target/linux/generic/pending-4.14/332-arc-add-OWRTDTB-section.patch

@@ -42,7 +42,7 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
  ;----------------------------------------------------------------
  ;----------------------------------------------------------------
 --- a/arch/arc/kernel/setup.c
 --- a/arch/arc/kernel/setup.c
 +++ b/arch/arc/kernel/setup.c
 +++ b/arch/arc/kernel/setup.c
-@@ -437,6 +437,8 @@ static inline bool uboot_arg_invalid(uns
+@@ -438,6 +438,8 @@ static inline bool uboot_arg_invalid(uns
  /* We always pass 0 as magic from U-boot */
  /* We always pass 0 as magic from U-boot */
  #define UBOOT_MAGIC_VALUE	0
  #define UBOOT_MAGIC_VALUE	0
  
  
@@ -51,7 +51,7 @@ Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
  void __init handle_uboot_args(void)
  void __init handle_uboot_args(void)
  {
  {
  	bool use_embedded_dtb = true;
  	bool use_embedded_dtb = true;
-@@ -477,7 +479,7 @@ ignore_uboot_args:
+@@ -478,7 +480,7 @@ ignore_uboot_args:
  #endif
  #endif
  
  
  	if (use_embedded_dtb) {
  	if (use_embedded_dtb) {

+ 5 - 5
target/linux/generic/pending-4.14/630-packet_socket_type.patch

@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  		goto drop;
  
  
-@@ -2213,12 +2215,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2214,12 +2216,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.h2)) != 32);
  	BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
  	BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
  
  
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  		goto drop;
  
  
-@@ -3301,6 +3303,7 @@ static int packet_create(struct net *net
+@@ -3313,6 +3315,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	if (sock->type == SOCK_PACKET)
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3923,6 +3926,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3935,6 +3938,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  		return 0;
  	}
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	default:
  	default:
  		return -ENOPROTOOPT;
  		return -ENOPROTOOPT;
  	}
  	}
-@@ -3975,6 +3988,13 @@ static int packet_getsockopt(struct sock
+@@ -3987,6 +4000,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		val = po->has_vnet_hdr;
  		break;
  		break;
@@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		break;
  		break;
 --- a/net/packet/internal.h
 --- a/net/packet/internal.h
 +++ b/net/packet/internal.h
 +++ b/net/packet/internal.h
-@@ -132,6 +132,7 @@ struct packet_sock {
+@@ -135,6 +135,7 @@ struct packet_sock {
  	struct net_device __rcu	*cached_dev;
  	struct net_device __rcu	*cached_dev;
  	int			(*xmit)(struct sk_buff *skb);
  	int			(*xmit)(struct sk_buff *skb);
  	struct packet_type	prot_hook ____cacheline_aligned_in_smp;
  	struct packet_type	prot_hook ____cacheline_aligned_in_smp;

+ 18 - 15
target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch

@@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  struct nf_flow_route {
  struct nf_flow_route {
 --- a/net/netfilter/nf_flow_table_hw.c
 --- a/net/netfilter/nf_flow_table_hw.c
 +++ b/net/netfilter/nf_flow_table_hw.c
 +++ b/net/netfilter/nf_flow_table_hw.c
-@@ -19,48 +19,75 @@ struct flow_offload_hw {
+@@ -19,48 +19,77 @@ struct flow_offload_hw {
  	enum flow_offload_type	type;
  	enum flow_offload_type	type;
  	struct flow_offload	*flow;
  	struct flow_offload	*flow;
  	struct nf_conn		*ct;
  	struct nf_conn		*ct;
@@ -92,6 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -static int do_flow_offload_hw(struct net *net, struct flow_offload *flow,
 -static int do_flow_offload_hw(struct net *net, struct flow_offload *flow,
 -			      int type)
 -			      int type)
 +static void flow_offload_check_ethernet(struct flow_offload_tuple *tuple,
 +static void flow_offload_check_ethernet(struct flow_offload_tuple *tuple,
++					struct dst_entry *dst,
 +					struct flow_offload_hw_path *path)
 +					struct flow_offload_hw_path *path)
  {
  {
 -	struct net_device *indev;
 -	struct net_device *indev;
@@ -112,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
 -	dev_put(indev);
 -	dev_put(indev);
 +	memcpy(path->eth_src, path->dev->dev_addr, ETH_ALEN);
 +	memcpy(path->eth_src, path->dev->dev_addr, ETH_ALEN);
-+	n = dst_neigh_lookup(tuple->dst_cache, &tuple->src_v4);
++	n = dst_neigh_lookup(dst, &tuple->src_v4);
 +	if (!n)
 +	if (!n)
 +		return;
 +		return;
  
  
@@ -125,6 +126,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -static void flow_offload_hw_work_add(struct flow_offload_hw *offload)
 -static void flow_offload_hw_work_add(struct flow_offload_hw *offload)
 +static int flow_offload_check_path(struct net *net,
 +static int flow_offload_check_path(struct net *net,
 +				   struct flow_offload_tuple *tuple,
 +				   struct flow_offload_tuple *tuple,
++				   struct dst_entry *dst,
 +				   struct flow_offload_hw_path *path)
 +				   struct flow_offload_hw_path *path)
  {
  {
 -	struct net *net;
 -	struct net *net;
@@ -138,7 +140,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +		return -ENOENT;
 +		return -ENOENT;
 +
 +
 +	path->dev = dev;
 +	path->dev = dev;
-+	flow_offload_check_ethernet(tuple, path);
++	flow_offload_check_ethernet(tuple, dst, path);
  
  
 -	net = read_pnet(&offload->flow_hw_net);
 -	net = read_pnet(&offload->flow_hw_net);
 -	ret = do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_ADD);
 -	ret = do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_ADD);
@@ -166,11 +168,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +	/* restore devices in case the driver mangled them */
 +	/* restore devices in case the driver mangled them */
 +	offload->src.dev = src_dev;
 +	offload->src.dev = src_dev;
 +	offload->dest.dev = dest_dev;
 +	offload->dest.dev = dest_dev;
-+
-+	return ret;
-+}
  
  
 -	do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_DEL);
 -	do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_DEL);
++	return ret;
++}
++
 +static void flow_offload_hw_free(struct flow_offload_hw *offload)
 +static void flow_offload_hw_free(struct flow_offload_hw *offload)
 +{
 +{
 +	dev_put(offload->src.dev);
 +	dev_put(offload->src.dev);
@@ -182,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  }
  
  
  static void flow_offload_hw_work(struct work_struct *work)
  static void flow_offload_hw_work(struct work_struct *work)
-@@ -73,18 +100,22 @@ static void flow_offload_hw_work(struct
+@@ -73,18 +102,22 @@ static void flow_offload_hw_work(struct
  	spin_unlock_bh(&flow_offload_hw_pending_list_lock);
  	spin_unlock_bh(&flow_offload_hw_pending_list_lock);
  
  
  	list_for_each_entry_safe(offload, next, &hw_offload_pending, list) {
  	list_for_each_entry_safe(offload, next, &hw_offload_pending, list) {
@@ -211,7 +213,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	}
  	}
  }
  }
  
  
-@@ -97,20 +128,55 @@ static void flow_offload_queue_work(stru
+@@ -97,20 +130,56 @@ static void flow_offload_queue_work(stru
  	schedule_work(&nf_flow_offload_hw_work);
  	schedule_work(&nf_flow_offload_hw_work);
  }
  }
  
  
@@ -220,17 +222,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +{
 +{
 +	struct flow_offload_hw_path src = {};
 +	struct flow_offload_hw_path src = {};
 +	struct flow_offload_hw_path dest = {};
 +	struct flow_offload_hw_path dest = {};
-+	struct flow_offload_tuple *tuple;
++	struct flow_offload_tuple *tuple_s, *tuple_d;
 +	struct flow_offload_hw *offload = NULL;
 +	struct flow_offload_hw *offload = NULL;
 +
 +
 +	rcu_read_lock_bh();
 +	rcu_read_lock_bh();
 +
 +
-+	tuple = &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple;
-+	if (flow_offload_check_path(net, tuple, &src))
++	tuple_s = &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple;
++	tuple_d = &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple;
++
++	if (flow_offload_check_path(net, tuple_s, tuple_d->dst_cache, &src))
 +		goto out;
 +		goto out;
 +
 +
-+	tuple = &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple;
-+	if (flow_offload_check_path(net, tuple, &dest))
++	if (flow_offload_check_path(net, tuple_d, tuple_s->dst_cache, &dest))
 +		goto out;
 +		goto out;
 +
 +
 +	if (!src.dev->netdev_ops->ndo_flow_offload)
 +	if (!src.dev->netdev_ops->ndo_flow_offload)
@@ -270,7 +273,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	flow_offload_queue_work(offload);
  	flow_offload_queue_work(offload);
  }
  }
-@@ -119,14 +185,11 @@ static void flow_offload_hw_del(struct n
+@@ -119,14 +188,11 @@ static void flow_offload_hw_del(struct n
  {
  {
  	struct flow_offload_hw *offload;
  	struct flow_offload_hw *offload;
  
  
@@ -286,7 +289,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  
  	flow_offload_queue_work(offload);
  	flow_offload_queue_work(offload);
  }
  }
-@@ -153,12 +216,8 @@ static void __exit nf_flow_table_hw_modu
+@@ -153,12 +219,8 @@ static void __exit nf_flow_table_hw_modu
  	nf_flow_table_hw_unregister(&flow_offload_hw);
  	nf_flow_table_hw_unregister(&flow_offload_hw);
  	cancel_work_sync(&nf_flow_offload_hw_work);
  	cancel_work_sync(&nf_flow_offload_hw_work);
  
  

+ 1 - 1
target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch

@@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <linux/nsproxy.h>
  #include <linux/nsproxy.h>
  #include <net/net_namespace.h>
  #include <net/net_namespace.h>
  #include <net/netns/generic.h>
  #include <net/netns/generic.h>
-@@ -978,8 +983,36 @@ static int pppoe_xmit(struct ppp_channel
+@@ -981,8 +986,36 @@ static int pppoe_xmit(struct ppp_channel
  	return __pppoe_xmit(sk, skb);
  	return __pppoe_xmit(sk, skb);
  }
  }
  
  

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

@@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static void rt_fibinfo_free(struct rtable __rcu **rtp)
  static void rt_fibinfo_free(struct rtable __rcu **rtp)
 --- a/net/ipv4/fib_trie.c
 --- a/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
-@@ -2469,6 +2469,7 @@ static const char *const rtn_type_names[
+@@ -2472,6 +2472,7 @@ static const char *const rtn_type_names[
  	[RTN_THROW] = "THROW",
  	[RTN_THROW] = "THROW",
  	[RTN_NAT] = "NAT",
  	[RTN_NAT] = "NAT",
  	[RTN_XRESOLVE] = "XRESOLVE",
  	[RTN_XRESOLVE] = "XRESOLVE",
@@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  static const struct rt6_info ip6_blk_hole_entry_template = {
  static const struct rt6_info ip6_blk_hole_entry_template = {
  	.dst = {
  	.dst = {
  		.__refcnt	= ATOMIC_INIT(1),
  		.__refcnt	= ATOMIC_INIT(1),
-@@ -2054,6 +2071,11 @@ static struct rt6_info *ip6_route_info_c
+@@ -2056,6 +2073,11 @@ static struct rt6_info *ip6_route_info_c
  			rt->dst.output = ip6_pkt_prohibit_out;
  			rt->dst.output = ip6_pkt_prohibit_out;
  			rt->dst.input = ip6_pkt_prohibit;
  			rt->dst.input = ip6_pkt_prohibit;
  			break;
  			break;
@@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  		case RTN_THROW:
  		case RTN_THROW:
  		case RTN_UNREACHABLE:
  		case RTN_UNREACHABLE:
  		default:
  		default:
-@@ -2779,6 +2801,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -2781,6 +2803,17 @@ static int ip6_pkt_prohibit_out(struct n
  	return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
  	return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
  }
  }
  
  
@@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  /*
  /*
   *	Allocate a dst for local (unicast / anycast) address.
   *	Allocate a dst for local (unicast / anycast) address.
   */
   */
-@@ -3015,7 +3048,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -3017,7 +3050,8 @@ static int rtm_to_fib6_config(struct sk_
  	if (rtm->rtm_type == RTN_UNREACHABLE ||
  	if (rtm->rtm_type == RTN_UNREACHABLE ||
  	    rtm->rtm_type == RTN_BLACKHOLE ||
  	    rtm->rtm_type == RTN_BLACKHOLE ||
  	    rtm->rtm_type == RTN_PROHIBIT ||
  	    rtm->rtm_type == RTN_PROHIBIT ||
@@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  		cfg->fc_flags |= RTF_REJECT;
  		cfg->fc_flags |= RTF_REJECT;
  
  
  	if (rtm->rtm_type == RTN_LOCAL)
  	if (rtm->rtm_type == RTN_LOCAL)
-@@ -3515,6 +3549,9 @@ static int rt6_fill_node(struct net *net
+@@ -3517,6 +3551,9 @@ static int rt6_fill_node(struct net *net
  		case -EACCES:
  		case -EACCES:
  			rtm->rtm_type = RTN_PROHIBIT;
  			rtm->rtm_type = RTN_PROHIBIT;
  			break;
  			break;
@@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  		case -EAGAIN:
  		case -EAGAIN:
  			rtm->rtm_type = RTN_THROW;
  			rtm->rtm_type = RTN_THROW;
  			break;
  			break;
-@@ -3833,6 +3870,8 @@ static int ip6_route_dev_notify(struct n
+@@ -3835,6 +3872,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		net->ipv6.ip6_prohibit_entry->dst.dev = dev;
  		net->ipv6.ip6_prohibit_entry->dst.dev = dev;
  		net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
  		net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  		net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
  		net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
  		net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  		net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
  #endif
-@@ -3844,6 +3883,7 @@ static int ip6_route_dev_notify(struct n
+@@ -3846,6 +3885,7 @@ static int ip6_route_dev_notify(struct n
  		in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
  		in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
  		in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  		in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
  		in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
  #endif
  #endif
  	}
  	}
-@@ -4060,6 +4100,17 @@ static int __net_init ip6_route_net_init
+@@ -4062,6 +4102,17 @@ static int __net_init ip6_route_net_init
  	net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
  	net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
  	dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
  	dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
  			 ip6_template_metrics, true);
  			 ip6_template_metrics, true);
@@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  #endif
  #endif
  
  
  	net->ipv6.sysctl.flush_delay = 0;
  	net->ipv6.sysctl.flush_delay = 0;
-@@ -4078,6 +4129,8 @@ out:
+@@ -4080,6 +4131,8 @@ out:
  	return ret;
  	return ret;
  
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  out_ip6_prohibit_entry:
  out_ip6_prohibit_entry:
  	kfree(net->ipv6.ip6_prohibit_entry);
  	kfree(net->ipv6.ip6_prohibit_entry);
  out_ip6_null_entry:
  out_ip6_null_entry:
-@@ -4095,6 +4148,7 @@ static void __net_exit ip6_route_net_exi
+@@ -4097,6 +4150,7 @@ static void __net_exit ip6_route_net_exi
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	kfree(net->ipv6.ip6_prohibit_entry);
  	kfree(net->ipv6.ip6_prohibit_entry);
  	kfree(net->ipv6.ip6_blk_hole_entry);
  	kfree(net->ipv6.ip6_blk_hole_entry);
@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  #endif
  #endif
  	dst_entries_destroy(&net->ipv6.ip6_dst_ops);
  	dst_entries_destroy(&net->ipv6.ip6_dst_ops);
  }
  }
-@@ -4168,6 +4222,9 @@ void __init ip6_route_init_special_entri
+@@ -4170,6 +4224,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_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->dst.dev = init_net.loopback_dev;
  	init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
  	init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

+ 5 - 5
target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch

@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	__u16			tc_index;	/* traffic control index */
  	__u16			tc_index;	/* traffic control index */
 --- a/net/core/dev.c
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4805,6 +4805,9 @@ static enum gro_result dev_gro_receive(s
+@@ -4806,6 +4806,9 @@ static enum gro_result dev_gro_receive(s
  	enum gro_result ret;
  	enum gro_result ret;
  	int grow;
  	int grow;
  
  
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (netif_elide_gro(skb->dev))
  	if (netif_elide_gro(skb->dev))
  		goto normal;
  		goto normal;
  
  
-@@ -6282,6 +6285,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -6283,6 +6286,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  					   &upper_dev->adj_list.lower);
  }
  }
  
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static int __netdev_upper_dev_link(struct net_device *dev,
  static int __netdev_upper_dev_link(struct net_device *dev,
  				   struct net_device *upper_dev, bool master,
  				   struct net_device *upper_dev, bool master,
  				   void *upper_priv, void *upper_info)
  				   void *upper_priv, void *upper_info)
-@@ -6320,6 +6365,7 @@ static int __netdev_upper_dev_link(struc
+@@ -6321,6 +6366,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  	if (ret)
  		return ret;
  		return ret;
  
  
@@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  	ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  					    &changeupper_info.info);
  					    &changeupper_info.info);
  	ret = notifier_to_errno(ret);
  	ret = notifier_to_errno(ret);
-@@ -6397,6 +6443,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -6398,6 +6444,7 @@ void netdev_upper_dev_unlink(struct net_
  
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  				      &changeupper_info.info);
  }
  }
-@@ -6961,6 +7008,7 @@ int dev_set_mac_address(struct net_devic
+@@ -6962,6 +7009,7 @@ int dev_set_mac_address(struct net_devic
  	if (err)
  	if (err)
  		return err;
  		return err;
  	dev->addr_assign_type = NET_ADDR_SET;
  	dev->addr_assign_type = NET_ADDR_SET;

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

@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 
 --- a/drivers/net/phy/phy_device.c
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1106,6 +1106,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1110,6 +1110,9 @@ void phy_detach(struct phy_device *phyde
  	struct module *ndev_owner = dev->dev.parent->driver->owner;
  	struct module *ndev_owner = dev->dev.parent->driver->owner;
  	struct mii_bus *bus;
  	struct mii_bus *bus;
  
  
@@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  		sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
  		sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
 --- a/include/linux/phy.h
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -559,6 +559,12 @@ struct phy_driver {
+@@ -561,6 +561,12 @@ struct phy_driver {
  	 */
  	 */
  	int (*did_interrupt)(struct phy_device *phydev);
  	int (*did_interrupt)(struct phy_device *phydev);
  
  

+ 4 - 4
target/linux/generic/pending-4.14/810-pci_disable_common_quirks.patch

@@ -24,7 +24,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  	default y
  	default y
 --- a/drivers/pci/quirks.c
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -43,6 +43,7 @@ static void quirk_mmio_always_on(struct
+@@ -44,6 +44,7 @@ static void quirk_mmio_always_on(struct
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
  				PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  				PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  
  
@@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /* The Mellanox Tavor device gives false positive parity errors
  /* The Mellanox Tavor device gives false positive parity errors
   * Mark this device with a broken_parity_status, to allow
   * Mark this device with a broken_parity_status, to allow
   * PCI scanning code to "skip" this now blacklisted device.
   * PCI scanning code to "skip" this now blacklisted device.
-@@ -3094,6 +3095,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3095,6 +3096,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
  
@@ -40,7 +40,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
  
  /*
  /*
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.  To
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.  To
-@@ -3150,6 +3152,8 @@ static void fixup_debug_report(struct pc
+@@ -3151,6 +3153,8 @@ static void fixup_debug_report(struct pc
  	}
  	}
  }
  }
  
  
@@ -49,7 +49,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /*
  /*
   * Some BIOS implementations leave the Intel GPU interrupts enabled,
   * Some BIOS implementations leave the Intel GPU interrupts enabled,
   * even though no one is handling them (f.e. i915 driver is never loaded).
   * even though no one is handling them (f.e. i915 driver is never loaded).
-@@ -3188,6 +3192,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3189,6 +3193,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  
  

+ 21 - 0
target/linux/mvebu/Makefile

@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2012-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+BOARD:=mvebu
+BOARDNAME:=Marvell EBU Armada
+FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part
+SUBTARGETS:=cortexa9
+MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
+
+KERNEL_PATCHVER:=4.14
+
+include $(INCLUDE_DIR)/target.mk
+
+DEFAULT_PACKAGES += uboot-envtools kmod-gpio-button-hotplug
+
+$(eval $(call BuildTarget))

Some files were not shown because too many files changed in this diff