Browse Source

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

RISCi_ATOM 1 month 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)
 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))))
 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, \
 	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, \
 	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)))
 endef
 
-define CleanupPython3
-  define Require/python3-cleanup
+define CleanupPython2
+  define Require/python2-cleanup
 	if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
 		$(STAGING_DIR_HOST)/bin/python -V 2>&1 | \
-		grep -q 'Python 3'; then \
+		grep -q 'Python 2'; then \
 			rm $(STAGING_DIR_HOST)/bin/python; \
 	fi
   endef
 
-  $$(eval $$(call Require,python3-cleanup))
+  $$(eval $$(call Require,python2-cleanup))
 endef
 
 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))))
 
 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:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))

+ 1 - 0
package/devel/perf/Makefile

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

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

@@ -2,6 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wireless-regdb
 PKG_VERSION:=2019.06.03
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 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_VERSION:=4.19.112-1
+PKG_VERSION:=4.19.120-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_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
 +++ 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,
  				       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];
  
-@@ -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);
  void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
  			      struct txq_info *txqi);
@@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		     (unsigned long) local);
 --- a/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_data tx;
  	ieee80211_tx_result r;
@@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	/* Make sure fragments stay together. */
  	skb = __skb_dequeue(&txqi->frags);
  	if (skb)
-@@ -3586,6 +3592,7 @@ begin:
+@@ -3606,6 +3612,7 @@ begin:
  	}
  
  	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
 +++ 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]))
  				continue;
  
@@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  	return true;
  }
-@@ -3600,6 +3604,60 @@ out:
+@@ -3620,6 +3624,60 @@ out:
  }
  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,
  				  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++)
-@@ -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);
  
@@ -330,7 +330,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  int sta_info_move_state(struct sta_info *sta,
  			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);
  	}
  
@@ -385,7 +385,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	 */
 --- a/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,
  						acked, info->status.tx_time);
  
@@ -396,7 +396,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
 +						       info->status.tx_time, 0);
 +
  		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)
 --- a/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]);
  	list_del_init(&txqi->schedule_order);
  	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]);
  
@@ -442,7 +442,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		return NULL;
  
  	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]);
  
  	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
 +++ 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);
  

+ 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 (!IS_ERR(sta))
  			tx->sta = sta;
-@@ -3523,6 +3523,7 @@ begin:
+@@ -3525,6 +3525,7 @@ begin:
  	tx.local = local;
  	tx.skb = skb;
  	tx.sdata = vif_to_sdata(info->control.vif);
 +	tx.hdrlen = ieee80211_hdrlen(hdr->frame_control);
  
- 	if (txq->sta)
+ 	if (txq->sta) {
  		tx.sta = container_of(txq->sta, struct sta_info, sta);
-@@ -3549,7 +3550,7 @@ begin:
+@@ -3569,7 +3570,7 @@ begin:
  
  		if (tx.key &&
  		    (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,
  					   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;
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	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)
  		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_sub_if_data *ap_sdata;
  	enum nl80211_band band;
@@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (IS_ERR(sta))
  		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);
@@ -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
-@@ -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);
  #endif
  
@@ -265,7 +265,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (ieee80211_is_data_qos(fc)) {
  		__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);
  	}
  
@@ -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()
  	 * 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,
-@@ -3523,7 +3529,7 @@ begin:
+@@ -3525,7 +3531,7 @@ begin:
  	tx.local = local;
  	tx.skb = skb;
  	tx.sdata = vif_to_sdata(info->control.vif);
 -	tx.hdrlen = ieee80211_hdrlen(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);
-@@ -4007,7 +4013,7 @@ ieee80211_build_data_template(struct iee
+@@ -4029,7 +4035,7 @@ ieee80211_build_data_template(struct iee
  	hdr = (void *)skb->data;
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	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
 --- a/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_local *local = hw_to_local(hw);
@@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (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])
@@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (list_empty(&txqi->schedule_order) &&
  	    (!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,
  				      &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]);
  }
  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;
  	u8 ac = txq->ac;
  
@@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (!txqi->txq.sta)
  		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;
  	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;
  	ieee80211_set_qos_hdr(sdata, 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 ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
  	u8 *target_addr = hdr->addr3;
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (time_after(jiffies,
  		       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->addr2, sdata->vif.addr, ETH_ALEN);
  		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);
  
-@@ -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;
  	int max_frags = local->hw.max_tx_fragments;
  	int max_amsdu_len = sta->sta.max_amsdu_len;
@@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	int orig_truesize;
  	__be16 len;
  	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,
  				      sta->sta.max_rc_amsdu_len);
  
@@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	spin_lock_bh(&fq->lock);
  
  	/* 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;

+ 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
 +++ 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;
  	struct ieee80211_vif *vif = txq->vif;
  
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	spin_lock_bh(&fq->lock);
  
  	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)
  		goto out;
  
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	hdr = (struct ieee80211_hdr *)skb->data;
  	info = IEEE80211_SKB_CB(skb);
  
-@@ -3571,8 +3573,11 @@ begin:
+@@ -3591,8 +3593,11 @@ begin:
  
  		skb = __skb_dequeue(&tx.skbs);
  
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	}
  
  	if (skb && skb_has_frag_list(skb) &&
-@@ -3611,6 +3616,7 @@ begin:
+@@ -3631,6 +3636,7 @@ begin:
  	}
  
  	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
 +++ 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,
  			      const u8 *buf, size_t len,
  			      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);
  		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);
  	padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
@@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	}
  
  	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;
  	u16 ethertype = (skb->data[12] << 8) | skb->data[13];
  	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 ieee80211_tx_info *info;
  	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
  	 * 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
 +++ b/net/mac80211/tx.c
-@@ -3653,8 +3653,9 @@ out:
+@@ -3673,8 +3673,9 @@ out:
  }
  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 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]);
  
  	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
  		 * head of the list to ensure that they only get moved to the
  		 * 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]);
  }

+ 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
 +++ 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_local *local = sdata->local;
  	struct sta_info *sta;
  	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))
  		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
 +++ 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,
  			 u32 tx_flags);
  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_VERSION:=0.12.1
-PKG_RELEASE:=3
+PKG_RELEASE:=3.1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
 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
 +++ b/configure.ac
-@@ -43,12 +43,6 @@
+@@ -43,12 +43,6 @@ AC_FUNC_MEMCMP
  AC_FUNC_MALLOC
  AC_FUNC_REALLOC
  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_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=0
 PKG_LICENSE:=BSD-3-Clause
 
 include $(INCLUDE_DIR)/package.mk

+ 3 - 3
package/libs/libubox/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=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
 
 PKG_LICENSE:=ISC

+ 3 - 3
package/libs/uclient/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=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
 
 PKG_BUILD_DEPENDS:=ustream-ssl

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

@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ustream-ssl
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=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
 
 PKG_LICENSE:=ISC

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

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qos-scripts
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 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 ] && {
 	# 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() {
-		echo "Interface not found."
+		echo "Interface not found." >&2
 		exit 1
 	}
 }
@@ -218,6 +223,7 @@ qos_parse_config() {
 				config_get device "$1" device
 				[ -z "$device" ] && {
 					device="$(find_ifname $1)"
+					[ -z "$device" ] && exit 1
 					config_set "$1" device "$device"
 				}
 			}

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

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=dnsmasq
 PKG_UPSTREAM_VERSION:=2.80
 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_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 "--dnssec"
 		[ -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"
-			}
+			fi
 		}
 		append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
 	}

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

@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.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=
 
 	_w_mode="$mode"
-	_w_modestr=
 
 	[[ "$mode" = adhoc ]] && {
 		ap_scan="ap_scan=2"
-
-		_w_modestr="mode=1"
 	}
 
 	local country_str=
@@ -790,6 +787,7 @@ wpa_supplicant_add_network() {
 	[[ "$_w_mode" = "adhoc" ]] && {
 		append network_data "mode=1" "$N$T"
 		[ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode"
+		[ "$noscan" = "1" ] && append network_data "noscan=1" "$N$T"
 
 		scan_ssid="scan_ssid=0"
 
@@ -809,8 +807,6 @@ wpa_supplicant_add_network() {
 		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"
 
 	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
 +++ b/wpa_supplicant/wpa_cli.c
-@@ -26,6 +26,9 @@
+@@ -26,6 +26,15 @@
  #include <cutils/properties.h>
  #endif /* ANDROID */
  
 +#ifndef CONFIG_P2P
 +#define CONFIG_P2P
++#endif
++#ifndef CONFIG_AP
++#define CONFIG_AP
++#endif
++#ifndef CONFIG_MESH
++#define CONFIG_MESH
 +#endif
  
  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_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_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_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_LICENSE:=GPL-2.0

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

@@ -12,9 +12,9 @@ PKG_RELEASE:=4
 
 PKG_SOURCE_PROTO:=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_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_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_LICENSE:=LGPL-2.1

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

@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=1.0.20200330
+PKG_VERSION:=1.0.20200623
 PKG_RELEASE:=1
 
 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
-PKG_HASH:=2d57b239605be2ee0e4c2da935ff1a23e9ed8bb3ee692e10ae032ae50f280bef
+PKG_HASH:=130937724515799edf05ff8216bc837df8acda879428f3a7f96a3287758f9445
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
@@ -35,7 +35,9 @@ define Package/wireguard/Default
   CATEGORY:=Network
   SUBMENU:=VPN
   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
 
 define Package/wireguard/Default/description

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

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
 PKG_VERSION:=7.66.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 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_VERSION:=1.4.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 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_VERSION:=1.0.20200319
+PKG_VERSION:=1.0.20200513
 PKG_RELEASE:=1
 
 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
-PKG_HASH:=757ed31d4d48d5fd7853bfd9bfa6a3a1b53c24a94fe617439948784a2c0ed987
+PKG_HASH:=e73409a9fb8c90506db241d1e1a4e7372a60dbfa400e37f4ab2fd70a92ba495f
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING

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

@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ca-certificates
-PKG_VERSION:=20190110
-PKG_RELEASE:=2
+PKG_VERSION:=20200601
+PKG_RELEASE:=1
 PKG_MAINTAINER:=
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
 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
 
 include $(INCLUDE_DIR)/package.mk

+ 3 - 3
package/system/fstools/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=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
 
 PKG_LICENSE:=GPL-2.0

+ 3 - 3
package/system/opkg/Makefile

@@ -14,9 +14,9 @@ PKG_FLAGS:=essential
 
 PKG_SOURCE_PROTO:=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_FILES:=COPYING

+ 3 - 3
package/system/rpcd/Makefile

@@ -12,10 +12,10 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=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_MIRROR_HASH:=d36caff85bebbf7fb1b512359243bdbb7d9b16140e0d631afae9de2c3b8e4dff
+PKG_MIRROR_HASH:=cfe44e600093a424d1133b55a141c5becb708f48ee4fc8b7a98a82495ced7c72
 
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=

+ 3 - 3
package/system/ucert/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=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
 PKG_CHECK_FORMAT_SECURITY:=1

+ 3 - 3
package/system/usign/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=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
 PKG_CHECK_FORMAT_SECURITY:=1
 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",
-		.type		= EV_KEY,
+		.type		= EV_SW,
 		.code		= BTN_0,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_MR3020_GPIO_BTN_SW1,
@@ -87,7 +87,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
 	},
 	{
 		.desc		= "sw2",
-		.type		= EV_KEY,
+		.type		= EV_SW,
 		.code		= BTN_1,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.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"
 
 #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_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,
 		.debounce_interval = TL_WR802N_KEYS_DEBOUNCE_INTERVAL,
 		.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
 +++ b/drivers/gpio/Kconfig
-@@ -1299,4 +1299,12 @@ config GPIO_VIPERBOARD
+@@ -1300,4 +1300,12 @@ config GPIO_VIPERBOARD
  
  endmenu
  

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

@@ -109,7 +109,7 @@
 +#endif
 --- a/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
  	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
 +++ 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
  	  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
 +++ b/arch/mips/Kconfig
-@@ -1152,6 +1152,9 @@ config MIPS_MSC
+@@ -1153,6 +1153,9 @@ config MIPS_MSC
  config MIPS_NILE4
  	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) {
 --- a/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)
  		pkey = &ip_hdr(skb)->daddr;
  
@@ -757,7 +757,7 @@
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/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);
  
@@ -831,7 +831,7 @@
   * No flags defined yet.
 --- a/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)
  {
  	__be32 diff[] = {

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

@@ -33,3 +33,24 @@
 		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;
+	};