265 Commits 4aa805cd50 ... c152c845b4

Author SHA1 Message Date
  jahway603 c152c845b4 Add TPE-R1300 & TPE-R1400 wiki pages. 6 months ago
  RISCi_ATOM 772da7e062 librecmc : Bump to v1.5.15 10 months ago
  RISCi_ATOM d86d6edd2d wolfssl : Bump to 5.6.6 10 months ago
  RISCi_ATOM 5739ca0500 librecmc : Add python3.12 to the list and fixup grep issue 10 months ago
  RISCi_ATOM a757ef22ba kernel: Bump to 4.14.334 10 months ago
  RISCi_ATOM d9735f7238 ar71xx: Add missing patch fix for 4.14.325 1 year ago
  RISCi_ATOM 1fe7cae368 usbip : Add usbip support with appropriate dependencies. 1 year ago
  RISCi_ATOM 19f54c0804 librecmc: Bump to 1.5.14 1 year ago
  RISCi_ATOM 08b07dc156 tor: Bump to 0.4.8.5 1 year ago
  RISCi_ATOM e7a2b73336 openvpn: Bump to 2.5.9 1 year ago
  RISCi_ATOM 81585c8072 ustream-ssl: Make wolfssl variant the default 1 year ago
  RISCi_ATOM 4bd885010d openssl: Bump to 1.1.1w 1 year ago
  RISCi_ATOM bde078477c wolfssl : Bump to 5.6.3 1 year ago
  RISCi_ATOM bea1f96217 tools/cmake : Bump to 3.19.8 1 year ago
  RISCi_ATOM a5af9ff42c kernel : Bump to 4.14.325 1 year ago
  RISCi_ATOM 6c236996e9 kernel: Bump to 4.14.314 1 year ago
  RISCi_ATOM aa0341611a librecmc: Add package mesh11sd from 21.02 feed 1 year ago
  RISCi_ATOM 3f28eb92c9 openvpn : Remove leftover patches 1 year ago
  RISCi_ATOM 41f4da13db librecmc: Bump to v1.5.13 1 year ago
  RISCi_ATOM 5d911f8acc openvpn : Bump to 2.5.8 1 year ago
  RISCi_ATOM ba96dde3ef ca-certs: Update to 20211016 1 year ago
  RISCi_ATOM 1ac68ebc53 mirrors: Add Debian source mirrors 1 year ago
  RISCi_ATOM 3d732b1863 kernel: Bump to 4.14.311 1 year ago
  John Audia bb9c0c9383 openssl: bump to 1.1.1t 1 year ago
  RISCi_ATOM 8fb15118f0 rockchip: Fixup arm-trusted-firmware with deblobbed version (missing HDCP) 1 year ago
  RISCi_ATOM 5ba2fc61dc rockchip: fixup, add kmod-usb-net pkg 1 year ago
  RISCi_ATOM f237a00b04 librecmc: Bump version to v1.5.12 1 year ago
  RISCi_ATOM 38be665d37 kernel: Bump to 4.14.303 1 year ago
  RISCi_ATOM 6f3a84f4fe target: Add rockchip target 1 year ago
  RISCi_ATOM 31b6bceaf7 kernel: Bump to 4.14.302 1 year ago
  RISCi_ATOM 4a1100dbb8 wolfssl: Bump to 5.5.4-stable 1 year ago
  RISCi_ATOM 2179bbe4fa openssl: Bump to 1.1.1s 1 year ago
  RISCi_ATOM 74e2bc4686 librecmc: Bump to v1.5.11 2 years ago
  RISCi_ATOM ef62e1d844 wireguard: Bump to v1.0.20220627 2 years ago
  RISCi_ATOM 9b5de73b50 openssl: Bump to 1.1.1q 2 years ago
  RISCi_ATOM d3483fd9a4 wolfssl: Bump to 5.5.0-stable 2 years ago
  RISCi_ATOM 7a76960326 librecmc: Add Python 3.11 for Python 3 check. 2 years ago
  RISCi_ATOM 7b675d0ee6 kernel: Bump to 4.14.294 2 years ago
  RISCi_ATOM 25db3cdf6d librecmc: bump version to v1.5.10 2 years ago
  RISCi_ATOM ad9ad200da kernel: bump to 4.14.284 2 years ago
  RISCi_ATOM 6f1ef025cb openssl: Bump to 1.1.1p 2 years ago
  RISCi_ATOM 01510c8cee openvpn: Bump to 2.4.12 2 years ago
  Eneas U de Queiroz 56afa8b698 wolfssl: fix compilation with /dev/crypto 2 years ago
  Eneas U de Queiroz 11fc0a08b3 wolfssl: bump to 5.2.0 2 years ago
  RISCi_ATOM aca8092b80 kernel: Bump to 4.14.277 2 years ago
  Hauke Mehrtens eece508e4f mac80211: Update to version 4.19.237-1 2 years ago
  Sven Eckelmann b658eae77f uboot-sunxi: Fix build with GCC-10 as host compiler 3 years ago
  RISCi_ATOM 6a64dfa723 mvebu: Fixup kernel config 2 years ago
  RISCi_ATOM bee5bd5d88 librecmc: Bump version to v1.5.9 2 years ago
  RISCi_ATOM 8b346e0aac wolfssl: bump to 5.1.1-stable 2 years ago
  Hauke Mehrtens 3bbf980d81 tcpdump: Fix CVE-2018-16301 2 years ago
  Hauke Mehrtens 30743efdac tcpdump: libpcap: Remove http://www.us.tcpdump.org mirror 2 years ago
  Hauke Mehrtens 8fd3789c1f hostapd: Apply SAE/EAP-pwd side-channel attack update 2 2 years ago
  Hauke Mehrtens 57fcc22cae mbedtls: Update to version 2.16.12 2 years ago
  Rosen Penev 2525e5f1b0 mbedtls: update to 2.16.11 3 years ago
  Rafał Miłecki 75481ca4af base-files: call "sync" after initial setup 2 years ago
  Martin Schiller ee3d75ec36 openssl: bump to 1.1.1n 2 years ago
  Petr Štetiar 3e106e312a zlib: backport security fix for a reproducible crash in compressor 2 years ago
  RISCi_ATOM f5959df40a kernel: Bump to 4.14.273 2 years ago
  RISCi_ATOM 315338852a librecmc: Bump to v1.5.8 2 years ago
  RISCi_ATOM 7ae3271d7b tor: Bump to 0.4.5.10 2 years ago
  RISCi_ATOM dfbf746e7a libgpg-error : Bump to 1.42 2 years ago
  RISCi_ATOM 4d1b2b87d7 kernel: Bump to 4.14.261 2 years ago
  RISCi_ATOM 57757b84ff openssl: bump to 1.1.1m 2 years ago
  RISCi_ATOM 52a23b23c1 kernel: Bump to 4.14.260 2 years ago
  RISCi_ATOM 6e7dc3845d wolfssl: Bump to 4.8.1 2 years ago
  RISCi_ATOM dc6d69b65d base: Update python requirements 2 years ago
  RISCi_ATOM 8be1d8c9b5 wireguard : Bump to v1.0.20211208 2 years ago
  RISCi_ATOM f8613746c2 kernel: bump 4.14 to 4.14.254 2 years ago
  RISCi_ATOM 8c2d007dd3 mac80211: Update to version 4.19.221 2 years ago
  Christian Lamparter c9b62dd0d3 wireless-regdb: update to version 2021.08.28 3 years ago
  Felix Fietkau 852ae6c23e wireless-regdb: update to version 2021.04.21 3 years ago
  Rosen Penev fa48f0dd84 tools/m4: update to 1.4.19 3 years ago
  RISCi_ATOM 30db924741 librecmc: Bump version to 1.5.7 3 years ago
  RISCi_ATOM 88f9234e9a luci: Remove jsmin from luci and use the jsmin Python module instead. 3 years ago
  RISCi_ATOM 98e10c563c mac80211: Update to backports-4.19.207-1 3 years ago
  RISCi_ATOM 82e90fbf0f kernel: Bump to 4.14.248-gnu1 3 years ago
  RISCi_ATOM 49fd40b291 kernel: Bump to 4.14.246 3 years ago
  RISCi_ATOM cde940bc6a openssl: bump to 1.1.1l 3 years ago
  RISCi_ATOM 83d6117fb4 librecmc: Bump to v1.5.6 3 years ago
  RISCi_ATOM 3d1900ded3 wireguard: Bump to v1.0.20210606 3 years ago
  RISCi_ATOM ceb571a876 tor: Bump to 0.4.4.9 3 years ago
  RISCi_ATOM 784622a3fa kernel: Bump to 4.14.138 3 years ago
  Hauke Mehrtens 26dc62e346 mac80211: Update to backports version 4.19.193-test1 3 years ago
  RISCi_ATOM afa68e5285 kernel: Bump to 4.14.237 3 years ago
  RISCi_ATOM 5742bfef87 kernel: Bump to 4.14.232 3 years ago
  RISCi_ATOM 9674df44bd wireguard: bump to v1.0.20210424 3 years ago
  Bas Mevissen 4819704f0a Extend checks on build prerequisites for building OpenWRT core 3 years ago
  Rosen Penev 29798dd537 prereq-build: test for perl's Data::Dumper 4 years ago
  Hauke Mehrtens 37f1b06171 mac80211: Update to backports version 4.19.189-1 3 years ago
  Hauke Mehrtens 1ebe1c794c dropbear: Fix CVE-2020-36254 3 years ago
  RISCi_ATOM a5ab8f0047 openvpn: Bump to 2.4.11 3 years ago
  RISCi_ATOM f13ddeff2d kernel: Bump to 4.14.224 3 years ago
  RISCi_ATOM 1c2be9ac65 wireguard: Bump to 1.0.20210219 3 years ago
  RISCi_ATOM ceb8d09bc7 librecmc: bump to v1.5.5 3 years ago
  RISCi_ATOM 0c397a6cda luci: Add luci-app-unbound to base 3 years ago
  RISCi_ATOM f5a68cadf9 tools: mklibs Add HOST_CPPFLAGS to fix compilation w/ GCC11 3 years ago
  Magnus Kroken 5e8cb25db1 mbedtls: update to 2.16.10 3 years ago
  Eneas U de Queiroz 84b8f809f1 openssl: bump to 1.1.1k 3 years ago
  RISCi_ATOM 4e8d3c332e uboot-envtools: Add tpe-r1300 3 years ago
  Stefan Lippers-Hollmann 440f4f98ee hostapd: P2P: Fix a corner case in peer addition based on PD Request 3 years ago
  Raphaël Mélotte 84f94a0612 hostapd: backport ignoring 4addr mode enabling error 3 years ago
  Eneas U de Queiroz 3e09af24fd wolfssl: bump to v4.7.0-stable 3 years ago
  Petr Štetiar aefa030568 build: fix checks for GCC11 3 years ago
  Eneas U de Queiroz 733e1818ad openssl: bump to 1.1.1j 3 years ago
  Hauke Mehrtens 3c4c5d7b9b wolfssl: Backport fix for CVE-2021-3336 3 years ago
  Daniel Golle 068f6e4c2f hostapd: fix P2P group information processing vulnerability 3 years ago
  Baptiste Jonglez c72e28169f opkg: update to latest git HEAD of branch openwrt-19.07 3 years ago
  Felix Fietkau a14e93b3cc wolfssl: enable HAVE_SECRET_CALLBACK 3 years ago
  Hauke Mehrtens 693091214f wolfssl: Fix hostapd build with wolfssl 4.6.0 3 years ago
  Eneas U de Queiroz 094121c6d6 wolfssl: Update to v4.6.0-stable 3 years ago
  Kevin Darbyshire-Bryant 4490c693e7 dnsmasq: backport fixes 3 years ago
  Hans Dedecker 4c44bebf94 netifd: fix IPv6 routing loop on point-to-point links 3 years ago
  Hans Dedecker c846bd377c odhcp6c: fix IPv6 routing loop on point-to-point links 3 years ago
  RISCi_ATOM be53bd03d0 Bump version to v1.5.4a 3 years ago
  RISCi_ATOM aca78f212b kernel: bump to 4.14.216 3 years ago
  Rosen Penev 8751927877 mbedtls: update to 2.16.9 3 years ago
  Hauke Mehrtens bd44222377 dnsmasq: Backport some security updates 3 years ago
  Hauke Mehrtens 015d9caed5 glibc: update to latest 2.27 commit 3 years ago
  RISCi_ATOM dfb14b51a2 hostapd: add wpad-basic-wolfssl variant 3 years ago
  RISCi_ATOM dcb91d7b45 wireguard: Bump to v1.0.20201221 3 years ago
  RISCi_ATOM 9e865ef063 openvpn: Bump to 2.4.10 3 years ago
  RISCi_ATOM fb019467b2 kernel: bump 4.14 to 4.14.212 3 years ago
  Hauke Mehrtens 99b1aaaa8c wireless-regdb: Update to version 2020.11.20 3 years ago
  Petr Štetiar 69ca42e6fe wireless-regdb: bump to latest release 2020-04-29 4 years ago
  Hauke Mehrtens 7fd69f190f mac80211: Update to version 4.19.161-1 3 years ago
  RISCi_ATOM 56cbd1f0df base: Remove libtirpc from base 3 years ago
  RISCi_ATOM 38bed91031 vpnc : Pull package from libreCMC src mirror vpnc svn repostiory is broken 3 years ago
  RISCi_ATOM 8436e8824e luci : Remove rpcd-mod-rad2-enc 3 years ago
  RISCi_ATOM 5428038bfc tor: update to version 0.4.4.6 3 years ago
  RISCi_ATOM bd3e0251d1 openssl: update to 1.1.1i 3 years ago
  David Bauer 6c15dceda6 generic: ipeth: fix iOS 14 tethering 3 years ago
  Andre Heider 78886da903 tools: always create $STAGING_DIR/usr/{include,lib} 4 years ago
  Petr Štetiar 3e8eb3768e download.pl: properly cleanup intermediate .hash file 3 years ago
  Petr Štetiar 68ef46d836 download: handle possibly invalid local tarballs 4 years ago
  Petr Štetiar e04c69fc1f cmake.mk,rules.mk: fix host builds using CMake and ccache 3 years ago
  Rosen Penev 1cb9efdb14 cmake.mk: set C/CXX compiler for host builds as well 3 years ago
  Klaus Kudielka ff02385742 mvebu: fixup Turris Omnia U-Boot environment 4 years ago
  Klaus Kudielka 0ba637ba2c mvebu: base-files: Update Turris Omnia U-Boot environment 4 years ago
  Klaus Kudielka 7b360682fe mvebu: Add turris-omnia.bootscript 4 years ago
  Klaus Kudielka 2b7b5cbceb uboot-envtools: mvebu: update uci defaults for Turris Omnia 4 years ago
  RISCi_ATOM ec420dd6e7 Defaults: Enable wolfssl as the default libssl 3 years ago
  RISCi_ATOM 74615cbd1f Bump version to v1.5.4 3 years ago
  RISCi_ATOM cdfb0b865f ath79 : Add support for the TPE-R1300 3 years ago
  RISCi_ATOM 98c30ac8e5 mvebu : Add missing swconfig package for Turris / WRT1900ACv1) 3 years ago
  RISCi_ATOM 076be882b0 ath79 : TPE-R1100 / GL.iNet GL-AR150 LED Fixup 3 years ago
  David Bauer d44d59b063 scripts: download.pl: retry download using filename 4 years ago
  Jan Pavlinec 7fc0869400 tcpdump: patch CVE-2020-8037 3 years ago
  Sven Eckelmann 57716778ff kernel: mtd: parser: cmdline: Fix parsing of part-names with colons 4 years ago
  Petr Štetiar 0de81c1c62 musl: handle wcsnrtombs destination buffer overflow (CVE-2020-28928) 4 years ago
  Petr Štetiar 17d834e272 ar71xx,ath79: refresh 910-unaligned_access_hacks.patch 4 years ago
  Aaron Goodman 5488087879 kernel: add netfilter-actual-sk patch 4 years ago
  Jo-Philipp Wich 788ee1c7c5 uhttpd: update to 19.07 Git HEAD 4 years ago
  RISCi_ATOM 00b9d1f53a kernel : bump to 4.14.209 3 years ago
  Alberto Bursi 8f59543a23 wireguard-tools: fix category/description in menuconfig 4 years ago
  Jason A. Donenfeld 11c3a480f0 wireguard: bump to 1.0.20201112 4 years ago
  Hauke Mehrtens 06ace83ea7 uci: Backport security fixes 4 years ago
  Hauke Mehrtens ad67070f11 firewall: options: fix parsing of boolean attributes 4 years ago
  Felix Fietkau a8d813a6ac mac80211: do not allow bigger VHT MPDUs than the hardware supports 4 years ago
  Chuanhong Guo 19110bcecb ath79: ar8216: make switch register access atomic 4 years ago
  RISCi_ATOM 2139e3d8a3 kernel : Bump to 4.14.202 4 years ago
  Hauke Mehrtens c335ed4cc7 kernel: fix nand_release() usage. 4 years ago
  RISCi_ATOM 619a21c201 librecmc: Bump version to v1.5.3 4 years ago
  Yousong Zhou be8b1eab59 firewall: backport patch for mss clamping in both directions 4 years ago
  Jo-Philipp Wich b3133d8a1e firewall: update to latest Git HEAD 5 years ago
  Magnus Kroken c342e5132b busybox: delete redundant patch 4 years ago
  Magnus Kroken ed5c85f11b mbedtls: update to 2.16.8 4 years ago
  Hauke Mehrtens 8a68fa9fba wolfssl: Activate link time optimization (LTO) 4 years ago
  Paul Spooren 75b508d1d1 wolfssl: add certgen config option 4 years ago
  RISCi_ATOM 2e95046b77 luci: Add support for wolfssl as an alternative to mbedtls. 4 years ago
  Jason A. Donenfeld cb922f4f68 wireguard-tools: bump to 1.0.20200827 4 years ago
  Eneas U de Queiroz f78f94a2e7 openssl: bump to 1.1.1h 4 years ago
  Rozhuk Ivan 8a26f89da9 comgt: fix hotplug event handling 5 years ago
  RISCi_ATOM c36c0d5447 kernel : bump to 4.14.199 4 years ago
  Jason A. Donenfeld 6262ce22aa wireguard: bump to 1.0.20200908 4 years ago
  Hauke Mehrtens 49e99a5126 hostapd: Fix compile errors after wolfssl update 4 years ago
  RISCi_ATOM acbba60747 curl: Bump to 7.72.0 4 years ago
  Hauke Mehrtens 9150024a85 wolfssl: Update to version 4.5.0 4 years ago
  Eneas U de Queiroz 249c46266d wolfssl: use -fomit-frame-pointer to fix asm error 4 years ago
  Eneas U de Queiroz 49123a7433 wolfssl: update to 4.4.0-stable 4 years ago
  RISCi_ATOM 9003a2e19e kernel: Bump to 4.14.198 4 years ago
  RISCi_ATOM f5df1bd111 kernel: Bump to 4.14.196 4 years ago
  RISCi_ATOM a96491e6df kernel: Bump to 4.14.195 4 years ago
  RISCi_ATOM 3fc2788123 kernel: Bump to 4.14.194 4 years ago
  RISCi_ATOM 6c1fcd028d kernel: Bump to 4.14.193 4 years ago
  RISCi_ATOM 23ff25007e kernel: Bump kernel to 4.14.191 4 years ago
  RISCi_ATOM d2eb9e210f kernel: Bump to 4.14.187 4 years ago
  RISCi_ATOM 68dcde4227 mac80211: Update to 4.19.137-1 4 years ago
  Hauke Mehrtens bcd02fc014 mac80211: Fix potential endless loop 4 years ago
  Jason A. Donenfeld b91cc1a307 wireguard: bump to 1.0.20200729 4 years ago
  RISCi_ATOM 9f91ff61b3 tor: update to version 0.4.3.6 (security fix) 4 years ago
  Leon M. George feac660813 mac80211: fix use of local variable 4 years ago
  Hans Dedecker d019a44c2d nghttp2: bump to 1.41.0 4 years ago
  Magnus Kroken 9bbd5dea9d mbedtls: update to 2.16.7 4 years ago
  Jan Pavlinec 9d9734c3e3 curl: patch CVE-2020-8169 4 years ago
  RISCi_ATOM 6d3dc7a6ae Merge branch 'v1.5' into LTS : v1.5.2 4 years ago
  RISCi_ATOM b3ca507f32 Bump version to v1.5.2 4 years ago
  RISCi_ATOM 4eaf9e5e42 mvebu: Add basic support for WRT1900AC (v1) and Turris Omnia (pre 2019) 4 years ago
  RISCi_ATOM 25690ce506 wireguard: bump to 1.0.20200623 4 years ago
  RISCi_ATOM a6e331ba72 kernel: Bump to 4.14.185 4 years ago
  Jo-Philipp Wich 2610598636 uclient: update to 19.07 Git HEAD 4 years ago
  Christian Lamparter bb1f93fe39 ath79: wndr3700 series: fix wifi range & throughput 4 years ago
  Christian Lamparter 2cdc7512b1 ca-certificates: update to version 20200601 4 years ago
  RISCi_ATOM 4154de0ae2 build: Switch to Python3 4 years ago
  Petr Štetiar 922240ee63 scons: move to packages feed 5 years ago
  Lech Perczak e916e86486 ar71xx: fix reset key for TP-Link TL-WR802N V1/V2 4 years ago
  John Crispin bf9a0a99f8 generic: fix flow table hw offload 4 years ago
  David Bauer f42da46fe9 ar71xx: correct button type for TL-MR3020 mode slider 4 years ago
  Jo-Philipp Wich c8ffb21476 qos-scripts: fix interface resolving 4 years ago
  Matthias Schiffer eac715b04e musl: fix locking synchronization bug 4 years ago
  Felix Fietkau 1beb2afc0f libubox: update to the latest version 4 years ago
  Rafał Miłecki d2de8dfa5e libubox: update to the latest master 4 years ago
  Jo-Philipp Wich d1c751d20f libubox: update to latest Git HEAD 4 years ago
  Jo-Philipp Wich ea01a51104 rpcd: update to latest openwrt-19.07 Git HEAD 4 years ago
  Jason A. Donenfeld 79e0351b2e wireguard-tools: bump to 1.0.20200513 4 years ago
  Jason A. Donenfeld 51d507af21 wireguard: bump to 1.0.20200520 4 years ago
  Daniel Golle 18086fb655 hostapd: backport wolfssl bignum fixes 4 years ago
  Matthias Schiffer c258b66c89 ucert: update to latest git HEAD 4 years ago
  Hauke Mehrtens e955607fee squashfs: Fix compile with GCC 10 4 years ago
  Matthias Schiffer e07fda3ea0 usign: update to latest git HEAD 4 years ago
  Hauke Mehrtens 4119d8a620 usign: update to latest Git HEAD 5 years ago
  Robert Marko 2c4ca7ef1d libjson-c: backport security fixes 4 years ago
  Daniel Golle 05dc838d13 fstools: blockd: fix segfault triggered by non-autofs mounts 4 years ago
  RISCi_ATOM ff8cae7e95 kernel: Bump 4.14 to 4.14.180 4 years ago
  Lech Perczak 45f640099b ath79: dts: add missing 'serial0' alias for TP-Link TL-MR3040v2 4 years ago
  RISCi_ATOM 662c3949da odhcpd: Fix PKG_MIRROR_HASH 4 years ago
  Jo-Philipp Wich fd7a71b3c0 opkg: update to latest Git HEAD 4 years ago
  RISCi_ATOM 0d44d661a6 wireguard: bump to 1.0.20200506 4 years ago
  Hans Dedecker 8d16c4e56c odhcpd: fix PKG_SOURCE_DATE 4 years ago
  Hans Dedecker ff793f35db odhcpd: fix lan host reachibility due to identical RIO and PIO prefixes (FS#3056) 4 years ago
  Jo-Philipp Wich 28a53e67ad ustream-ssl: update to 19.07 Git HEAD 4 years ago
  Jo-Philipp Wich a76e4f817b uhttpd: update to 19.07 Git HEAD 4 years ago
  Rafał Miłecki e3f7d0de8d fstools: update to the latest version 4 years ago
  Felix Fietkau d7b1f7e1d9 fstools: update to the latest version 4 years ago
  Hauke Mehrtens c5472b8ce3 mac80211: Update to version 4.19.120 4 years ago
  Hauke Mehrtens 7572abca5c dante: Fix compile with glibc 4 years ago
  Yangbo Lu 1d9ca5a21b perf: build with NO_LIBCAP=1 4 years ago
  Matt Merhar 65c8162bc5 kernel: backport fix for non-regular inodes on f2fs 4 years ago
  RISCi_ATOM 36a091784c Bump kernel to 4.14.179 4 years ago
  Antonio Quartulli 57283378d4 wpad-wolfssl: fix crypto_bignum_sub() 4 years ago
  Felix Fietkau 1abb1c3413 mac80211: backport fix for an no-ack tx status issue 4 years ago
  Felix Fietkau 3ad53f10bc hostapd: unconditionally enable ap/mesh for wpa-cli 4 years ago
  Daniel Golle 75d65a39dc hostapd: cleanup IBSS-RSN 4 years ago
  Petr Štetiar c1e3808de8 wireless-regdb: backport three upstream fixes 4 years ago
  Petr Štetiar 64792b9c25 curl: backport fix for CVE-2019-15601 4 years ago
  RISCI_ATOM 19b1d5de8b Merge branch 'LTS' of jahway603/libreCMC into LTS 4 years ago
  RISCi_ATOM c13b090fac wireguard: bump to 1.0.20200429 4 years ago
  Kevin Darbyshire-Bryant 8aea12992e relayd: bump to version 2020-04-25 4 years ago
  Kevin Darbyshire-Bryant 6604ac7aa5 umdns: update to version 2020-04-25 4 years ago
  Henrique de Moraes Holschuh 906a916780 dnsmasq: fix dnssec+ntp chicken-and-egg workaround (FS#2574) 4 years ago
  Petr Štetiar 3868b2cbb7 libpcap: fix build breakage with very high number of simultaneous jobs 4 years ago
  RISCi_ATOM b3b306686d Change AR71XX support to and link to Supported Hardware page 4 years ago
  Petr Štetiar 97f036a3cb openssl: bump to 1.1.1g 4 years ago
  Kevin Darbyshire-Bryant bfc4c199f8 relayd: bump to version 2020-04-20 4 years ago
  Kevin Darbyshire-Bryant 49a45b3fda umdns: update to version 2020-04-20 4 years ago
  Kevin Darbyshire-Bryant 830311ee1a umdns: update to the version 2020-04-05 4 years ago
  Kevin Darbyshire-Bryant 0e883630ce umdns: suppress address-of-packed-member warning 4 years ago
  Hans Dedecker cd308d9be7 binutils: add ALTERNATIVES for strings (FS#3001) 4 years ago
  Magnus Kroken d95bed4c44 mbedtls: update to 2.16.6 4 years ago
  RISCi_ATOM 6a6ce6edbc kernel: bump 4.14 to 4.14.176 4 years ago
  Josef Schlehofer 9a1e9434ca mbedtls: update to version 2.16.5 4 years ago
  Eneas U de Queiroz 0457d941b2 openssl: bump to 1.1.1f 4 years ago
  RISCi_ATOM 091a6da9ac Fix README.md links 4 years ago
  RISCi_ATOM 46ffae4fa1 Fix image links in docs/* 4 years ago
  RISCi_ATOM 17850b986b Bump tor to 0.4.2.7 4 years ago
100 changed files with 2566 additions and 575 deletions
  1. 1 1
      Makefile
  2. 2 0
      docs/Supported_Hardware.md
  3. 45 0
      docs/TPE_R1300.md
  4. 43 0
      docs/TPE_R1400.md
  5. 16 0
      include/cmake.mk
  6. 1 1
      include/download.mk
  7. 2 0
      include/host-build.mk
  8. 3 2
      include/kernel-version.mk
  9. 3 3
      include/kernel.mk
  10. 2 0
      include/package.mk
  11. 36 11
      include/prereq-build.mk
  12. 4 4
      include/prereq.mk
  13. 0 23
      include/scons.mk
  14. 1 1
      include/target.mk
  15. 1 1
      include/version.mk
  16. 1 0
      package/base-files/files/etc/init.d/boot
  17. 50 0
      package/boot/arm-trusted-firmware-rockchip/Makefile
  18. 1 1
      package/boot/uboot-envtools/Makefile
  19. 1 0
      package/boot/uboot-envtools/files/ath79
  20. 5 1
      package/boot/uboot-envtools/files/mvebu
  21. 106 0
      package/boot/uboot-rockchip/Makefile
  22. 24 0
      package/boot/uboot-rockchip/patches/001-scripts-remove-dependency-on-swig.patch
  23. 32 0
      package/boot/uboot-rockchip/patches/002-spl-remove-dtoc-of-pdata-generation.patch
  24. 62 0
      package/boot/uboot-rockchip/patches/003-fixup-compatible-old-dtc.patch
  25. 530 0
      package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch
  26. 486 0
      package/boot/uboot-rockchip/patches/101-rockchip-rk3328-Add-support-for-ThinkPenguin-TPE-R1400.patch
  27. 149 0
      package/boot/uboot-rockchip/src/of-platdata/nanopi-r2s-rk3328/dt-platdata.c
  28. 72 0
      package/boot/uboot-rockchip/src/of-platdata/nanopi-r2s-rk3328/dt-structs-gen.h
  29. 149 0
      package/boot/uboot-rockchip/src/of-platdata/tpe-r1400-rk3328/dt-platdata.c
  30. 72 0
      package/boot/uboot-rockchip/src/of-platdata/tpe-r1400-rk3328/dt-structs-gen.h
  31. 23 0
      package/boot/uboot-sunxi/patches/001-yylloc-redefinition.patch
  32. 1 0
      package/devel/perf/Makefile
  33. 3 2
      package/firmware/wireless-regdb/Makefile
  34. 0 58
      package/firmware/wireless-regdb/patches/010-regdb-fix-compatibility-with-python2.patch
  35. 3 3
      package/kernel/mac80211/Makefile
  36. 1 1
      package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
  37. 2 2
      package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch
  38. 1 1
      package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
  39. 1 1
      package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch
  40. 2 2
      package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch
  41. 2 2
      package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch
  42. 2 2
      package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch
  43. 5 5
      package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch
  44. 7 7
      package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
  45. 2 2
      package/kernel/mac80211/patches/ath/544-ath9k-ar933x-usb-hang-workaround.patch
  46. 2 2
      package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch
  47. 1 1
      package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch
  48. 2 2
      package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
  49. 1 1
      package/kernel/mac80211/patches/ath/552-ahb_of.patch
  50. 10 10
      package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch
  51. 1 1
      package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch
  52. 1 1
      package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch
  53. 3 3
      package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch
  54. 1 1
      package/kernel/mac80211/patches/subsys/210-ap_scan.patch
  55. 5 5
      package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch
  56. 1 1
      package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch
  57. 6 6
      package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch
  58. 82 0
      package/kernel/mac80211/patches/subsys/305-mac80211-fix-tx-status-for-no-ack-cases.patch
  59. 5 5
      package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch
  60. 1 1
      package/kernel/mac80211/patches/subsys/316-mac80211-minstrel_ht-improve-rate-probing-for-device.patch
  61. 9 9
      package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch
  62. 3 3
      package/kernel/mac80211/patches/subsys/321-cfg80211-Add-airtime-statistics-and-settings.patch
  63. 16 16
      package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch
  64. 1 1
      package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch
  65. 17 17
      package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch
  66. 18 18
      package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch
  67. 5 5
      package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch
  68. 6 6
      package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch
  69. 6 6
      package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch
  70. 4 4
      package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch
  71. 1 1
      package/kernel/mac80211/patches/subsys/356-mac80211-set-NETIF_F_LLTX-when-using-intermediate-tx.patch
  72. 36 23
      package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch
  73. 3 3
      package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch
  74. 1 1
      package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch
  75. 3 3
      package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch
  76. 2 2
      package/kernel/mac80211/patches/subsys/361-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch
  77. 3 3
      package/kernel/mac80211/patches/subsys/362-mac80211-minstrel-remove-divisions-in-tx-status-path.patch
  78. 5 5
      package/kernel/mac80211/patches/subsys/363-mac80211-minstrel_ht-replace-rate-stats-ewma-with-a-.patch
  79. 3 3
      package/kernel/mac80211/patches/subsys/364-mac80211-minstrel_ht-rename-prob_ewma-to-prob_avg-us.patch
  80. 7 7
      package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch
  81. 1 1
      package/kernel/mac80211/patches/subsys/367-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch
  82. 1 1
      package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch
  83. 4 4
      package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch
  84. 54 0
      package/libs/libevdev/Makefile
  85. 14 0
      package/libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch
  86. 21 5
      package/libs/libgpg-error/Makefile
  87. 0 7
      package/libs/libgpg-error/patches/010-add-arc-support.patch
  88. 27 0
      package/libs/libgpg-error/patches/020-build-fix-generation.patch
  89. 0 158
      package/libs/libgpg-error/patches/020-gawk5-support.patch
  90. 1 1
      package/libs/libjson-c/Makefile
  91. 1 1
      package/libs/libjson-c/patches/000-libm.patch
  92. 32 0
      package/libs/libjson-c/patches/001-Prevent-division-by-zero-in-linkhash.patch
  93. 83 0
      package/libs/libjson-c/patches/002-Fix-integer-overflows.patch
  94. 2 3
      package/libs/libpcap/Makefile
  95. 0 60
      package/libs/libtirpc/Makefile
  96. 0 18
      package/libs/libtirpc/patches/001-musl.patch
  97. 3 3
      package/libs/libubox/Makefile
  98. 51 0
      package/libs/libudev-fbsd/Makefile
  99. 20 0
      package/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch
  100. 25 0
      package/libs/libudev-fbsd/patches/005-extern-c.patch

+ 1 - 1
Makefile

@@ -18,7 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the libreCMC di
 
 world:
 
-DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
+DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '/usr' | head -n 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(LIBRECMC_BUILD),1)

+ 2 - 0
docs/Supported_Hardware.md

@@ -25,6 +25,8 @@ method which is required for the initial install of libreCMC.
 * [TPE-NWIFIROUTER2](/TPE_NWIFIROUTER2.md)
 * [TPE-R1100](/TPE_R1100.md)
 * [TPE-R1200](/TPE_R1200.md)
+* [TPE-R1300](/TPE_R1300.md)
+* [TPE-R1400](/TPE_R1400.md)
 
 ### Qi-Hardware
 

+ 45 - 0
docs/TPE_R1300.md

@@ -0,0 +1,45 @@
+# Think Penguin [TPE-R1300 Wireless-N Mini VPN Router v3](https://thinkpenguin.com/gnu-linux/free-software-wireless-n-mini-vpn-router-v3-tpe-r1300)
+
+## Specs
+
+* SoC: Qualcomm QCA9531 SoC, 650MHz CPU
+* RAM: 128MB
+* Flash: 16MB NOR
+* NIC: 2 10/100 Mbps Ethernet Ports
+* USB: 1x 2.0 port
+* WiFi: Qualcomm 802.11b/g/n 2.4Ghz
+* Power: 5V 1A USB (power consumption < 2W)
+
+The TPE-R1300 is a general purpose mini WiFi router
+that can be used for a wide range of applications. 
+Some common uses include:
+
+* Route all traffic over a VPN when on the go.
+* WiFi to ethernet bridge.
+* A small web server.
+* IRC bouncer.
+* Meshnet node (CJDNS, Batman...).
+
+# Firmware Images
+
+See our [flavors](https://librecmc.org/flavors.html) page for a description of each type of libreCMC image.
+
+## Main
+
+[TPE-R1300 NOR](https://librecmc.org/librecmc/downloads/snapshots/current/main/targets/ath79/generic/librecmc-ath79-generic-thinkpenguin_tpe-r1300-squashfs-sysupgrade.bin)
+
+## Core
+
+[TPE-R1300 NOR](https://librecmc.org/librecmc/downloads/snapshots/current/core/targets/ath79/generic/librecmc-ath79-generic-thinkpenguin_tpe-r1300-squashfs-sysupgrade.bin)
+
+## Image File Signatures 
+
+[Main sha256sums](https://librecmc.org/librecmc/downloads/snapshots/current/main/targets/ath79/generic/sha256sums)
+
+[Main sha256sums.asc](https://librecmc.org/librecmc/downloads/snapshots/current/main/targets/ath79/generic/sha256sums.asc)
+
+
+[Core sha256sums](https://librecmc.org/librecmc/downloads/snapshots/current/core/targets/ath79/generic/sha256sums)
+
+[Core sha256sums.asc](https://librecmc.org/librecmc/downloads/snapshots/current/core/targets/ath79/generic/sha256sums.asc)
+

+ 43 - 0
docs/TPE_R1400.md

@@ -0,0 +1,43 @@
+# Think Penguin [TPE-R1400 Gigabit Mini VPN Router](https://thinkpenguin.com/gnu-linux/free-software-gigabit-mini-vpn-router-tpe-r1400)
+
+## Specs
+
+* CPU: Rockchip RK3328 Quad-core 64 bit Cortex-A53 (runs at up to 1.4Ghz)
+* RAM: 1GB
+* Micro-SD: up to 128GB
+* NIC: 2 10/100/1000 Mbps Ethernet Ports
+* USB: 1x 2.0 port
+* WiFi: N/A
+* Power: 5V 2A USB
+
+The TPE-R1400 is a general purpose mini Gigabit router
+that can be used for a wide range of applications. 
+Some common uses include:
+
+* Route all traffic over a VPN.
+* A small web server.
+* IRC bouncer.
+
+# Firmware Images
+
+See our [flavors](https://librecmc.org/flavors.html) page for a description of each type of libreCMC image.
+
+## Main
+
+[TPE-R1400](https://librecmc.org/librecmc/downloads/snapshots/current/main/targets/rockchip/armv8/librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-squashfs-sysupgrade.img.gz)
+
+## Core
+
+[TPE-R1400](https://librecmc.org/librecmc/downloads/snapshots/current/core/targets/rockchip/armv8/librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-squashfs-sysupgrade.img.gz)
+
+## Image File Signatures 
+
+[Main sha256sums](https://librecmc.org/librecmc/downloads/snapshots/current/main/targets/rockchip/armv8/sha256sums)
+
+[Main sha256sums.asc](https://librecmc.org/librecmc/downloads/snapshots/current/main/targets/rockchip/armv8/sha256sums.asc)
+
+
+[Core sha256sums](https://librecmc.org/librecmc/downloads/snapshots/current/core/targets/rockchip/armv8/sha256sums)
+
+[Core sha256sums.asc](https://librecmc.org/librecmc/downloads/snapshots/current/core/targets/rockchip/armv8/sha256sums.asc)
+

+ 16 - 0
include/cmake.mk

@@ -22,12 +22,22 @@ ifeq ($(CONFIG_CCACHE),)
  CMAKE_CXX_COMPILER:=$(call cmake_tool,$(TARGET_CXX))
  CMAKE_C_COMPILER_ARG1:=
  CMAKE_CXX_COMPILER_ARG1:=
+
+ CMAKE_HOST_C_COMPILER:=$(HOSTCC)
+ CMAKE_HOST_CXX_COMPILER:=$(HOSTCXX)
+ CMAKE_HOST_C_COMPILER_ARG1:=
+ CMAKE_HOST_CXX_COMPILER_ARG1:=
 else
   CCACHE:=$(STAGING_DIR_HOST)/bin/ccache
   CMAKE_C_COMPILER:=$(CCACHE)
   CMAKE_C_COMPILER_ARG1:=$(TARGET_CC_NOCACHE)
   CMAKE_CXX_COMPILER:=$(CCACHE)
   CMAKE_CXX_COMPILER_ARG1:=$(TARGET_CXX_NOCACHE)
+
+  CMAKE_HOST_C_COMPILER:=$(CCACHE)
+  CMAKE_HOST_C_COMPILER_ARG1:=$(HOSTCC_NOCACHE)
+  CMAKE_HOST_CXX_COMPILER:=$(CCACHE)
+  CMAKE_HOST_CXX_COMPILER_ARG1:=$(HOSTCXX_NOCACHE)
 endif
 CMAKE_AR:=$(call cmake_tool,$(TARGET_AR))
 CMAKE_NM:=$(call cmake_tool,$(TARGET_NM))
@@ -90,6 +100,12 @@ define Host/Configure/Default
 		LDFLAGS="$(HOST_LDFLAGS)" \
 		cmake \
 			-DCMAKE_BUILD_TYPE=Release \
+			-DCMAKE_C_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
+			-DCMAKE_C_COMPILER_ARG1="$(CMAKE_HOST_C_COMPILER_ARG1)" \
+			-DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" \
+			-DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_HOST_CXX_COMPILER_ARG1)" \
+			-DCMAKE_ASM_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
+			-DCMAKE_ASM_COMPILER_ARG1="$(CMAKE_HOST_C_COMPILER_ARG1)" \
 			-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
 			-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
 			-DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \

+ 1 - 1
include/download.mk

@@ -28,7 +28,7 @@ define dl_method
 $(strip \
   $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
     $(if $(2),$(2), \
-      $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL_LIBRE/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
+      $(if $(filter @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL_LIBRE/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
         $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
           $(if $(filter svn://%,$(1)),svn, \
             $(if $(filter cvs://%,$(1)),cvs, \

+ 2 - 0
include/host-build.mk

@@ -184,6 +184,8 @@ ifndef DUMP
     clean-build: host-clean-build
   endif
 
+  $(DL_DIR)/$(FILE): FORCE
+
   $(_host_target)host-prepare: $(HOST_STAMP_PREPARED)
   $(_host_target)host-configure: $(HOST_STAMP_CONFIGURED)
   $(_host_target)host-compile: $(HOST_STAMP_BUILT) $(HOST_STAMP_INSTALLED)

+ 3 - 2
include/kernel-version.mk

@@ -6,9 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-4.14 = .173
+LINUX_VERSION-4.14 = .334
+LIBRE_REV = 1
 
-LINUX_KERNEL_HASH-4.14.173 = 615f3a798d99b2e986627f0c5618bee8dfd61e7f645bcc3bb90cfaf953d9cb26
+LINUX_KERNEL_HASH-4.14.334 = 8665c68f0496165783d3c1e4176ad42838ba194de0ae25d548bcf9379b250177
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

+ 3 - 3
include/kernel.mk

@@ -60,15 +60,15 @@ else
   LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux
 
   ifneq (,$(findstring -rc,$(LINUX_VERSION)))
-      LINUX_SOURCE:=linux-libre-$(LINUX_VERSION)-gnu.tar.gz
+      LINUX_SOURCE:=linux-libre-$(LINUX_VERSION)-gnu$(LIBRE_REV).tar.gz
   else
-      LINUX_SOURCE:=linux-libre-$(LINUX_VERSION)-gnu.tar.xz
+      LINUX_SOURCE:=linux-libre-$(LINUX_VERSION)-gnu$(LIBRE_REV).tar.xz
   endif
 
   ifneq (,$(findstring -rc,$(LINUX_VERSION)))
       LINUX_SITE:=
   else ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
-      LINUX_SITE:=@KERNEL_LIBRE/$(LINUX_VERSION)-gnu$(TESTING)
+      LINUX_SITE:=@KERNEL_LIBRE/$(LINUX_VERSION)-gnu$(LIBRE_REV)$(TESTING)
   else
       LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
   endif

+ 2 - 0
include/package.mk

@@ -185,6 +185,8 @@ define Build/CoreTargets
   $(call Build/Autoclean)
   $(call DefaultTargets)
 
+  $(DL_DIR)/$(FILE): FORCE
+
   download:
 	$(foreach hook,$(Hooks/Download),
 		$(call $(hook))$(sep)

+ 36 - 11
include/prereq-build.mk

@@ -28,8 +28,8 @@ $(eval $(call TestHostCommand,proper-umask, \
 
 $(eval $(call SetupHostCommand,gcc, \
 	Please install the GNU C Compiler (gcc) 4.8 or later, \
-	$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
-	gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
+	$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
+	gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
 	gcc --version | grep -E 'Apple.(LLVM|clang)' ))
 
 $(eval $(call TestHostCommand,working-gcc, \
@@ -40,8 +40,8 @@ $(eval $(call TestHostCommand,working-gcc, \
 
 $(eval $(call SetupHostCommand,g++, \
 	Please install the GNU C++ Compiler (g++) 4.8 or later, \
-	$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
-	g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
+	$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
+	g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
 	g++ --version | grep -E 'Apple.(LLVM|clang)' ))
 
 $(eval $(call TestHostCommand,working-g++, \
@@ -62,11 +62,26 @@ else
   zlib_link_flags := -lz
 endif
 
+$(eval $(call TestHostCommand,perl-data-dumper, \
+	Please install the Perl Data::Dumper module, \
+	perl -MData::Dumper -e 1))
+
+$(eval $(call TestHostCommand,perl-findbin, \
+	Please install the Perl FindBin module, \
+	perl -MFindBin -e 1))
+
+$(eval $(call TestHostCommand,perl-file-copy, \
+	Please install the Perl File::Copy module, \
+	perl -MFile::Copy -e 1))
+
+$(eval $(call TestHostCommand,perl-file-compare, \
+	Please install the Perl File::Compare module, \
+	perl -MFile::Compare -e 1))
+
 $(eval $(call TestHostCommand,perl-thread-queue, \
 	Please install the Perl Thread::Queue module, \
 	perl -MThread::Queue -e 1))
 
-
 $(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
 	gtar --version 2>&1 | grep GNU, \
 	gnutar --version 2>&1 | grep GNU, \
@@ -127,12 +142,22 @@ $(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 CleanupPython2))
+
+$(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \
+	python3.12 -V 2>&1 | grep 'Python 3', \
+	python3.11 -V 2>&1 | grep 'Python 3', \
+	python3.10 -V 2>&1 | grep 'Python 3', \
+	python3.9 -V 2>&1 | grep 'Python 3', \
+	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]|10)\.?'))
 
-$(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 TestHostCommand,python3-jsmin, \
+        Please install the jsmin Python module, \
+        python3 -c "import jsmin" 2>&1 ))
 
 $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
 	git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))
@@ -142,7 +167,7 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
 
 $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
 	mkdir -p $(dir $@)
-	$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
+	$(CC) -I$(TOPDIR)/tools/include -o $@ $<
 
 prereq: $(STAGING_DIR_HOST)/bin/mkhash
 

+ 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/target.mk

@@ -13,7 +13,7 @@ __target_inc=1
 DEVICE_TYPE?=router
 
 # Default packages - the really basic set
-DEFAULT_PACKAGES:=base-files ca-bundle libmbedtls libustream-mbedtls libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd
+DEFAULT_PACKAGES:=base-files ca-bundle libc libgcc libustream-wolfssl busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd
 # For nas targets
 DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
 # For router targets

+ 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.15)
 
 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
 VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))

+ 1 - 0
package/base-files/files/etc/init.d/boot

@@ -45,6 +45,7 @@ boot() {
 
 	/bin/config_generate
 	uci_apply_defaults
+	sync
 	
 	# temporary hack until configd exists
 	/sbin/reload_config

+ 50 - 0
package/boot/arm-trusted-firmware-rockchip/Makefile

@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2017 Hauke Mehrtens
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=arm-trusted-firmware-rockchip
+PKG_RELEASE:=1
+PKG_VERSION:=2021-10-13-fa1e0167
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-libre.tar.xz
+PKG_SOURCE_URL:=https://librecmc.org/librecmc/downloads/sources/v1.5
+PKG_HASH:=4292d29265218893b7f26c005fbb44361a667e8916ce2d940dc19617d017f8d0
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=license.md
+
+PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
+
+include $(INCLUDE_DIR)/package.mk
+
+
+define Package/arm-trusted-firmware-rockchip
+    SECTION:=boot
+    CATEGORY:=Boot Loaders
+    TITLE:=ARM Trusted Firmware for Rockchip
+    DEPENDS:=@TARGET_rockchip_armv8
+endef
+
+export GCC_HONOUR_COPTS=s
+
+MAKE_VARS = \
+	CROSS_COMPILE="$(TARGET_CROSS)"
+
+MAKE_FLAGS += \
+	PLAT=rk3328 \
+	bl31
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+	$(CP) $(PKG_BUILD_DIR)/build/rk3328/release/bl31/bl31.elf $(STAGING_DIR_IMAGE)/rk3328_bl31.elf
+endef
+
+define Package/arm-trusted-firmware-rockchip/install
+endef
+
+$(eval $(call BuildPackage,arm-trusted-firmware-rockchip))

+ 1 - 1
package/boot/uboot-envtools/Makefile

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
 PKG_VERSION:=2018.03
-PKG_RELEASE:=3
+PKG_RELEASE:=3.1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz

+ 1 - 0
package/boot/uboot-envtools/files/ath79

@@ -23,6 +23,7 @@ glinet,gl-ar300m-nor|\
 thinkpenguin,tpe-r1100|\
 thinkpenguin,tpe-r1200-nor|\
 thinkpenguin,tpe-r1200-nand|\
+thinkpenguin,tpe-r1300|\
 librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\

+ 5 - 1
package/boot/uboot-envtools/files/mvebu

@@ -15,7 +15,11 @@ board=$(board_name)
 
 case "$board" in
 cznic,turris-omnia)
-	ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
+	if grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
+		ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000"
+	else
+		ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"
+	fi
 	;;
 globalscale,espressobin|\
 globalscale,espressobin-emmc|\

+ 106 - 0
package/boot/uboot-rockchip/Makefile

@@ -0,0 +1,106 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_VERSION:=2020.07
+PKG_RELEASE:=3
+
+PKG_HASH:=c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a
+
+PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
+
+include $(INCLUDE_DIR)/u-boot.mk
+include $(INCLUDE_DIR)/package.mk
+
+define U-Boot/Default
+  BUILD_TARGET:=rockchip
+  UENV:=default
+  HIDDEN:=1
+endef
+
+
+# RK3328 boards
+
+define U-Boot/nanopi-r2s-rk3328
+  BUILD_SUBTARGET:=armv8
+  NAME:=NanoPi R2S
+  BUILD_DEVICES:= \
+    friendlyarm_nanopi-r2s
+  DEPENDS:=+PACKAGE_u-boot-nanopi-r2s-rk3328:arm-trusted-firmware-rockchip
+  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+  ATF:=rk3328_bl31.elf
+  OF_PLATDATA:=$(1)
+endef
+
+define U-Boot/tpe-r1400-rk3328
+  BUILD_SUBTARGET:=armv8
+  NAME:=TPE-R1400
+  BUILD_DEVICES:= \
+    thinkpenguin_tpe-r1400
+  DEPENDS:=+PACKAGE_u-boot-tpe-r1400-rk3328:arm-trusted-firmware-rockchip
+  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+  ATF:=rk3328_bl31.elf
+  OF_PLATDATA:=$(1)
+endef
+
+# RK3399 boards
+
+define U-Boot/rock-pi-4-rk3399
+  BUILD_SUBTARGET:=armv8
+  NAME:=Rock Pi 4
+  BUILD_DEVICES:= \
+    radxa_rock-pi-4
+  DEPENDS:=+PACKAGE_u-boot-rock-pi-4-rk3399:arm-trusted-firmware-rockchip
+  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+  ATF:=rk3399_bl31.elf
+endef
+
+define U-Boot/rockpro64-rk3399
+  BUILD_SUBTARGET:=armv8
+  NAME:=RockPro64
+  BUILD_DEVICES:= \
+    pine64_rockpro64
+  DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:arm-trusted-firmware-rockchip
+  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+  ATF:=rk3399_bl31.elf
+endef
+
+UBOOT_TARGETS := \
+  rock-pi-4-rk3399 \
+  rockpro64-rk3399 \
+  nanopi-r2s-rk3328 \
+  tpe-r1400-rk3328
+
+UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
+
+UBOOT_MAKE_FLAGS += \
+  BL31=$(STAGING_DIR_IMAGE)/$(ATF)
+
+define Build/Configure
+	$(call Build/Configure/U-Boot)
+
+ifneq ($(OF_PLATDATA),)
+	mkdir -p $(PKG_BUILD_DIR)/tpl/dts
+	mkdir -p $(PKG_BUILD_DIR)/include/generated
+
+	$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-platdata.c $(PKG_BUILD_DIR)/tpl/dts/dt-platdata.c
+	$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-structs-gen.h $(PKG_BUILD_DIR)/include/generated/dt-structs-gen.h
+endif
+
+	$(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config
+	echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+	$(CP) $(PKG_BUILD_DIR)/idbloader.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-idbloader.img
+	$(CP) $(PKG_BUILD_DIR)/u-boot.itb $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.itb
+endef
+
+define Package/u-boot/install/default
+endef
+
+$(eval $(call BuildPackage/U-Boot))

+ 24 - 0
package/boot/uboot-rockchip/patches/001-scripts-remove-dependency-on-swig.patch

@@ -0,0 +1,24 @@
+From b137ca16b54c67d76714ea5a0138741959b0dc29 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Mon, 13 Jul 2020 23:37:37 +0200
+Subject: [PATCH] scripts: remove dependency on swig
+
+Don't build the libfdt tool, as it has a dependency on swig (which
+OpenWrt does not ship).
+
+This requires more hacks, as of-platdata generation does not work
+without it.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ scripts/dtc/Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/scripts/dtc/Makefile
++++ b/scripts/dtc/Makefile
+@@ -18,5 +18,3 @@ HOSTCFLAGS_dtc-parser.tab.o := -I$(src)
+ # dependencies on generated files need to be listed explicitly
+ $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
+ 
+-# Added for U-Boot
+-subdir-$(CONFIG_PYLIBFDT) += pylibfdt

+ 32 - 0
package/boot/uboot-rockchip/patches/002-spl-remove-dtoc-of-pdata-generation.patch

@@ -0,0 +1,32 @@
+From 55273cf6079ddd3b006da69f0113c2c66c03f17e Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Tue, 14 Jul 2020 22:44:22 +0200
+Subject: [PATCH] spl: remove dtoc of-pdata generation
+
+Remove the dtoc of-pdata generation. This generation is dependant on
+libpython-dev. As OpenWrt does not ship with this dependency, use
+pre-generated pdata files and remove the generation from the
+build-process.
+
+This only affects RK3328 boards.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ scripts/Makefile.spl | 6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/scripts/Makefile.spl
++++ b/scripts/Makefile.spl
+@@ -320,12 +320,6 @@ PHONY += dts_dir
+ dts_dir:
+ 	$(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts)
+ 
+-include/generated/dt-structs-gen.h: $(obj)/$(SPL_BIN).dtb dts_dir FORCE
+-	$(call if_changed,dtoch)
+-
+-$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir FORCE
+-	$(call if_changed,dtocc)
+-
+ ifdef CONFIG_SAMSUNG
+ ifdef CONFIG_VAR_SIZE_SPL
+ VAR_SIZE_PARAM = --vs

+ 62 - 0
package/boot/uboot-rockchip/patches/003-fixup-compatible-old-dtc.patch

@@ -0,0 +1,62 @@
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -175,6 +175,11 @@ ld-version = $(shell $(LD) --version | $
+ # Usage:  $(call ld-ifversion, -ge, 22252, y)
+ ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
+ 
++# dtc-option
++# Usage:  DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
++dtc-option = $(call try-run,\
++	echo '/dts-v1/; / {};' | $(DTC) $(1),$(1),$(2))
++
+ ######
+ 
+ ###
+--- a/scripts/Makefile.extrawarn
++++ b/scripts/Makefile.extrawarn
+@@ -55,5 +55,4 @@ ifeq ("$(strip $(warning))","")
+ endif
+ 
+ KBUILD_CFLAGS += $(warning)
+-
+ endif
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -271,24 +271,24 @@ cmd_gzip = (cat $(filter-out FORCE,$^) |
+ 
+ # Disable noisy checks by default
+ ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+-DTC_FLAGS += -Wno-unit_address_vs_reg \
+-	-Wno-unit_address_format \
+-	-Wno-avoid_unnecessary_addr_size \
+-	-Wno-alias_paths \
+-	-Wno-graph_child_address \
+-	-Wno-graph_port \
+-	-Wno-unique_unit_address \
+-	-Wno-simple_bus_reg \
+-	-Wno-pci_device_reg
++DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg) \
++	$(call dtc-option,-Wno-unit_address_format) \
++	$(call dtc-option,-Wno-avoid_unnecessary_addr_size) \
++	$(call dtc-option,-Wno-alias_paths) \
++	$(call dtc-option,-Wno-graph_child_address) \
++	$(call dtc-option,-Wno-graph_port) \
++	$(call dtc-option,-Wno-unique_unit_address) \
++	$(call dtc-option,-Wno-simple_bus_reg) \
++	$(call dtc-option,-Wno-pci_device_reg)
+ 
+ # U-Boot specific disables
+-DTC_FLAGS += -Wno-pci_bridge \
+-        -Wno-pci_device_bus_num
++DTC_FLAGS += $(call dtc-option,-Wno-pci_bridge) \
++	$(call dtc-option,-Wno-pci_device_bus_num)
+ endif
+ 
+ ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+-DTC_FLAGS += -Wnode_name_chars_strict \
+-	-Wproperty_name_chars_strict
++DTC_FLAGS += $(call dtc-option,-Wnode_name_chars_strict) \
++	$(call dtc-option,-Wproperty_name_chars_strict)
+ endif
+ 
+ DTC_FLAGS += $(DTC_FLAGS_$(basetarget))

+ 530 - 0
package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch

@@ -0,0 +1,530 @@
+From 67f4c228c2bf515386cd54073104dc2e6eae85ea Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Fri, 10 Jul 2020 14:58:30 +0200
+Subject: [PATCH] rockchip: rk3328: Add support for FriendlyARM NanoPi R2S
+
+This adds support for the NanoPi R2S from FriendlyArm.
+
+Rockchip RK3328 SoC
+1GB DDR4 RAM
+Gigabit Ethernet (WAN)
+Gigabit Ethernet (USB3) (LAN)
+USB 2.0 Host Port
+MicroSD slot
+Reset button
+WAN - LAN - SYS LED
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ arch/arm/dts/Makefile                      |   1 +
+ arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |  34 +++
+ arch/arm/dts/rk3328-nanopi-r2s.dts         | 334 +++++++++++++++++++++
+ board/rockchip/evb_rk3328/MAINTAINERS      |   7 +
+ configs/nanopi-r2s-rk3328_defconfig        |  99 ++++++
+ 5 files changed, 475 insertions(+)
+ create mode 100644 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
+ create mode 100644 arch/arm/dts/rk3328-nanopi-r2s.dts
+ create mode 100644 configs/nanopi-r2s-rk3328_defconfig
+
+--- a/arch/arm/dts/Makefile
++++ b/arch/arm/dts/Makefile
+@@ -106,6 +106,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
+ 
+ dtb-$(CONFIG_ROCKCHIP_RK3328) += \
+ 	rk3328-evb.dtb \
++	rk3328-nanopi-r2s.dtb \
+ 	rk3328-roc-cc.dtb \
+ 	rk3328-rock64.dtb \
+ 	rk3328-rock-pi-e.dtb
+--- /dev/null
++++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
+@@ -0,0 +1,34 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
++ * (C) Copyright 2020 David Bauer
++ */
++
++#include "rk3328-u-boot.dtsi"
++#include "rk3328-sdram-ddr4-666.dtsi"
++/ {
++	chosen {
++		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
++	};
++};
++
++&gpio0 {
++	u-boot,dm-spl;
++};
++
++&pinctrl {
++	u-boot,dm-spl;
++};
++
++&sdmmc0m1_gpio {
++	u-boot,dm-spl;
++};
++
++&pcfg_pull_up_4ma {
++	u-boot,dm-spl;
++};
++
++/* Need this and all the pinctrl/gpio stuff above to set pinmux */
++&vcc_sd {
++	u-boot,dm-spl;
++};
+--- /dev/null
++++ b/arch/arm/dts/rk3328-nanopi-r2s.dts
+@@ -0,0 +1,334 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Copyright (c) 2020 David Bauer <mail@david-bauer.net>
++ */
++
++/dts-v1/;
++
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/gpio/gpio.h>
++#include "rk3328.dtsi"
++
++/ {
++	model = "FriendlyARM NanoPi R2S";
++	compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
++
++	chosen {
++		stdout-path = "serial2:1500000n8";
++	};
++
++	gmac_clkin: external-gmac-clock {
++		compatible = "fixed-clock";
++		clock-frequency = <125000000>;
++		clock-output-names = "gmac_clkin";
++		#clock-cells = <0>;
++	};
++
++	vcc_sd: sdmmc-regulator {
++		compatible = "regulator-fixed";
++		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&sdmmc0m1_gpio>;
++		regulator-name = "vcc_sd";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc_io>;
++	};
++
++	vcc_sdio: sdmmcio-regulator {
++		compatible = "regulator-gpio";
++		gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
++		enable-active-high;
++		states = <1800000 0x1
++			  3300000 0x0>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&sdio_vcc_pin>;
++		regulator-always-on;
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <3300000>;
++		regulator-name = "vcc_sdio";
++		regulator-settling-time-us = <5000>;
++		regulator-type = "voltage";
++		vin-supply = <&vcc_io>;
++	};
++
++	vcc_sys: vcc-sys {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_sys";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins>;
++
++		sys {
++			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
++			label = "nanopi-r2s:red:sys";
++		};
++
++		lan {
++			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
++			label = "nanopi-r2s:green:lan";
++		};
++
++		wan {
++			gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
++			label = "nanopi-r2s:green:wan";
++		};
++	};
++
++	gpio_keys {
++		compatible = "gpio-keys-polled";
++		poll-interval = <100>;
++
++		pinctrl-names = "default";
++		pinctrl-0 = <&button_pins>;
++
++		reset {
++			label = "Reset Button";
++			gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
++			linux,code = <KEY_RESTART>;
++			debounce-interval = <50>;
++		};
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu1 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu2 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu3 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&gmac2io {
++	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
++	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
++	clock_in_out = "input";
++	phy-supply = <&vcc_io>;
++	phy-handle = <&rtl8211e>;
++	phy-mode = "rgmii";
++	pinctrl-names = "default";
++	pinctrl-0 = <&rgmiim1_pins>;
++	snps,aal;
++	snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
++	snps,reset-active-low;
++	snps,reset-delays-us = <0 10000 50000>;
++	tx_delay = <0x24>;
++	rx_delay = <0x18>;
++	status = "okay";
++
++	mdio {
++		compatible = "snps,dwmac-mdio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		rtl8211e: ethernet-phy@0 {
++			reg = <0>;
++		};
++	};
++};
++
++&i2c1 {
++	status = "okay";
++
++	rk805: rk805@18 {
++		compatible = "rockchip,rk805";
++		reg = <0x18>;
++		interrupt-parent = <&gpio2>;
++		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
++		#clock-cells = <1>;
++		clock-output-names = "xin32k", "rk805-clkout2";
++		gpio-controller;
++		#gpio-cells = <2>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&pmic_int_l>;
++		rockchip,system-power-controller;
++		wakeup-source;
++
++		vcc1-supply = <&vcc_sys>;
++		vcc2-supply = <&vcc_sys>;
++		vcc3-supply = <&vcc_sys>;
++		vcc4-supply = <&vcc_sys>;
++		vcc5-supply = <&vcc_io>;
++		vcc6-supply = <&vcc_sys>;
++
++		regulators {
++			vdd_logic: DCDC_REG1 {
++				regulator-name = "vdd_logic";
++				regulator-min-microvolt = <712500>;
++				regulator-max-microvolt = <1450000>;
++				regulator-ramp-delay = <12500>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1000000>;
++				};
++			};
++
++			vdd_arm: DCDC_REG2 {
++				regulator-name = "vdd_arm";
++				regulator-min-microvolt = <712500>;
++				regulator-max-microvolt = <1450000>;
++				regulator-ramp-delay = <12500>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <950000>;
++				};
++			};
++
++			vcc_ddr: DCDC_REG3 {
++				regulator-name = "vcc_ddr";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++				};
++			};
++
++			vcc_io: DCDC_REG4 {
++				regulator-name = "vcc_io";
++				regulator-min-microvolt = <3300000>;
++				regulator-max-microvolt = <3300000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <3300000>;
++				};
++			};
++
++			vcc_18: LDO_REG1 {
++				regulator-name = "vcc_18";
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1800000>;
++				};
++			};
++
++			vcc18_emmc: LDO_REG2 {
++				regulator-name = "vcc18_emmc";
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1800000>;
++				};
++			};
++
++			vdd_10: LDO_REG3 {
++				regulator-name = "vdd_10";
++				regulator-min-microvolt = <1000000>;
++				regulator-max-microvolt = <1000000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1000000>;
++				};
++			};
++		};
++	};
++};
++
++&io_domains {
++	status = "okay";
++
++	vccio1-supply = <&vcc_io>;
++	vccio2-supply = <&vcc18_emmc>;
++	vccio3-supply = <&vcc_sdio>;
++	vccio4-supply = <&vcc_18>;
++	vccio5-supply = <&vcc_io>;
++	vccio6-supply = <&vcc_io>;
++	pmuio-supply = <&vcc_io>;
++};
++
++&pinctrl {
++	leds {
++		led_pins: led-pins {
++			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>,
++							<2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
++							<2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	button {
++		button_pins: button-pins {
++			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	pmic {
++		pmic_int_l: pmic-int-l {
++			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++
++	sd {
++		sdio_vcc_pin: sdio-vcc-pin {
++			rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++};
++
++&sdmmc {
++	bus-width = <4>;
++	cap-mmc-highspeed;
++	cap-sd-highspeed;
++	disable-wp;
++	max-frequency = <150000000>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
++	vmmc-supply = <&vcc_sd>;
++	vqmmc-supply = <&vcc_sdio>;
++	status = "okay";
++};
++
++&tsadc {
++	rockchip,hw-tshut-mode = <0>;
++	rockchip,hw-tshut-polarity = <0>;
++	status = "okay";
++};
++
++&uart2 {
++	status = "okay";
++};
++
++&u2phy {
++	status = "okay";
++
++	u2phy_host: host-port {
++		status = "okay";
++	};
++};
++
++&usb_host0_ehci {
++	status = "okay";
++};
++
++&usb_host0_ohci {
++	status = "okay";
++};
+--- a/board/rockchip/evb_rk3328/MAINTAINERS
++++ b/board/rockchip/evb_rk3328/MAINTAINERS
+@@ -5,6 +5,13 @@ F:      board/rockchip/evb_rk3328
+ F:      include/configs/evb_rk3328.h
+ F:      configs/evb-rk3328_defconfig
+ 
++NANOPI-R2S-RK3328
++M:      David Bauer <mail@david-bauer.net>
++S:      Maintained
++F:      configs/nanopi-r2s-rk3328_defconfig
++F:      arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
++F:      arch/arm/dts/rk3328-nanopi-r2s.dts
++
+ ROC-RK3328-CC
+ M:      Loic Devulder <ldevulder@suse.com>
+ M:      Chen-Yu Tsai <wens@csie.org>
+--- /dev/null
++++ b/configs/nanopi-r2s-rk3328_defconfig
+@@ -0,0 +1,99 @@
++CONFIG_ARM=y
++CONFIG_ARCH_ROCKCHIP=y
++CONFIG_SYS_TEXT_BASE=0x00200000
++CONFIG_SPL_GPIO_SUPPORT=y
++CONFIG_ENV_OFFSET=0x3F8000
++CONFIG_ROCKCHIP_RK3328=y
++CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
++CONFIG_TPL_LIBCOMMON_SUPPORT=y
++CONFIG_TPL_LIBGENERIC_SUPPORT=y
++CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
++CONFIG_SPL_STACK_R_ADDR=0x600000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_DEBUG_UART_BASE=0xFF130000
++CONFIG_DEBUG_UART_CLOCK=24000000
++CONFIG_SMBIOS_PRODUCT_NAME="nanopi_r2s_rk3328"
++CONFIG_DEBUG_UART=y
++CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
++# CONFIG_ANDROID_BOOT_IMAGE is not set
++CONFIG_FIT=y
++CONFIG_FIT_VERBOSE=y
++CONFIG_SPL_LOAD_FIT=y
++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2s.dtb"
++CONFIG_MISC_INIT_R=y
++# CONFIG_DISPLAY_CPUINFO is not set
++CONFIG_DISPLAY_BOARDINFO_LATE=y
++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
++CONFIG_TPL_SYS_MALLOC_SIMPLE=y
++CONFIG_SPL_STACK_R=y
++CONFIG_SPL_I2C_SUPPORT=y
++CONFIG_SPL_POWER_SUPPORT=y
++CONFIG_SPL_ATF=y
++CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
++CONFIG_CMD_BOOTZ=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_MMC=y
++CONFIG_CMD_USB=y
++# CONFIG_CMD_SETEXPR is not set
++CONFIG_CMD_TIME=y
++CONFIG_SPL_OF_CONTROL=y
++CONFIG_TPL_OF_CONTROL=y
++CONFIG_DEFAULT_DEVICE_TREE="rk3328-nanopi-r2s"
++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
++CONFIG_TPL_OF_PLATDATA=y
++CONFIG_ENV_IS_IN_MMC=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_TPL_DM=y
++CONFIG_REGMAP=y
++CONFIG_SPL_REGMAP=y
++CONFIG_TPL_REGMAP=y
++CONFIG_SYSCON=y
++CONFIG_SPL_SYSCON=y
++CONFIG_TPL_SYSCON=y
++CONFIG_CLK=y
++CONFIG_SPL_CLK=y
++CONFIG_FASTBOOT_BUF_ADDR=0x800800
++CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
++CONFIG_ROCKCHIP_GPIO=y
++CONFIG_SYS_I2C_ROCKCHIP=y
++CONFIG_MMC_DW=y
++CONFIG_MMC_DW_ROCKCHIP=y
++CONFIG_SF_DEFAULT_SPEED=20000000
++CONFIG_DM_ETH=y
++CONFIG_ETH_DESIGNWARE=y
++CONFIG_GMAC_ROCKCHIP=y
++CONFIG_PINCTRL=y
++CONFIG_SPL_PINCTRL=y
++CONFIG_DM_PMIC=y
++CONFIG_PMIC_RK8XX=y
++CONFIG_SPL_DM_REGULATOR=y
++CONFIG_REGULATOR_PWM=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_SPL_DM_REGULATOR_FIXED=y
++CONFIG_REGULATOR_RK8XX=y
++CONFIG_PWM_ROCKCHIP=y
++CONFIG_RAM=y
++CONFIG_SPL_RAM=y
++CONFIG_TPL_RAM=y
++CONFIG_DM_RESET=y
++CONFIG_BAUDRATE=1500000
++CONFIG_DEBUG_UART_SHIFT=2
++CONFIG_SYSRESET=y
++# CONFIG_TPL_SYSRESET is not set
++CONFIG_USB=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_XHCI_DWC3=y
++CONFIG_USB_EHCI_HCD=y
++CONFIG_USB_EHCI_GENERIC=y
++CONFIG_USB_OHCI_HCD=y
++CONFIG_USB_OHCI_GENERIC=y
++CONFIG_USB_DWC2=y
++CONFIG_USB_DWC3=y
++# CONFIG_USB_DWC3_GADGET is not set
++CONFIG_USB_GADGET=y
++CONFIG_USB_GADGET_DWC2_OTG=y
++CONFIG_SPL_TINY_MEMSET=y
++CONFIG_TPL_TINY_MEMSET=y
++CONFIG_ERRNO_STR=y
++CONFIG_SMBIOS_MANUFACTURER="pine64"

+ 486 - 0
package/boot/uboot-rockchip/patches/101-rockchip-rk3328-Add-support-for-ThinkPenguin-TPE-R1400.patch

@@ -0,0 +1,486 @@
+--- a/arch/arm/dts/Makefile
++++ b/arch/arm/dts/Makefile
+@@ -107,6 +107,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
+ dtb-$(CONFIG_ROCKCHIP_RK3328) += \
+ 	rk3328-evb.dtb \
+ 	rk3328-nanopi-r2s.dtb \
++	rk3328-tpe-r1400.dtb \
+ 	rk3328-roc-cc.dtb \
+ 	rk3328-rock64.dtb \
+ 	rk3328-rock-pi-e.dtb
+--- /dev/null
++++ b/arch/arm/dts/rk3328-tpe-r1400-u-boot.dtsi
+@@ -0,0 +1,34 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
++ * (C) Copyright 2020 David Bauer
++ */
++
++#include "rk3328-u-boot.dtsi"
++#include "rk3328-sdram-ddr4-666.dtsi"
++/ {
++	chosen {
++		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
++	};
++};
++
++&gpio0 {
++	u-boot,dm-spl;
++};
++
++&pinctrl {
++	u-boot,dm-spl;
++};
++
++&sdmmc0m1_gpio {
++	u-boot,dm-spl;
++};
++
++&pcfg_pull_up_4ma {
++	u-boot,dm-spl;
++};
++
++/* Need this and all the pinctrl/gpio stuff above to set pinmux */
++&vcc_sd {
++	u-boot,dm-spl;
++};
+--- /dev/null
++++ b/arch/arm/dts/rk3328-tpe-r1400.dts
+@@ -0,0 +1,334 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Copyright (c) 2020 David Bauer <mail@david-bauer.net>
++ */
++
++/dts-v1/;
++
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/gpio/gpio.h>
++#include "rk3328.dtsi"
++
++/ {
++	model = "ThinkPenguin TPE-R1400";
++	compatible = "thinkpenguin,tpe-r1400", "rockchip,rk3328";
++
++	chosen {
++		stdout-path = "serial2:1500000n8";
++	};
++
++	gmac_clkin: external-gmac-clock {
++		compatible = "fixed-clock";
++		clock-frequency = <125000000>;
++		clock-output-names = "gmac_clkin";
++		#clock-cells = <0>;
++	};
++
++	vcc_sd: sdmmc-regulator {
++		compatible = "regulator-fixed";
++		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&sdmmc0m1_gpio>;
++		regulator-name = "vcc_sd";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc_io>;
++	};
++
++	vcc_sdio: sdmmcio-regulator {
++		compatible = "regulator-gpio";
++		gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
++		enable-active-high;
++		states = <1800000 0x1
++			  3300000 0x0>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&sdio_vcc_pin>;
++		regulator-always-on;
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <3300000>;
++		regulator-name = "vcc_sdio";
++		regulator-settling-time-us = <5000>;
++		regulator-type = "voltage";
++		vin-supply = <&vcc_io>;
++	};
++
++	vcc_sys: vcc-sys {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_sys";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins>;
++
++		sys {
++			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
++			label = "tpe-r1400:red:sys";
++		};
++
++		lan {
++			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
++			label = "tpe-r1400:green:lan";
++		};
++
++		wan {
++			gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
++			label = "tpe-r1400:green:wan";
++		};
++	};
++
++	gpio_keys {
++		compatible = "gpio-keys-polled";
++		poll-interval = <100>;
++
++		pinctrl-names = "default";
++		pinctrl-0 = <&button_pins>;
++
++		reset {
++			label = "Reset Button";
++			gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
++			linux,code = <KEY_RESTART>;
++			debounce-interval = <50>;
++		};
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu1 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu2 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu3 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&gmac2io {
++	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
++	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
++	clock_in_out = "input";
++	phy-supply = <&vcc_io>;
++	phy-handle = <&rtl8211e>;
++	phy-mode = "rgmii";
++	pinctrl-names = "default";
++	pinctrl-0 = <&rgmiim1_pins>;
++	snps,aal;
++	snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
++	snps,reset-active-low;
++	snps,reset-delays-us = <0 10000 50000>;
++	tx_delay = <0x24>;
++	rx_delay = <0x18>;
++	status = "okay";
++
++	mdio {
++		compatible = "snps,dwmac-mdio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		rtl8211e: ethernet-phy@0 {
++			reg = <0>;
++		};
++	};
++};
++
++&i2c1 {
++	status = "okay";
++
++	rk805: rk805@18 {
++		compatible = "rockchip,rk805";
++		reg = <0x18>;
++		interrupt-parent = <&gpio2>;
++		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
++		#clock-cells = <1>;
++		clock-output-names = "xin32k", "rk805-clkout2";
++		gpio-controller;
++		#gpio-cells = <2>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&pmic_int_l>;
++		rockchip,system-power-controller;
++		wakeup-source;
++
++		vcc1-supply = <&vcc_sys>;
++		vcc2-supply = <&vcc_sys>;
++		vcc3-supply = <&vcc_sys>;
++		vcc4-supply = <&vcc_sys>;
++		vcc5-supply = <&vcc_io>;
++		vcc6-supply = <&vcc_sys>;
++
++		regulators {
++			vdd_logic: DCDC_REG1 {
++				regulator-name = "vdd_logic";
++				regulator-min-microvolt = <712500>;
++				regulator-max-microvolt = <1450000>;
++				regulator-ramp-delay = <12500>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1000000>;
++				};
++			};
++
++			vdd_arm: DCDC_REG2 {
++				regulator-name = "vdd_arm";
++				regulator-min-microvolt = <712500>;
++				regulator-max-microvolt = <1450000>;
++				regulator-ramp-delay = <12500>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <950000>;
++				};
++			};
++
++			vcc_ddr: DCDC_REG3 {
++				regulator-name = "vcc_ddr";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++				};
++			};
++
++			vcc_io: DCDC_REG4 {
++				regulator-name = "vcc_io";
++				regulator-min-microvolt = <3300000>;
++				regulator-max-microvolt = <3300000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <3300000>;
++				};
++			};
++
++			vcc_18: LDO_REG1 {
++				regulator-name = "vcc_18";
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1800000>;
++				};
++			};
++
++			vcc18_emmc: LDO_REG2 {
++				regulator-name = "vcc18_emmc";
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1800000>;
++				};
++			};
++
++			vdd_10: LDO_REG3 {
++				regulator-name = "vdd_10";
++				regulator-min-microvolt = <1000000>;
++				regulator-max-microvolt = <1000000>;
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <1000000>;
++				};
++			};
++		};
++	};
++};
++
++&io_domains {
++	status = "okay";
++
++	vccio1-supply = <&vcc_io>;
++	vccio2-supply = <&vcc18_emmc>;
++	vccio3-supply = <&vcc_sdio>;
++	vccio4-supply = <&vcc_18>;
++	vccio5-supply = <&vcc_io>;
++	vccio6-supply = <&vcc_io>;
++	pmuio-supply = <&vcc_io>;
++};
++
++&pinctrl {
++	leds {
++		led_pins: led-pins {
++			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>,
++							<2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
++							<2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	button {
++		button_pins: button-pins {
++			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	pmic {
++		pmic_int_l: pmic-int-l {
++			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++
++	sd {
++		sdio_vcc_pin: sdio-vcc-pin {
++			rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++};
++
++&sdmmc {
++	bus-width = <4>;
++	cap-mmc-highspeed;
++	cap-sd-highspeed;
++	disable-wp;
++	max-frequency = <150000000>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
++	vmmc-supply = <&vcc_sd>;
++	vqmmc-supply = <&vcc_sdio>;
++	status = "okay";
++};
++
++&tsadc {
++	rockchip,hw-tshut-mode = <0>;
++	rockchip,hw-tshut-polarity = <0>;
++	status = "okay";
++};
++
++&uart2 {
++	status = "okay";
++};
++
++&u2phy {
++	status = "okay";
++
++	u2phy_host: host-port {
++		status = "okay";
++	};
++};
++
++&usb_host0_ehci {
++	status = "okay";
++};
++
++&usb_host0_ohci {
++	status = "okay";
++};
+--- /dev/null
++++ b/configs/tpe-r1400-rk3328_defconfig
+@@ -0,0 +1,99 @@
++CONFIG_ARM=y
++CONFIG_ARCH_ROCKCHIP=y
++CONFIG_SYS_TEXT_BASE=0x00200000
++CONFIG_SPL_GPIO_SUPPORT=y
++CONFIG_ENV_OFFSET=0x3F8000
++CONFIG_ROCKCHIP_RK3328=y
++CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
++CONFIG_TPL_LIBCOMMON_SUPPORT=y
++CONFIG_TPL_LIBGENERIC_SUPPORT=y
++CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
++CONFIG_SPL_STACK_R_ADDR=0x600000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_DEBUG_UART_BASE=0xFF130000
++CONFIG_DEBUG_UART_CLOCK=24000000
++CONFIG_SMBIOS_PRODUCT_NAME="tpe_r1400_rk3328"
++CONFIG_DEBUG_UART=y
++CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
++# CONFIG_ANDROID_BOOT_IMAGE is not set
++CONFIG_FIT=y
++CONFIG_FIT_VERBOSE=y
++CONFIG_SPL_LOAD_FIT=y
++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-tpe-r1400.dtb"
++CONFIG_MISC_INIT_R=y
++# CONFIG_DISPLAY_CPUINFO is not set
++CONFIG_DISPLAY_BOARDINFO_LATE=y
++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
++CONFIG_TPL_SYS_MALLOC_SIMPLE=y
++CONFIG_SPL_STACK_R=y
++CONFIG_SPL_I2C_SUPPORT=y
++CONFIG_SPL_POWER_SUPPORT=y
++CONFIG_SPL_ATF=y
++CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
++CONFIG_CMD_BOOTZ=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_MMC=y
++CONFIG_CMD_USB=y
++# CONFIG_CMD_SETEXPR is not set
++CONFIG_CMD_TIME=y
++CONFIG_SPL_OF_CONTROL=y
++CONFIG_TPL_OF_CONTROL=y
++CONFIG_DEFAULT_DEVICE_TREE="rk3328-tpe-r1400"
++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
++CONFIG_TPL_OF_PLATDATA=y
++CONFIG_ENV_IS_IN_MMC=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_TPL_DM=y
++CONFIG_REGMAP=y
++CONFIG_SPL_REGMAP=y
++CONFIG_TPL_REGMAP=y
++CONFIG_SYSCON=y
++CONFIG_SPL_SYSCON=y
++CONFIG_TPL_SYSCON=y
++CONFIG_CLK=y
++CONFIG_SPL_CLK=y
++CONFIG_FASTBOOT_BUF_ADDR=0x800800
++CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
++CONFIG_ROCKCHIP_GPIO=y
++CONFIG_SYS_I2C_ROCKCHIP=y
++CONFIG_MMC_DW=y
++CONFIG_MMC_DW_ROCKCHIP=y
++CONFIG_SF_DEFAULT_SPEED=20000000
++CONFIG_DM_ETH=y
++CONFIG_ETH_DESIGNWARE=y
++CONFIG_GMAC_ROCKCHIP=y
++CONFIG_PINCTRL=y
++CONFIG_SPL_PINCTRL=y
++CONFIG_DM_PMIC=y
++CONFIG_PMIC_RK8XX=y
++CONFIG_SPL_DM_REGULATOR=y
++CONFIG_REGULATOR_PWM=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_SPL_DM_REGULATOR_FIXED=y
++CONFIG_REGULATOR_RK8XX=y
++CONFIG_PWM_ROCKCHIP=y
++CONFIG_RAM=y
++CONFIG_SPL_RAM=y
++CONFIG_TPL_RAM=y
++CONFIG_DM_RESET=y
++CONFIG_BAUDRATE=1500000
++CONFIG_DEBUG_UART_SHIFT=2
++CONFIG_SYSRESET=y
++# CONFIG_TPL_SYSRESET is not set
++CONFIG_USB=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_XHCI_DWC3=y
++CONFIG_USB_EHCI_HCD=y
++CONFIG_USB_EHCI_GENERIC=y
++CONFIG_USB_OHCI_HCD=y
++CONFIG_USB_OHCI_GENERIC=y
++CONFIG_USB_DWC2=y
++CONFIG_USB_DWC3=y
++# CONFIG_USB_DWC3_GADGET is not set
++CONFIG_USB_GADGET=y
++CONFIG_USB_GADGET_DWC2_OTG=y
++CONFIG_SPL_TINY_MEMSET=y
++CONFIG_TPL_TINY_MEMSET=y
++CONFIG_ERRNO_STR=y
++CONFIG_SMBIOS_MANUFACTURER="pine64"

+ 149 - 0
package/boot/uboot-rockchip/src/of-platdata/nanopi-r2s-rk3328/dt-platdata.c

@@ -0,0 +1,149 @@
+/*
+ * DO NOT MODIFY
+ *
+ * This file was generated by dtoc from a .dtb (device tree binary) file.
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dt-structs.h>
+
+static const struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = {
+	.reg			= {0xff100000, 0x1000},
+};
+U_BOOT_DEVICE(syscon_at_ff100000) = {
+	.name		= "rockchip_rk3328_grf",
+	.platdata	= &dtv_syscon_at_ff100000,
+	.platdata_size	= sizeof(dtv_syscon_at_ff100000),
+};
+
+static const struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = {
+	.reg			= {0xff440000, 0x1000},
+	.rockchip_grf		= 0x3a,
+};
+U_BOOT_DEVICE(clock_controller_at_ff440000) = {
+	.name		= "rockchip_rk3328_cru",
+	.platdata	= &dtv_clock_controller_at_ff440000,
+	.platdata_size	= sizeof(dtv_clock_controller_at_ff440000),
+};
+
+static const struct dtd_rockchip_rk3328_uart dtv_serial_at_ff130000 = {
+	.clock_frequency	= 0x16e3600,
+	.clocks			= {
+			{&dtv_clock_controller_at_ff440000, {40}},
+			{&dtv_clock_controller_at_ff440000, {212}},},
+	.dma_names		= {"tx", "rx"},
+	.dmas			= {0x10, 0x6, 0x10, 0x7},
+	.interrupts		= {0x0, 0x39, 0x4},
+	.pinctrl_0		= 0x26,
+	.pinctrl_names		= "default",
+	.reg			= {0xff130000, 0x100},
+	.reg_io_width		= 0x4,
+	.reg_shift		= 0x2,
+};
+U_BOOT_DEVICE(serial_at_ff130000) = {
+	.name		= "rockchip_rk3328_uart",
+	.platdata	= &dtv_serial_at_ff130000,
+	.platdata_size	= sizeof(dtv_serial_at_ff130000),
+};
+
+static const struct dtd_rockchip_rk3328_dw_mshc dtv_mmc_at_ff500000 = {
+	.bus_width		= 0x4,
+	.cap_mmc_highspeed	= true,
+	.cap_sd_highspeed	= true,
+	.clocks			= {
+			{&dtv_clock_controller_at_ff440000, {317}},
+			{&dtv_clock_controller_at_ff440000, {33}},
+			{&dtv_clock_controller_at_ff440000, {74}},
+			{&dtv_clock_controller_at_ff440000, {78}},},
+	.disable_wp		= true,
+	.fifo_depth		= 0x100,
+	.interrupts		= {0x0, 0xc, 0x4},
+	.max_frequency		= 0x8f0d180,
+	.pinctrl_0		= {0x47, 0x48, 0x49, 0x4a},
+	.pinctrl_names		= "default",
+	.reg			= {0xff500000, 0x4000},
+	.u_boot_spl_fifo_mode	= true,
+	.vmmc_supply		= 0x4b,
+	.vqmmc_supply		= 0x1e,
+};
+U_BOOT_DEVICE(mmc_at_ff500000) = {
+	.name		= "rockchip_rk3328_dw_mshc",
+	.platdata	= &dtv_mmc_at_ff500000,
+	.platdata_size	= sizeof(dtv_mmc_at_ff500000),
+};
+
+static const struct dtd_rockchip_rk3328_pinctrl dtv_pinctrl = {
+	.ranges			= true,
+	.rockchip_grf		= 0x3a,
+};
+U_BOOT_DEVICE(pinctrl) = {
+	.name		= "rockchip_rk3328_pinctrl",
+	.platdata	= &dtv_pinctrl,
+	.platdata_size	= sizeof(dtv_pinctrl),
+};
+
+static const struct dtd_rockchip_gpio_bank dtv_gpio0_at_ff210000 = {
+	.clocks			= {
+			{&dtv_clock_controller_at_ff440000, {200}},},
+	.gpio_controller	= true,
+	.interrupt_controller	= true,
+	.interrupts		= {0x0, 0x33, 0x4},
+	.reg			= {0xff210000, 0x100},
+};
+U_BOOT_DEVICE(gpio0_at_ff210000) = {
+	.name		= "rockchip_gpio_bank",
+	.platdata	= &dtv_gpio0_at_ff210000,
+	.platdata_size	= sizeof(dtv_gpio0_at_ff210000),
+};
+
+static const struct dtd_regulator_fixed dtv_sdmmc_regulator = {
+	.gpio			= {0x60, 0x1e, 0x1},
+	.pinctrl_0		= 0x61,
+	.pinctrl_names		= "default",
+	.regulator_max_microvolt = 0x325aa0,
+	.regulator_min_microvolt = 0x325aa0,
+	.regulator_name		= "vcc_sd",
+	.vin_supply		= 0x1c,
+};
+U_BOOT_DEVICE(sdmmc_regulator) = {
+	.name		= "regulator_fixed",
+	.platdata	= &dtv_sdmmc_regulator,
+	.platdata_size	= sizeof(dtv_sdmmc_regulator),
+};
+
+static const struct dtd_rockchip_rk3328_dmc dtv_dmc = {
+	.reg			= {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000,
+		0xff720000, 0x1000, 0xff798000, 0x1000},
+	.rockchip_sdram_params	= {0x1, 0xa, 0x2, 0x1, 0x0, 0x0, 0x11, 0x0,
+		0x11, 0x0, 0x0, 0x94291288, 0x0, 0x27, 0x462, 0x15,
+		0x242, 0xff, 0x14d, 0x0, 0x1, 0x0, 0x0, 0x0,
+		0x43049010, 0x64, 0x28003b, 0xd0, 0x20053, 0xd4, 0x220000, 0xd8,
+		0x100, 0xdc, 0x40000, 0xe0, 0x0, 0xe4, 0x110000, 0xe8,
+		0x420, 0xec, 0x400, 0xf4, 0xf011f, 0x100, 0x9060b06, 0x104,
+		0x20209, 0x108, 0x505040a, 0x10c, 0x40400c, 0x110, 0x5030206, 0x114,
+		0x3030202, 0x120, 0x3030b03, 0x124, 0x20208, 0x180, 0x1000040, 0x184,
+		0x0, 0x190, 0x7030003, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240,
+		0x6000604, 0x244, 0x201, 0x250, 0xf00, 0x490, 0x1, 0xffffffff,
+		0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xc, 0x28, 0xa, 0x2c,
+		0x0, 0x30, 0x9, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79,
+		0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87,
+		0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78,
+		0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77,
+		0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77,
+		0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+		0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77,
+		0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9,
+		0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+		0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77,
+		0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78,
+		0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69,
+		0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77,
+		0x77, 0x77, 0x79, 0x9},
+};
+U_BOOT_DEVICE(dmc) = {
+	.name		= "rockchip_rk3328_dmc",
+	.platdata	= &dtv_dmc,
+	.platdata_size	= sizeof(dtv_dmc),
+};
+

+ 72 - 0
package/boot/uboot-rockchip/src/of-platdata/nanopi-r2s-rk3328/dt-structs-gen.h

@@ -0,0 +1,72 @@
+/*
+ * DO NOT MODIFY
+ *
+ * This file was generated by dtoc from a .dtb (device tree binary) file.
+ */
+
+#include <stdbool.h>
+#include <linux/libfdt.h>
+struct dtd_regulator_fixed {
+	fdt32_t		gpio[3];
+	fdt32_t		pinctrl_0;
+	const char *	pinctrl_names;
+	fdt32_t		regulator_max_microvolt;
+	fdt32_t		regulator_min_microvolt;
+	const char *	regulator_name;
+	fdt32_t		vin_supply;
+};
+struct dtd_rockchip_gpio_bank {
+	struct phandle_1_arg clocks[1];
+	bool		gpio_controller;
+	bool		interrupt_controller;
+	fdt32_t		interrupts[3];
+	fdt64_t		reg[2];
+};
+struct dtd_rockchip_rk3328_cru {
+	fdt64_t		reg[2];
+	fdt32_t		rockchip_grf;
+};
+struct dtd_rockchip_rk3328_dmc {
+	fdt64_t		reg[12];
+	fdt32_t		rockchip_sdram_params[196];
+};
+struct dtd_rockchip_rk3328_dw_mshc {
+	fdt32_t		bus_width;
+	bool		cap_mmc_highspeed;
+	bool		cap_sd_highspeed;
+	struct phandle_1_arg clocks[4];
+	bool		disable_wp;
+	fdt32_t		fifo_depth;
+	fdt32_t		interrupts[3];
+	fdt32_t		max_frequency;
+	fdt32_t		pinctrl_0[4];
+	const char *	pinctrl_names;
+	fdt64_t		reg[2];
+	bool		u_boot_spl_fifo_mode;
+	fdt32_t		vmmc_supply;
+	fdt32_t		vqmmc_supply;
+};
+struct dtd_rockchip_rk3328_grf {
+	fdt64_t		reg[2];
+};
+struct dtd_rockchip_rk3328_pinctrl {
+	bool		ranges;
+	fdt32_t		rockchip_grf;
+};
+struct dtd_rockchip_rk3328_uart {
+	fdt32_t		clock_frequency;
+	struct phandle_1_arg clocks[2];
+	const char *	dma_names[2];
+	fdt32_t		dmas[4];
+	fdt32_t		interrupts[3];
+	fdt32_t		pinctrl_0;
+	const char *	pinctrl_names;
+	fdt64_t		reg[2];
+	fdt32_t		reg_io_width;
+	fdt32_t		reg_shift;
+};
+#define dtd_syscon dtd_rockchip_rk3328_cru
+#define dtd_simple_mfd dtd_rockchip_rk3328_grf
+#define dtd_snps_dw_apb_uart dtd_rockchip_rk3328_uart
+#define dtd_rockchip_cru dtd_rockchip_rk3328_cru
+#define dtd_rockchip_rk3288_dw_mshc dtd_rockchip_rk3328_dw_mshc

+ 149 - 0
package/boot/uboot-rockchip/src/of-platdata/tpe-r1400-rk3328/dt-platdata.c

@@ -0,0 +1,149 @@
+/*
+ * DO NOT MODIFY
+ *
+ * This file was generated by dtoc from a .dtb (device tree binary) file.
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dt-structs.h>
+
+static const struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = {
+	.reg			= {0xff100000, 0x1000},
+};
+U_BOOT_DEVICE(syscon_at_ff100000) = {
+	.name		= "rockchip_rk3328_grf",
+	.platdata	= &dtv_syscon_at_ff100000,
+	.platdata_size	= sizeof(dtv_syscon_at_ff100000),
+};
+
+static const struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = {
+	.reg			= {0xff440000, 0x1000},
+	.rockchip_grf		= 0x3a,
+};
+U_BOOT_DEVICE(clock_controller_at_ff440000) = {
+	.name		= "rockchip_rk3328_cru",
+	.platdata	= &dtv_clock_controller_at_ff440000,
+	.platdata_size	= sizeof(dtv_clock_controller_at_ff440000),
+};
+
+static const struct dtd_rockchip_rk3328_uart dtv_serial_at_ff130000 = {
+	.clock_frequency	= 0x16e3600,
+	.clocks			= {
+			{&dtv_clock_controller_at_ff440000, {40}},
+			{&dtv_clock_controller_at_ff440000, {212}},},
+	.dma_names		= {"tx", "rx"},
+	.dmas			= {0x10, 0x6, 0x10, 0x7},
+	.interrupts		= {0x0, 0x39, 0x4},
+	.pinctrl_0		= 0x26,
+	.pinctrl_names		= "default",
+	.reg			= {0xff130000, 0x100},
+	.reg_io_width		= 0x4,
+	.reg_shift		= 0x2,
+};
+U_BOOT_DEVICE(serial_at_ff130000) = {
+	.name		= "rockchip_rk3328_uart",
+	.platdata	= &dtv_serial_at_ff130000,
+	.platdata_size	= sizeof(dtv_serial_at_ff130000),
+};
+
+static const struct dtd_rockchip_rk3328_dw_mshc dtv_mmc_at_ff500000 = {
+	.bus_width		= 0x4,
+	.cap_mmc_highspeed	= true,
+	.cap_sd_highspeed	= true,
+	.clocks			= {
+			{&dtv_clock_controller_at_ff440000, {317}},
+			{&dtv_clock_controller_at_ff440000, {33}},
+			{&dtv_clock_controller_at_ff440000, {74}},
+			{&dtv_clock_controller_at_ff440000, {78}},},
+	.disable_wp		= true,
+	.fifo_depth		= 0x100,
+	.interrupts		= {0x0, 0xc, 0x4},
+	.max_frequency		= 0x8f0d180,
+	.pinctrl_0		= {0x47, 0x48, 0x49, 0x4a},
+	.pinctrl_names		= "default",
+	.reg			= {0xff500000, 0x4000},
+	.u_boot_spl_fifo_mode	= true,
+	.vmmc_supply		= 0x4b,
+	.vqmmc_supply		= 0x1e,
+};
+U_BOOT_DEVICE(mmc_at_ff500000) = {
+	.name		= "rockchip_rk3328_dw_mshc",
+	.platdata	= &dtv_mmc_at_ff500000,
+	.platdata_size	= sizeof(dtv_mmc_at_ff500000),
+};
+
+static const struct dtd_rockchip_rk3328_pinctrl dtv_pinctrl = {
+	.ranges			= true,
+	.rockchip_grf		= 0x3a,
+};
+U_BOOT_DEVICE(pinctrl) = {
+	.name		= "rockchip_rk3328_pinctrl",
+	.platdata	= &dtv_pinctrl,
+	.platdata_size	= sizeof(dtv_pinctrl),
+};
+
+static const struct dtd_rockchip_gpio_bank dtv_gpio0_at_ff210000 = {
+	.clocks			= {
+			{&dtv_clock_controller_at_ff440000, {200}},},
+	.gpio_controller	= true,
+	.interrupt_controller	= true,
+	.interrupts		= {0x0, 0x33, 0x4},
+	.reg			= {0xff210000, 0x100},
+};
+U_BOOT_DEVICE(gpio0_at_ff210000) = {
+	.name		= "rockchip_gpio_bank",
+	.platdata	= &dtv_gpio0_at_ff210000,
+	.platdata_size	= sizeof(dtv_gpio0_at_ff210000),
+};
+
+static const struct dtd_regulator_fixed dtv_sdmmc_regulator = {
+	.gpio			= {0x60, 0x1e, 0x1},
+	.pinctrl_0		= 0x61,
+	.pinctrl_names		= "default",
+	.regulator_max_microvolt = 0x325aa0,
+	.regulator_min_microvolt = 0x325aa0,
+	.regulator_name		= "vcc_sd",
+	.vin_supply		= 0x1c,
+};
+U_BOOT_DEVICE(sdmmc_regulator) = {
+	.name		= "regulator_fixed",
+	.platdata	= &dtv_sdmmc_regulator,
+	.platdata_size	= sizeof(dtv_sdmmc_regulator),
+};
+
+static const struct dtd_rockchip_rk3328_dmc dtv_dmc = {
+	.reg			= {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000,
+		0xff720000, 0x1000, 0xff798000, 0x1000},
+	.rockchip_sdram_params	= {0x1, 0xa, 0x2, 0x1, 0x0, 0x0, 0x11, 0x0,
+		0x11, 0x0, 0x0, 0x94291288, 0x0, 0x27, 0x462, 0x15,
+		0x242, 0xff, 0x14d, 0x0, 0x1, 0x0, 0x0, 0x0,
+		0x43049010, 0x64, 0x28003b, 0xd0, 0x20053, 0xd4, 0x220000, 0xd8,
+		0x100, 0xdc, 0x40000, 0xe0, 0x0, 0xe4, 0x110000, 0xe8,
+		0x420, 0xec, 0x400, 0xf4, 0xf011f, 0x100, 0x9060b06, 0x104,
+		0x20209, 0x108, 0x505040a, 0x10c, 0x40400c, 0x110, 0x5030206, 0x114,
+		0x3030202, 0x120, 0x3030b03, 0x124, 0x20208, 0x180, 0x1000040, 0x184,
+		0x0, 0x190, 0x7030003, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240,
+		0x6000604, 0x244, 0x201, 0x250, 0xf00, 0x490, 0x1, 0xffffffff,
+		0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xc, 0x28, 0xa, 0x2c,
+		0x0, 0x30, 0x9, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79,
+		0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87,
+		0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78,
+		0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77,
+		0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77,
+		0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+		0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77,
+		0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9,
+		0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+		0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77,
+		0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78,
+		0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69,
+		0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77,
+		0x77, 0x77, 0x79, 0x9},
+};
+U_BOOT_DEVICE(dmc) = {
+	.name		= "rockchip_rk3328_dmc",
+	.platdata	= &dtv_dmc,
+	.platdata_size	= sizeof(dtv_dmc),
+};
+

+ 72 - 0
package/boot/uboot-rockchip/src/of-platdata/tpe-r1400-rk3328/dt-structs-gen.h

@@ -0,0 +1,72 @@
+/*
+ * DO NOT MODIFY
+ *
+ * This file was generated by dtoc from a .dtb (device tree binary) file.
+ */
+
+#include <stdbool.h>
+#include <linux/libfdt.h>
+struct dtd_regulator_fixed {
+	fdt32_t		gpio[3];
+	fdt32_t		pinctrl_0;
+	const char *	pinctrl_names;
+	fdt32_t		regulator_max_microvolt;
+	fdt32_t		regulator_min_microvolt;
+	const char *	regulator_name;
+	fdt32_t		vin_supply;
+};
+struct dtd_rockchip_gpio_bank {
+	struct phandle_1_arg clocks[1];
+	bool		gpio_controller;
+	bool		interrupt_controller;
+	fdt32_t		interrupts[3];
+	fdt64_t		reg[2];
+};
+struct dtd_rockchip_rk3328_cru {
+	fdt64_t		reg[2];
+	fdt32_t		rockchip_grf;
+};
+struct dtd_rockchip_rk3328_dmc {
+	fdt64_t		reg[12];
+	fdt32_t		rockchip_sdram_params[196];
+};
+struct dtd_rockchip_rk3328_dw_mshc {
+	fdt32_t		bus_width;
+	bool		cap_mmc_highspeed;
+	bool		cap_sd_highspeed;
+	struct phandle_1_arg clocks[4];
+	bool		disable_wp;
+	fdt32_t		fifo_depth;
+	fdt32_t		interrupts[3];
+	fdt32_t		max_frequency;
+	fdt32_t		pinctrl_0[4];
+	const char *	pinctrl_names;
+	fdt64_t		reg[2];
+	bool		u_boot_spl_fifo_mode;
+	fdt32_t		vmmc_supply;
+	fdt32_t		vqmmc_supply;
+};
+struct dtd_rockchip_rk3328_grf {
+	fdt64_t		reg[2];
+};
+struct dtd_rockchip_rk3328_pinctrl {
+	bool		ranges;
+	fdt32_t		rockchip_grf;
+};
+struct dtd_rockchip_rk3328_uart {
+	fdt32_t		clock_frequency;
+	struct phandle_1_arg clocks[2];
+	const char *	dma_names[2];
+	fdt32_t		dmas[4];
+	fdt32_t		interrupts[3];
+	fdt32_t		pinctrl_0;
+	const char *	pinctrl_names;
+	fdt64_t		reg[2];
+	fdt32_t		reg_io_width;
+	fdt32_t		reg_shift;
+};
+#define dtd_syscon dtd_rockchip_rk3328_cru
+#define dtd_simple_mfd dtd_rockchip_rk3328_grf
+#define dtd_snps_dw_apb_uart dtd_rockchip_rk3328_uart
+#define dtd_rockchip_cru dtd_rockchip_rk3328_cru
+#define dtd_rockchip_rk3288_dw_mshc dtd_rockchip_rk3328_dw_mshc

+ 23 - 0
package/boot/uboot-sunxi/patches/001-yylloc-redefinition.patch

@@ -0,0 +1,23 @@
+From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001
+From: Peter Robinson <pbrobinson@gmail.com>
+Date: Thu, 30 Jan 2020 09:37:15 +0000
+Subject: [PATCH] Remove redundant YYLOC global declaration
+
+Same as the upstream fix for building dtc with gcc 10.
+
+Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
+Origin: upstream, https://github.com/u-boot/u-boot/commit/018921ee79d3f30893614b3b2b63b588d8544f73
+---
+ scripts/dtc/dtc-lexer.l | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/scripts/dtc/dtc-lexer.l
++++ b/scripts/dtc/dtc-lexer.l
+@@ -38,7 +38,6 @@ LINECOMMENT	"//".*\n
+ #include "srcpos.h"
+ #include "dtc-parser.tab.h"
+ 
+-YYLTYPE yylloc;
+ extern bool treesource_error;
+ 
+ /* CAUTION: this will stop working if we ever use yyless() or yyunput() */

+ 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" \

+ 3 - 2
package/firmware/wireless-regdb/Makefile

@@ -1,11 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wireless-regdb
-PKG_VERSION:=2019.06.03
+PKG_VERSION:=2021.08.28
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
-PKG_HASH:=cd917ed86b63ce8d93947979f1f18948f03a4ac0ad89ec25227b36ac00dc54bf
+PKG_HASH:=cff370c410d1e6d316ae0a7fa8ac6278fdf1efca5d3d664aca7cfd2aafa54446
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 

+ 0 - 58
package/firmware/wireless-regdb/patches/010-regdb-fix-compatibility-with-python2.patch

@@ -1,58 +0,0 @@
-From 651e39dee8605995b736b6056c6f7dc5c5a9c948 Mon Sep 17 00:00:00 2001
-From: Johannes Berg <johannes.berg@intel.com>
-Date: Thu, 22 Aug 2019 21:46:27 +0200
-Subject: [PATCH] regdb: fix compatibility with python2
-
-Various changes in the commit mentioned below broke
-compatibility with python2. Restore it in a way that
-makes it worth with both versions.
-
-Fixes: f3c4969c2485 ("wireless-regdb: make scripts compatible with Python 3")
-Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
----
- db2bin.py  | 2 +-
- db2fw.py   | 2 +-
- dbparse.py | 3 +--
- 3 files changed, 3 insertions(+), 4 deletions(-)
-
---- a/db2bin.py
-+++ b/db2bin.py
-@@ -118,7 +118,7 @@ reg_country_ptr.set()
- for alpha2 in countrynames:
-     coll = countries[alpha2]
-     # struct regdb_file_reg_country
--    output.write(struct.pack('>BBxBI', alpha2[0], alpha2[1], coll.dfs_region, reg_rules_collections[coll.permissions]))
-+    output.write(struct.pack('>2sxBI', alpha2, coll.dfs_region, reg_rules_collections[coll.permissions]))
- 
- 
- if len(sys.argv) > 3:
---- a/db2fw.py
-+++ b/db2fw.py
-@@ -85,7 +85,7 @@ countrynames = list(countries)
- countrynames.sort()
- for alpha2 in countrynames:
-     coll = countries[alpha2]
--    output.write(struct.pack('>BB', alpha2[0], alpha2[1]))
-+    output.write(struct.pack('>2s', alpha2))
-     country_ptrs[alpha2] = PTR(output)
- output.write(b'\x00' * 4)
- 
---- a/dbparse.py
-+++ b/dbparse.py
-@@ -1,6 +1,5 @@
- #!/usr/bin/env python
- 
--from builtins import bytes
- from functools import total_ordering
- import sys, math
- from math import ceil, log
-@@ -359,7 +358,7 @@ class DBParser(object):
-         for cname in cnames:
-             if len(cname) != 2:
-                 self._warn("country '%s' not alpha2" % cname)
--            cname = bytes(cname, 'ascii')
-+            cname = cname.encode('ascii')
-             if not cname in self._countries:
-                 self._countries[cname] = Country(dfs_region, comments=self._comments)
-             self._current_countries[cname] = self._countries[cname]

+ 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.237-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.237/
+PKG_HASH:=e40ce1f4b707d5b1b5da3f4470f1ccf4f565602323424c89d956069df701bffd
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)

+ 1 - 1
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

@@ -352,7 +352,7 @@ mac80211_get_addr() {
 	local phy="$1"
 	local idx="$(($2 + 1))"
 
-	head -n $(($macidx + 1)) /sys/class/ieee80211/${phy}/addresses | tail -n1
+	head -n $idx /sys/class/ieee80211/${phy}/addresses | tail -n1
 }
 
 mac80211_generate_mac() {

+ 2 - 2
package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch

@@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
 
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2976,7 +2976,8 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2978,7 +2978,8 @@ void ath9k_hw_apply_txpower(struct ath_h
  {
  	struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
  	struct ieee80211_channel *channel;
@@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
  	u16 ctl = NO_CTL;
  
  	if (!chan)
-@@ -2988,9 +2989,14 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2990,9 +2991,14 @@ void ath9k_hw_apply_txpower(struct ath_h
  	channel = chan->chan;
  	chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
  	new_pwr = min_t(int, chan_pwr, reg->power_limit);

+ 1 - 1
package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch

@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2995,6 +2995,10 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2997,6 +2997,10 @@ void ath9k_hw_apply_txpower(struct ath_h
  	if (ant_gain > max_gain)
  		ant_reduction = ant_gain - max_gain;
  

+ 1 - 1
package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch

@@ -14,7 +14,7 @@
  CFLAGS_trace.o := -I$(src)
 --- a/drivers/net/wireless/ath/ath.h
 +++ b/drivers/net/wireless/ath/ath.h
-@@ -316,14 +316,7 @@ void _ath_dbg(struct ath_common *common,
+@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common,
  #endif /* CPTCFG_ATH_DEBUG */
  
  /** Returns string describing opmode, or NULL if unknown mode. */

+ 2 - 2
package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch

@@ -1,6 +1,6 @@
 --- a/net/wireless/reg.c
 +++ b/net/wireless/reg.c
-@@ -3034,6 +3034,8 @@ void regulatory_hint_country_ie(struct w
+@@ -3037,6 +3037,8 @@ void regulatory_hint_country_ie(struct w
  	enum environment_cap env = ENVIRON_ANY;
  	struct regulatory_request *request = NULL, *lr;
  
@@ -9,7 +9,7 @@
  	/* IE len must be evenly divisible by 2 */
  	if (country_ie_len & 0x01)
  		return;
-@@ -3259,6 +3261,7 @@ static bool is_wiphy_all_set_reg_flag(en
+@@ -3262,6 +3264,7 @@ static bool is_wiphy_all_set_reg_flag(en
  
  void regulatory_hint_disconnect(void)
  {

+ 2 - 2
package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch

@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1374,6 +1374,53 @@ void ath9k_deinit_debug(struct ath_softc
+@@ -1377,6 +1377,53 @@ void ath9k_deinit_debug(struct ath_softc
  	ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
  }
  
@@ -54,7 +54,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
  	struct ath_common *common = ath9k_hw_common(ah);
-@@ -1393,6 +1440,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1396,6 +1443,8 @@ int ath9k_init_debug(struct ath_hw *ah)
  	ath9k_tx99_init_debug(sc);
  	ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
  

+ 2 - 2
package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch

@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1421,6 +1421,52 @@ static const struct file_operations fops
+@@ -1424,6 +1424,52 @@ static const struct file_operations fops
  	.owner = THIS_MODULE
  };
  
@@ -53,7 +53,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
  	struct ath_common *common = ath9k_hw_common(ah);
-@@ -1442,6 +1488,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1445,6 +1491,8 @@ int ath9k_init_debug(struct ath_hw *ah)
  
  	debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
  			    &fops_eeprom);

+ 5 - 5
package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch

@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -850,6 +850,9 @@ static inline int ath9k_dump_btcoex(stru
+@@ -851,6 +851,9 @@ static inline int ath9k_dump_btcoex(stru
  #ifdef CPTCFG_MAC80211_LEDS
  void ath_init_leds(struct ath_softc *sc);
  void ath_deinit_leds(struct ath_softc *sc);
@@ -10,7 +10,7 @@
  #else
  static inline void ath_init_leds(struct ath_softc *sc)
  {
-@@ -991,6 +994,13 @@ void ath_ant_comb_scan(struct ath_softc
+@@ -992,6 +995,13 @@ void ath_ant_comb_scan(struct ath_softc
  #define AIRTIME_USE_NEW_QUEUES	BIT(2)
  #define AIRTIME_ACTIVE(flags) (!!(flags & (AIRTIME_USE_TX|AIRTIME_USE_RX)))
  
@@ -24,7 +24,7 @@
  struct ath_softc {
  	struct ieee80211_hw *hw;
  	struct device *dev;
-@@ -1046,9 +1056,8 @@ struct ath_softc {
+@@ -1047,9 +1057,8 @@ struct ath_softc {
  	spinlock_t chan_lock;
  
  #ifdef CPTCFG_MAC80211_LEDS
@@ -192,7 +192,7 @@
  #endif
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1466,6 +1466,61 @@ static const struct file_operations fops
+@@ -1469,6 +1469,61 @@ static const struct file_operations fops
  	.llseek = default_llseek,
  };
  
@@ -254,7 +254,7 @@
  
  int ath9k_init_debug(struct ath_hw *ah)
  {
-@@ -1490,6 +1545,10 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1493,6 +1548,10 @@ int ath9k_init_debug(struct ath_hw *ah)
  			    &fops_eeprom);
  	debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
  			    sc, &fops_chanbw);

+ 7 - 7
package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch

@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1522,6 +1522,50 @@ static const struct file_operations fops
+@@ -1525,6 +1525,50 @@ static const struct file_operations fops
  #endif
  
  
@@ -51,7 +51,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
  	struct ath_common *common = ath9k_hw_common(ah);
-@@ -1549,6 +1593,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1552,6 +1596,8 @@ int ath9k_init_debug(struct ath_hw *ah)
  	debugfs_create_file("gpio_led", S_IWUSR,
  			   sc->debug.debugfs_phy, sc, &fops_gpio_led);
  #endif
@@ -84,7 +84,7 @@
  	bool reset_power_on;
  	bool htc_reset_init;
  
-@@ -1073,6 +1081,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
+@@ -1074,6 +1082,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
  bool ath9k_hw_check_alive(struct ath_hw *ah);
  
  bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
@@ -94,7 +94,7 @@
  struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1883,6 +1883,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
+@@ -1882,6 +1882,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
  }
  EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
  
@@ -115,7 +115,7 @@
  int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
  		   struct ath9k_hw_cal_data *caldata, bool fastcc)
  {
-@@ -2091,6 +2105,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2090,6 +2104,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
  		ar9003_hw_disable_phy_restart(ah);
  
  	ath9k_hw_apply_gpio_override(ah);
@@ -125,9 +125,9 @@
  		REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -528,6 +528,11 @@ irqreturn_t ath_isr(int irq, void *dev)
- 	if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
+@@ -535,6 +535,11 @@ irqreturn_t ath_isr(int irq, void *dev)
  		return IRQ_HANDLED;
+ 	}
  
 +	if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) {
 +		status |= ATH9K_INT_FATAL;

+ 2 - 2
package/kernel/mac80211/patches/ath/544-ath9k-ar933x-usb-hang-workaround.patch

@@ -40,7 +40,7 @@
  	return true;
  }
  
-@@ -1861,8 +1880,14 @@ static int ath9k_hw_do_fastcc(struct ath
+@@ -1860,8 +1879,14 @@ static int ath9k_hw_do_fastcc(struct ath
  	if (AR_SREV_9271(ah))
  		ar9002_hw_load_ani_reg(ah, chan);
  
@@ -55,7 +55,7 @@
  	return -EINVAL;
  }
  
-@@ -2116,6 +2141,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2115,6 +2140,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
  		ath9k_hw_set_radar_params(ah);
  	}
  

+ 2 - 2
package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch

@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  #include "common.h"
  #include "debug.h"
-@@ -1001,6 +1002,14 @@ struct ath_led {
+@@ -1002,6 +1003,14 @@ struct ath_led {
  	struct led_classdev cdev;
  };
  
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  struct ath_softc {
  	struct ieee80211_hw *hw;
  	struct device *dev;
-@@ -1058,6 +1067,9 @@ struct ath_softc {
+@@ -1059,6 +1068,9 @@ struct ath_softc {
  #ifdef CPTCFG_MAC80211_LEDS
  	const char *led_default_trigger;
  	struct list_head leds;

+ 1 - 1
package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -1069,6 +1069,7 @@ struct ath_softc {
+@@ -1070,6 +1070,7 @@ struct ath_softc {
  	struct list_head leds;
  #ifdef CONFIG_GPIOLIB
  	struct ath9k_gpio_chip *gpiochip;

+ 2 - 2
package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch

@@ -343,7 +343,7 @@
  
  u8 ath9k_parse_mpdudensity(u8 mpdudensity)
  {
-@@ -649,6 +651,7 @@ void ath_reset_work(struct work_struct *
+@@ -656,6 +658,7 @@ void ath_reset_work(struct work_struct *
  static int ath9k_start(struct ieee80211_hw *hw)
  {
  	struct ath_softc *sc = hw->priv;
@@ -351,7 +351,7 @@
  	struct ath_hw *ah = sc->sc_ah;
  	struct ath_common *common = ath9k_hw_common(ah);
  	struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
-@@ -727,6 +730,11 @@ static int ath9k_start(struct ieee80211_
+@@ -734,6 +737,11 @@ static int ath9k_start(struct ieee80211_
  					  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
  	}
  

+ 1 - 1
package/kernel/mac80211/patches/ath/552-ahb_of.patch

@@ -325,7 +325,7 @@
  
  #include "common.h"
  #include "debug.h"
-@@ -1023,6 +1024,9 @@ struct ath_softc {
+@@ -1024,6 +1025,9 @@ struct ath_softc {
  	struct ath_hw *sc_ah;
  	void __iomem *mem;
  	int irq;

+ 10 - 10
package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch

@@ -385,7 +385,7 @@
  #endif /* AES_GCM_H */
 --- a/net/mac80211/wpa.c
 +++ b/net/mac80211/wpa.c
-@@ -314,7 +314,8 @@ ieee80211_crypto_tkip_decrypt(struct iee
+@@ -315,7 +315,8 @@ ieee80211_crypto_tkip_decrypt(struct iee
  }
  
  
@@ -395,7 +395,7 @@
  {
  	__le16 mask_fc;
  	int a4_included, mgmt;
-@@ -344,14 +345,8 @@ static void ccmp_special_blocks(struct s
+@@ -345,14 +346,8 @@ static void ccmp_special_blocks(struct s
  	else
  		qos_tid = 0;
  
@@ -412,7 +412,7 @@
  
  	/* Nonce: Nonce Flags | A2 | PN
  	 * Nonce Flags: Priority (b0..b3) | Management (b4) | Reserved (b5..b7)
-@@ -359,6 +354,8 @@ static void ccmp_special_blocks(struct s
+@@ -360,6 +355,8 @@ static void ccmp_special_blocks(struct s
  	b_0[1] = qos_tid | (mgmt << 4);
  	memcpy(&b_0[2], hdr->addr2, ETH_ALEN);
  	memcpy(&b_0[8], pn, IEEE80211_CCMP_PN_LEN);
@@ -421,7 +421,7 @@
  
  	/* AAD (extra authenticate-only data) / masked 802.11 header
  	 * FC | A1 | A2 | A3 | SC | [A4] | [QC] */
-@@ -415,7 +412,7 @@ static int ccmp_encrypt_skb(struct ieee8
+@@ -416,7 +413,7 @@ static int ccmp_encrypt_skb(struct ieee8
  	u8 *pos;
  	u8 pn[6];
  	u64 pn64;
@@ -430,7 +430,7 @@
  	u8 b_0[AES_BLOCK_SIZE];
  
  	if (info->control.hw_key &&
-@@ -470,9 +467,11 @@ static int ccmp_encrypt_skb(struct ieee8
+@@ -471,9 +468,11 @@ static int ccmp_encrypt_skb(struct ieee8
  		return 0;
  
  	pos += IEEE80211_CCMP_HDR_LEN;
@@ -445,7 +445,7 @@
  }
  
  
-@@ -545,13 +544,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee
+@@ -549,13 +548,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee
  			u8 aad[2 * AES_BLOCK_SIZE];
  			u8 b_0[AES_BLOCK_SIZE];
  			/* hardware didn't decrypt/verify MIC */
@@ -461,7 +461,7 @@
  				return RX_DROP_UNUSABLE;
  		}
  
-@@ -646,7 +645,7 @@ static int gcmp_encrypt_skb(struct ieee8
+@@ -652,7 +651,7 @@ static int gcmp_encrypt_skb(struct ieee8
  	u8 *pos;
  	u8 pn[6];
  	u64 pn64;
@@ -470,7 +470,7 @@
  	u8 j_0[AES_BLOCK_SIZE];
  
  	if (info->control.hw_key &&
-@@ -703,8 +702,10 @@ static int gcmp_encrypt_skb(struct ieee8
+@@ -709,8 +708,10 @@ static int gcmp_encrypt_skb(struct ieee8
  
  	pos += IEEE80211_GCMP_HDR_LEN;
  	gcmp_special_blocks(skb, pn, j_0, aad);
@@ -483,7 +483,7 @@
  }
  
  ieee80211_tx_result
-@@ -1127,9 +1128,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
+@@ -1138,9 +1139,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
  	struct ieee80211_key *key = tx->key;
  	struct ieee80211_mmie_16 *mmie;
  	struct ieee80211_hdr *hdr;
@@ -495,7 +495,7 @@
  
  	if (WARN_ON(skb_queue_len(&tx->skbs) != 1))
  		return TX_DROP;
-@@ -1175,7 +1176,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct
+@@ -1186,7 +1187,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct
  	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
  	struct ieee80211_key *key = rx->key;
  	struct ieee80211_mmie_16 *mmie;

+ 1 - 1
package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch

@@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects
 
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -1067,7 +1067,6 @@ static int ieee80211_stop_ap(struct wiph
+@@ -1068,7 +1068,6 @@ static int ieee80211_stop_ap(struct wiph
  	sdata->u.ap.driver_smps_mode = IEEE80211_SMPS_OFF;
  
  	__sta_info_flush(sdata, true);

+ 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:
+@@ -3853,6 +3853,12 @@ out:
  netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
  				       struct net_device *dev)
  {

+ 3 - 3
package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch

@@ -18,7 +18,7 @@
  static int ieee80211_ifa6_changed(struct notifier_block *nb,
  				  unsigned long data, void *arg)
  {
-@@ -1168,14 +1168,14 @@ int ieee80211_register_hw(struct ieee802
+@@ -1182,14 +1182,14 @@ int ieee80211_register_hw(struct ieee802
  
  	rtnl_unlock();
  
@@ -35,7 +35,7 @@
  	local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
  	result = register_inet6addr_notifier(&local->ifa6_notifier);
  	if (result)
-@@ -1184,13 +1184,13 @@ int ieee80211_register_hw(struct ieee802
+@@ -1198,13 +1198,13 @@ int ieee80211_register_hw(struct ieee802
  
  	return 0;
  
@@ -52,7 +52,7 @@
   fail_ifa:
  #endif
  	rtnl_lock();
-@@ -1219,10 +1219,10 @@ void ieee80211_unregister_hw(struct ieee
+@@ -1233,10 +1233,10 @@ void ieee80211_unregister_hw(struct ieee
  	tasklet_kill(&local->tx_pending_tasklet);
  	tasklet_kill(&local->tasklet);
  

+ 1 - 1
package/kernel/mac80211/patches/subsys/210-ap_scan.patch

@@ -1,6 +1,6 @@
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -2188,7 +2188,7 @@ static int ieee80211_scan(struct wiphy *
+@@ -2189,7 +2189,7 @@ static int ieee80211_scan(struct wiphy *
  		 * the  frames sent while scanning on other channel will be
  		 * lost)
  		 */

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

@@ -61,7 +61,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  };
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -818,6 +818,7 @@ enum txq_info_flags {
+@@ -807,6 +807,7 @@ enum txq_info_flags {
  	IEEE80211_TXQ_STOP,
  	IEEE80211_TXQ_AMPDU,
  	IEEE80211_TXQ_NO_AMSDU,
@@ -69,7 +69,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  };
  
  /**
-@@ -1226,6 +1227,7 @@ struct ieee80211_local {
+@@ -1214,6 +1215,7 @@ struct ieee80211_local {
  
  	struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
  	struct tasklet_struct tx_pending_tasklet;
@@ -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
+@@ -2035,6 +2037,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
+@@ -3518,13 +3518,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:
+@@ -3637,6 +3643,7 @@ begin:
  	}
  
  	IEEE80211_SKB_CB(skb)->control.vif = vif;

+ 1 - 1
package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch

@@ -10,7 +10,7 @@ Signed-off-by: Chaitanya TK <chaitanya.mgit@gmail.com>
 
 --- a/include/linux/ieee80211.h
 +++ b/include/linux/ieee80211.h
-@@ -1659,6 +1659,7 @@ struct ieee80211_mu_edca_param_set {
+@@ -1668,6 +1668,7 @@ struct ieee80211_mu_edca_param_set {
  #define IEEE80211_VHT_CAP_RXSTBC_3				0x00000300
  #define IEEE80211_VHT_CAP_RXSTBC_4				0x00000400
  #define IEEE80211_VHT_CAP_RXSTBC_MASK				0x00000700

+ 6 - 6
package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/rc80211_minstrel.c
 +++ b/net/mac80211/rc80211_minstrel.c
-@@ -689,8 +689,8 @@ minstrel_alloc(struct ieee80211_hw *hw,
+@@ -672,8 +672,8 @@ minstrel_alloc(struct ieee80211_hw *hw,
  
  #ifdef CPTCFG_MAC80211_DEBUGFS
  	mp->fixed_rate_idx = (u32) -1;
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif
  
  	minstrel_init_cck_rates(mp);
-@@ -701,9 +701,6 @@ minstrel_alloc(struct ieee80211_hw *hw,
+@@ -684,9 +684,6 @@ minstrel_alloc(struct ieee80211_hw *hw,
  static void
  minstrel_free(void *priv)
  {
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	kfree(priv);
  }
  
-@@ -735,7 +732,6 @@ const struct rate_control_ops mac80211_m
+@@ -718,7 +715,6 @@ const struct rate_control_ops mac80211_m
  	.free_sta = minstrel_free_sta,
  #ifdef CPTCFG_MAC80211_DEBUGFS
  	.add_sta_debugfs = minstrel_add_sta_debugfs,
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  };
 --- a/net/mac80211/rc80211_minstrel.h
 +++ b/net/mac80211/rc80211_minstrel.h
-@@ -109,11 +109,6 @@ struct minstrel_sta_info {
+@@ -108,11 +108,6 @@ struct minstrel_sta_info {
  
  	/* sampling table */
  	u8 *sample_table;
@@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  };
  
  struct minstrel_priv {
-@@ -137,7 +132,6 @@ struct minstrel_priv {
+@@ -136,7 +131,6 @@ struct minstrel_priv {
  	 *   - setting will be applied on next update
  	 */
  	u32 fixed_rate_idx;
@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif
  };
  
-@@ -156,7 +150,6 @@ minstrel_get_ewmsd10(struct minstrel_rat
+@@ -155,7 +149,6 @@ minstrel_get_ewmsd10(struct minstrel_rat
  
  extern const struct rate_control_ops mac80211_minstrel;
  void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);

+ 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
+@@ -718,6 +718,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;
+@@ -735,6 +736,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) &&
+@@ -799,12 +802,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] +=
+@@ -825,7 +828,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;
+ 
+@@ -833,6 +836,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);
+ 			}
+@@ -958,7 +963,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;
+ 
+@@ -973,6 +978,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);
+ 		}

+ 5 - 5
package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch

@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  ccflags-y += -DDEBUG
 --- a/net/mac80211/main.c
 +++ b/net/mac80211/main.c
-@@ -1308,18 +1308,12 @@ static int __init ieee80211_init(void)
+@@ -1322,18 +1322,12 @@ static int __init ieee80211_init(void)
  	if (ret)
  		return ret;
  
@@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	rc80211_minstrel_exit();
  
  	return ret;
-@@ -1327,7 +1321,6 @@ static int __init ieee80211_init(void)
+@@ -1341,7 +1335,6 @@ static int __init ieee80211_init(void)
  
  static void __exit ieee80211_exit(void)
  {
@@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif /* IEEE80211_RATE_H */
 --- a/net/mac80211/rc80211_minstrel.c
 +++ b/net/mac80211/rc80211_minstrel.c
-@@ -572,138 +572,6 @@ minstrel_rate_init(void *priv, struct ie
+@@ -555,138 +555,6 @@ minstrel_rate_init(void *priv, struct ie
  	minstrel_update_rates(mp, mi);
  }
  
@@ -256,7 +256,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  static u32 minstrel_get_expected_throughput(void *priv_sta)
  {
  	struct minstrel_sta_info *mi = priv_sta;
-@@ -722,28 +590,8 @@ static u32 minstrel_get_expected_through
+@@ -705,28 +573,8 @@ static u32 minstrel_get_expected_through
  }
  
  const struct rate_control_ops mac80211_minstrel = {
@@ -287,7 +287,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -}
 --- a/net/mac80211/rc80211_minstrel.h
 +++ b/net/mac80211/rc80211_minstrel.h
-@@ -158,7 +158,5 @@ int minstrel_get_tp_avg(struct minstrel_
+@@ -157,7 +157,5 @@ int minstrel_get_tp_avg(struct minstrel_
  /* debugfs */
  int minstrel_stats_open(struct inode *inode, struct file *file);
  int minstrel_stats_csv_open(struct inode *inode, struct file *file);

+ 1 - 1
package/kernel/mac80211/patches/subsys/316-mac80211-minstrel_ht-improve-rate-probing-for-device.patch

@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/rc80211_minstrel.h
 +++ b/net/mac80211/rc80211_minstrel.h
-@@ -114,6 +114,7 @@ struct minstrel_sta_info {
+@@ -113,6 +113,7 @@ struct minstrel_sta_info {
  struct minstrel_priv {
  	struct ieee80211_hw *hw;
  	bool has_mrr;

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

@@ -145,7 +145,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  				struct cfg80211_nan_conf *conf)
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -829,6 +829,8 @@ enum txq_info_flags {
+@@ -818,6 +818,8 @@ enum txq_info_flags {
   *	a fq_flow which is already owned by a different tin
   * @def_cvars: codel vars for @def_flow
   * @frags: used to keep fragments created after dequeue
@@ -154,7 +154,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
   */
  struct txq_info {
  	struct fq_tin tin;
-@@ -836,6 +838,8 @@ struct txq_info {
+@@ -825,6 +827,8 @@ struct txq_info {
  	struct codel_vars def_cvars;
  	struct codel_stats cstats;
  	struct sk_buff_head frags;
@@ -163,7 +163,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	unsigned long flags;
  
  	/* keep last! */
-@@ -1127,6 +1131,11 @@ struct ieee80211_local {
+@@ -1115,6 +1119,11 @@ struct ieee80211_local {
  	struct codel_vars *cvars;
  	struct codel_params cparams;
  
@@ -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
+@@ -1265,7 +1265,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
  			if (!txq_has_queue(sta->sta.txq[i]))
  				continue;
  
@@ -202,7 +202,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -1441,6 +1441,7 @@ void ieee80211_txq_init(struct ieee80211
+@@ -1447,6 +1447,7 @@ void ieee80211_txq_init(struct ieee80211
  	codel_vars_init(&txqi->def_cvars);
  	codel_stats_init(&txqi->cstats);
  	__skb_queue_head_init(&txqi->frags);
@@ -210,7 +210,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  	txqi->txq.vif = &sdata->vif;
  
-@@ -1464,6 +1465,9 @@ void ieee80211_txq_purge(struct ieee8021
+@@ -1470,6 +1471,9 @@ void ieee80211_txq_purge(struct ieee8021
  
  	fq_tin_reset(fq, tin, fq_skb_free_func);
  	ieee80211_purge_tx_queue(&local->hw, &txqi->frags);
@@ -220,7 +220,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  }
  
  void ieee80211_txq_set_params(struct ieee80211_local *local)
-@@ -1580,7 +1584,7 @@ static bool ieee80211_queue_skb(struct i
+@@ -1586,7 +1590,7 @@ static bool ieee80211_queue_skb(struct i
  	ieee80211_txq_enqueue(local, txqi, skb);
  	spin_unlock_bh(&fq->lock);
  
@@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  	return true;
  }
-@@ -3600,6 +3604,60 @@ out:
+@@ -3651,6 +3655,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,

+ 3 - 3
package/kernel/mac80211/patches/subsys/321-cfg80211-Add-airtime-statistics-and-settings.patch

@@ -156,7 +156,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  };
  
  /* policy for the key attributes */
-@@ -4709,6 +4710,11 @@ static int nl80211_send_station(struct s
+@@ -4716,6 +4717,11 @@ static int nl80211_send_station(struct s
  	PUT_SINFO(PLID, plid, u16);
  	PUT_SINFO(PLINK_STATE, plink_state, u8);
  	PUT_SINFO_U64(RX_DURATION, rx_duration);
@@ -168,7 +168,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  	switch (rdev->wiphy.signal_type) {
  	case CFG80211_SIGNAL_TYPE_MBM:
-@@ -5345,6 +5351,15 @@ static int nl80211_set_station(struct sk
+@@ -5352,6 +5358,15 @@ static int nl80211_set_station(struct sk
  			nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]);
  	}
  
@@ -184,7 +184,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	/* Include parameters for TDLS peer (will check later) */
  	err = nl80211_set_station_tdls(info, &params);
  	if (err)
-@@ -5483,6 +5498,15 @@ static int nl80211_new_station(struct sk
+@@ -5490,6 +5505,15 @@ static int nl80211_new_station(struct sk
  			return -EINVAL;
  	}
  

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

@@ -125,7 +125,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
   * The values are not guaranteed to be coherent with regard to each other, i.e.
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -1390,6 +1390,9 @@ static int sta_apply_parameters(struct i
+@@ -1391,6 +1391,9 @@ static int sta_apply_parameters(struct i
  	if (ieee80211_vif_is_mesh(&sdata->vif))
  		sta_apply_mesh_params(local, sta, params);
  
@@ -149,7 +149,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	/* if the dir failed, don't put all the other things into the root! */
 --- a/net/mac80211/debugfs_sta.c
 +++ b/net/mac80211/debugfs_sta.c
-@@ -178,9 +178,9 @@ static ssize_t sta_aqm_read(struct file
+@@ -179,9 +179,9 @@ static ssize_t sta_aqm_read(struct file
  			       txqi->tin.tx_bytes,
  			       txqi->tin.tx_packets,
  			       txqi->flags,
@@ -162,7 +162,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	}
  
  	rcu_read_unlock();
-@@ -192,6 +192,64 @@ static ssize_t sta_aqm_read(struct file
+@@ -193,6 +193,64 @@ static ssize_t sta_aqm_read(struct file
  }
  STA_OPS(aqm);
  
@@ -227,7 +227,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
  					size_t count, loff_t *ppos)
  {
-@@ -546,6 +604,10 @@ void ieee80211_sta_debugfs_add(struct st
+@@ -547,6 +605,10 @@ void ieee80211_sta_debugfs_add(struct st
  	if (local->ops->wake_tx_queue)
  		DEBUGFS_ADD(aqm);
  
@@ -240,7 +240,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  				   sta->debugfs_dir,
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1136,6 +1136,8 @@ struct ieee80211_local {
+@@ -1124,6 +1124,8 @@ struct ieee80211_local {
  	struct list_head active_txqs[IEEE80211_NUM_ACS];
  	u16 schedule_round[IEEE80211_NUM_ACS];
  
@@ -259,7 +259,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  
  	INIT_LIST_HEAD(&local->chanctx_list);
  	mutex_init(&local->chanctx_mtx);
-@@ -1142,6 +1143,9 @@ int ieee80211_register_hw(struct ieee802
+@@ -1156,6 +1157,9 @@ int ieee80211_register_hw(struct ieee802
  	if (!local->hw.max_nan_de_entries)
  		local->hw.max_nan_de_entries = IEEE80211_MAX_NAN_INSTANCE_ID;
  
@@ -289,7 +289,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		}
  	}
  
-@@ -381,9 +378,12 @@ struct sta_info *sta_info_alloc(struct i
+@@ -401,9 +398,12 @@ struct sta_info *sta_info_alloc(struct i
  	if (sta_prepare_rate_control(local, sta, gfp))
  		goto free_txq;
  
@@ -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
+@@ -1837,6 +1837,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,
+@@ -2207,6 +2228,23 @@ void sta_set_sinfo(struct sta_info *sta,
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
  	}
  
@@ -356,7 +356,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		for_each_possible_cpu(cpu) {
 --- a/net/mac80211/sta_info.h
 +++ b/net/mac80211/sta_info.h
-@@ -127,6 +127,16 @@ enum ieee80211_agg_stop_reason {
+@@ -129,6 +129,16 @@ enum ieee80211_agg_stop_reason {
  	AGG_STOP_DESTROY_STA,
  };
  
@@ -373,7 +373,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  struct sta_info;
  
  /**
-@@ -563,6 +573,9 @@ struct sta_info {
+@@ -594,6 +604,9 @@ struct sta_info {
  	} tx_stats;
  	u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1];
  
@@ -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
+@@ -827,6 +827,12 @@ static void __ieee80211_tx_status(struct
  			ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data,
  						acked, info->status.tx_time);
  
@@ -396,11 +396,11 @@ 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
-@@ -1463,8 +1463,11 @@ void ieee80211_txq_purge(struct ieee8021
+@@ -1469,8 +1469,11 @@ void ieee80211_txq_purge(struct ieee8021
  	struct fq *fq = &local->fq;
  	struct fq_tin *tin = &txqi->tin;
  
@@ -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
+@@ -3662,11 +3665,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
+@@ -3684,12 +3704,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
+@@ -3724,6 +3724,19 @@ void ieee80211_return_txq(struct ieee802
  }
  EXPORT_SYMBOL(ieee80211_return_txq);
  

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

@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -179,6 +179,7 @@ struct ieee80211_tx_data {
+@@ -161,6 +161,7 @@ struct ieee80211_tx_data {
  	struct ieee80211_tx_rate rate;
  
  	unsigned int flags;
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -925,7 +925,7 @@ ieee80211_tx_h_fragment(struct ieee80211
+@@ -931,7 +931,7 @@ ieee80211_tx_h_fragment(struct ieee80211
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  	struct ieee80211_hdr *hdr = (void *)skb->data;
  	int frag_threshold = tx->local->hw.wiphy->frag_threshold;
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	int fragnum;
  
  	/* no matter what happens, tx->skb moves to tx->skbs */
-@@ -946,8 +946,6 @@ ieee80211_tx_h_fragment(struct ieee80211
+@@ -952,8 +952,6 @@ ieee80211_tx_h_fragment(struct ieee80211
  	if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
  		return TX_DROP;
  
@@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	/* internal error, why isn't DONTFRAG set? */
  	if (WARN_ON(skb->len + FCS_LEN <= frag_threshold))
  		return TX_DROP;
-@@ -1178,6 +1176,8 @@ ieee80211_tx_prepare(struct ieee80211_su
+@@ -1184,6 +1182,8 @@ ieee80211_tx_prepare(struct ieee80211_su
  
  	hdr = (struct ieee80211_hdr *) skb->data;
  
@@ -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:
+@@ -3556,6 +3556,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:
+@@ -3600,7 +3601,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
+@@ -4059,6 +4060,7 @@ ieee80211_build_data_template(struct iee
  	hdr = (void *)skb->data;
  	tx.sta = sta_info_get(sdata, hdr->addr1);
  	tx.skb = skb;
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		rcu_read_unlock();
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
-@@ -1396,6 +1396,7 @@ void ieee80211_send_auth(struct ieee8021
+@@ -1398,6 +1398,7 @@ void ieee80211_send_auth(struct ieee8021
  	struct ieee80211_local *local = sdata->local;
  	struct sk_buff *skb;
  	struct ieee80211_mgmt *mgmt;
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	int err;
  
  	/* 24 + 6 = header + auth_algo + auth_transaction + status_code */
-@@ -1419,8 +1420,10 @@ void ieee80211_send_auth(struct ieee8021
+@@ -1421,8 +1422,10 @@ void ieee80211_send_auth(struct ieee8021
  		skb_put_data(skb, extra, extra_len);
  
  	if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) {
@@ -164,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  			       size_t klen, u8 *data, size_t data_len);
 --- a/net/mac80211/wpa.c
 +++ b/net/mac80211/wpa.c
-@@ -44,7 +44,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
+@@ -45,7 +45,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
  	    skb->len < 24 || !ieee80211_is_data_present(hdr->frame_control))
  		return TX_CONTINUE;
  
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (skb->len < hdrlen)
  		return TX_DROP;
  
-@@ -195,7 +195,6 @@ mic_fail_no_key:
+@@ -196,7 +196,6 @@ mic_fail_no_key:
  
  static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
  {
@@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	struct ieee80211_key *key = tx->key;
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  	unsigned int hdrlen;
-@@ -210,7 +209,7 @@ static int tkip_encrypt_skb(struct ieee8
+@@ -211,7 +210,7 @@ static int tkip_encrypt_skb(struct ieee8
  		return 0;
  	}
  
@@ -190,7 +190,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	len = skb->len - hdrlen;
  
  	if (info->control.hw_key)
-@@ -428,7 +427,7 @@ static int ccmp_encrypt_skb(struct ieee8
+@@ -429,7 +428,7 @@ static int ccmp_encrypt_skb(struct ieee8
  		return 0;
  	}
  
@@ -199,7 +199,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	len = skb->len - hdrlen;
  
  	if (info->control.hw_key)
-@@ -660,7 +659,7 @@ static int gcmp_encrypt_skb(struct ieee8
+@@ -666,7 +665,7 @@ static int gcmp_encrypt_skb(struct ieee8
  		return 0;
  	}
  
@@ -208,7 +208,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	len = skb->len - hdrlen;
  
  	if (info->control.hw_key)
-@@ -800,7 +799,6 @@ static ieee80211_tx_result
+@@ -811,7 +810,6 @@ static ieee80211_tx_result
  ieee80211_crypto_cs_encrypt(struct ieee80211_tx_data *tx,
  			    struct sk_buff *skb)
  {
@@ -216,7 +216,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	struct ieee80211_key *key = tx->key;
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  	int hdrlen;
-@@ -816,8 +814,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8
+@@ -827,8 +825,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8
  		     pskb_expand_head(skb, iv_len, 0, GFP_ATOMIC)))
  		return TX_DROP;
  

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

@@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   * mac80211 is capable of taking advantage of many hardware
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1871,6 +1871,10 @@ int ieee80211_if_add(struct ieee80211_lo
+@@ -1873,6 +1873,10 @@ int ieee80211_if_add(struct ieee80211_lo
  					+ 8 /* rfc1042/bridge tunnel */
  					- ETH_HLEN /* ethernet hard_header_len */
  					+ IEEE80211_ENCRYPT_HEADROOM;
@@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		ret = dev_alloc_name(ndev, ndev->name);
 --- a/net/mac80211/mesh_pathtbl.c
 +++ b/net/mac80211/mesh_pathtbl.c
-@@ -105,13 +105,15 @@ void mesh_path_assign_nexthop(struct mes
+@@ -109,13 +109,15 @@ void mesh_path_assign_nexthop(struct mes
  static void prepare_for_gate(struct sk_buff *skb, char *dst_addr,
  			     struct mesh_path *gate_mpath)
  {
@@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (!(mshdr->flags & MESH_FLAGS_AE)) {
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -2597,7 +2597,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2702,7 +2702,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
  	struct ieee80211_local *local = rx->local;
  	struct ieee80211_sub_if_data *sdata = rx->sdata;
  	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	int tailroom = 0;
  
  	hdr = (struct ieee80211_hdr *) skb->data;
-@@ -2690,7 +2690,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2795,7 +2795,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
  	if (sdata->crypto_tx_tailroom_needed_cnt)
  		tailroom = IEEE80211_ENCRYPT_TAILROOM;
  
@@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  				       sdata->encrypt_headroom,
  				  tailroom, GFP_ATOMIC);
  	if (!fwd_skb)
-@@ -2722,6 +2724,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2827,6 +2829,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
  		return RX_DROP_MONITOR;
  	}
  
@@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   out:
 --- a/net/mac80211/sta_info.h
 +++ b/net/mac80211/sta_info.h
-@@ -311,7 +311,7 @@ struct ieee80211_fast_tx {
+@@ -313,7 +313,7 @@ struct ieee80211_fast_tx {
  	u8 hdr_len;
  	u8 sa_offs, da_offs, pn_offs;
  	u8 band;
@@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	struct rcu_head rcu_head;
 --- a/net/mac80211/status.c
 +++ b/net/mac80211/status.c
-@@ -515,6 +515,7 @@ static void ieee80211_report_used_skb(st
+@@ -514,6 +514,7 @@ static void ieee80211_report_used_skb(st
  {
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  	struct ieee80211_hdr *hdr = (void *)skb->data;
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	bool acked = info->flags & IEEE80211_TX_STAT_ACK;
  
  	if (dropped)
-@@ -531,7 +532,7 @@ static void ieee80211_report_used_skb(st
+@@ -530,7 +531,7 @@ static void ieee80211_report_used_skb(st
  			skb->dev = NULL;
  		} else {
  			unsigned int hdr_size =
@@ -176,7 +176,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  			/* Check to see if packet is a TDLS teardown packet */
  			if (ieee80211_is_data(hdr->frame_control) &&
-@@ -655,9 +656,22 @@ void ieee80211_tx_monitor(struct ieee802
+@@ -654,9 +655,22 @@ void ieee80211_tx_monitor(struct ieee802
  	struct sk_buff *skb2;
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  	struct ieee80211_sub_if_data *sdata;
@@ -217,7 +217,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -1175,8 +1175,7 @@ ieee80211_tx_prepare(struct ieee80211_su
+@@ -1181,8 +1181,7 @@ ieee80211_tx_prepare(struct ieee80211_su
  	info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING;
  
  	hdr = (struct ieee80211_hdr *) skb->data;
@@ -227,7 +227,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (likely(sta)) {
  		if (!IS_ERR(sta))
-@@ -2222,7 +2221,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
+@@ -2243,7 +2242,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
  		goto fail;
  
  	hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
@@ -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
+@@ -2462,7 +2461,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
+@@ -2761,7 +2760,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
+@@ -2794,6 +2795,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
+@@ -2970,6 +2974,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:
+@@ -3556,7 +3562,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
+@@ -4060,7 +4066,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);
+@@ -3668,16 +3668,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
+@@ -3694,21 +3695,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
+@@ -3728,18 +3733,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
+@@ -3752,7 +3746,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
+@@ -3782,34 +3776,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]);

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

@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/mesh_hwmp.c
 +++ b/net/mac80211/mesh_hwmp.c
-@@ -1115,16 +1115,13 @@ int mesh_nexthop_resolve(struct ieee8021
+@@ -1122,16 +1122,13 @@ int mesh_nexthop_resolve(struct ieee8021
  	struct mesh_path *mpath;
  	struct sk_buff *skb_to_free = NULL;
  	u8 *target_addr = hdr->addr3;
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	/* no nexthop found, start resolving */
  	mpath = mesh_path_lookup(sdata, target_addr);
-@@ -1132,8 +1129,7 @@ int mesh_nexthop_resolve(struct ieee8021
+@@ -1139,8 +1136,7 @@ int mesh_nexthop_resolve(struct ieee8021
  		mpath = mesh_path_add(sdata, target_addr);
  		if (IS_ERR(mpath)) {
  			mesh_path_discard_frame(sdata, skb);
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		}
  	}
  
-@@ -1146,13 +1142,10 @@ int mesh_nexthop_resolve(struct ieee8021
+@@ -1154,13 +1150,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
+@@ -1180,13 +1173,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
+@@ -1201,12 +1191,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);
@@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  void mesh_path_timer(struct timer_list *t)
 --- a/net/mac80211/mesh_pathtbl.c
 +++ b/net/mac80211/mesh_pathtbl.c
-@@ -219,7 +219,7 @@ static struct mesh_path *mpath_lookup(st
+@@ -223,7 +223,7 @@ static struct mesh_path *mpath_lookup(st
  {
  	struct mesh_path *mpath;
  

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

@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	flow->backlog += skb->len;
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -1390,11 +1390,15 @@ static void ieee80211_txq_enqueue(struct
+@@ -1396,11 +1396,15 @@ static void ieee80211_txq_enqueue(struct
  {
  	struct fq *fq = &local->fq;
  	struct fq_tin *tin = &txqi->tin;
@@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  
  static bool fq_vlan_filter_func(struct fq *fq, struct fq_tin *tin,
-@@ -1564,7 +1568,6 @@ static bool ieee80211_queue_skb(struct i
+@@ -1570,7 +1574,6 @@ static bool ieee80211_queue_skb(struct i
  				struct sta_info *sta,
  				struct sk_buff *skb)
  {
@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	struct ieee80211_vif *vif;
  	struct txq_info *txqi;
  
-@@ -1582,9 +1585,7 @@ static bool ieee80211_queue_skb(struct i
+@@ -1588,9 +1591,7 @@ static bool ieee80211_queue_skb(struct i
  	if (!txqi)
  		return false;
  
@@ -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
+@@ -3223,6 +3224,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
+@@ -3245,6 +3247,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
+@@ -3252,7 +3256,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
+@@ -3538,6 +3538,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
+@@ -3554,11 +3555,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:
+@@ -3622,8 +3624,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:
+@@ -3662,6 +3667,7 @@ begin:
  	}
  
  	IEEE80211_SKB_CB(skb)->control.vif = vif;

+ 1 - 1
package/kernel/mac80211/patches/subsys/356-mac80211-set-NETIF_F_LLTX-when-using-intermediate-tx.patch

@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1301,6 +1301,7 @@ static void ieee80211_if_setup(struct ne
+@@ -1297,6 +1297,7 @@ static void ieee80211_if_setup(struct ne
  static void ieee80211_if_setup_no_queue(struct net_device *dev)
  {
  	ieee80211_if_setup(dev);

+ 36 - 23
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
+@@ -1750,6 +1750,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);
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
 --- a/net/mac80211/status.c
 +++ b/net/mac80211/status.c
-@@ -672,6 +672,11 @@ void ieee80211_tx_monitor(struct ieee802
+@@ -671,6 +671,11 @@ void ieee80211_tx_monitor(struct ieee802
  		}
  	}
  
@@ -50,33 +50,39 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) {
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -1914,37 +1914,53 @@ static bool ieee80211_tx(struct ieee8021
+@@ -1920,42 +1920,53 @@ static bool ieee80211_tx(struct ieee8021
  }
  
  /* device xmit handlers */
 -
+-enum ieee80211_encrypt {
+-	ENCRYPT_NO,
+-	ENCRYPT_MGMT,
+-	ENCRYPT_DATA,
+-};
+-
 -static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
 -				struct sk_buff *skb,
--				int head_need, bool may_encrypt)
+-				int head_need,
+-				enum ieee80211_encrypt encrypt)
 +int ieee80211_skb_resize(struct ieee80211_local *local,
 +			 struct ieee80211_sub_if_data *sdata,
 +			 struct sk_buff *skb, int hdr_len, int hdr_extra)
  {
 -	struct ieee80211_local *local = sdata->local;
-+	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- 	struct ieee80211_hdr *hdr;
 -	bool enc_tailroom;
 -	int tail_need = 0;
 -
--	hdr = (struct ieee80211_hdr *) skb->data;
--	enc_tailroom = may_encrypt &&
--		       (sdata->crypto_tx_tailroom_needed_cnt ||
--			ieee80211_is_mgmt(hdr->frame_control));
+-	enc_tailroom = encrypt == ENCRYPT_MGMT ||
+-		       (encrypt == ENCRYPT_DATA &&
+-			sdata->crypto_tx_tailroom_needed_cnt);
 -
 -	if (enc_tailroom) {
 -		tail_need = IEEE80211_ENCRYPT_TAILROOM;
 -		tail_need -= skb_tailroom(skb);
 -		tail_need = max_t(int, tail_need, 0);
++	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
++	struct ieee80211_hdr *hdr;
 +	int head_need, head_max;
 +	int tail_need, tail_max;
 +	bool enc_tailroom = false;
@@ -123,27 +129,34 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		wiphy_debug(local->hw.wiphy,
  			    "failed to reallocate TX buffer\n");
  		return -ENOMEM;
-@@ -1960,18 +1976,8 @@ void ieee80211_xmit(struct ieee80211_sub
+@@ -1970,24 +1981,9 @@ void ieee80211_xmit(struct ieee80211_sub
+ {
  	struct ieee80211_local *local = sdata->local;
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- 	struct ieee80211_hdr *hdr;
+-	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 -	int headroom;
--	bool may_encrypt;
+-	enum ieee80211_encrypt encrypt;
+-
+-	if (info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)
+-		encrypt = ENCRYPT_NO;
+-	else if (ieee80211_is_mgmt(hdr->frame_control))
+-		encrypt = ENCRYPT_MGMT;
+-	else
+-		encrypt = ENCRYPT_DATA;
 -
--	may_encrypt = !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT);
- 
 -	headroom = local->tx_headroom;
--	if (may_encrypt)
+-	if (encrypt != ENCRYPT_NO)
 -		headroom += sdata->encrypt_headroom;
 -	headroom -= skb_headroom(skb);
 -	headroom = max_t(int, 0, headroom);
--
--	if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) {
++	struct ieee80211_hdr *hdr;
+ 
+-	if (ieee80211_skb_resize(sdata, skb, headroom, encrypt)) {
 +	if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
  		ieee80211_free_txskb(&local->hw, skb);
  		return;
  	}
-@@ -2740,30 +2746,14 @@ static struct sk_buff *ieee80211_build_h
+@@ -2762,30 +2758,14 @@ static struct sk_buff *ieee80211_build_h
  
  	skb_pull(skb, skip_header_bytes);
  	padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
@@ -167,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -		head_need += sdata->encrypt_headroom;
 -		head_need += local->tx_headroom;
 -		head_need = max_t(int, 0, head_need);
--		if (ieee80211_skb_resize(sdata, skb, head_need, true)) {
+-		if (ieee80211_skb_resize(sdata, skb, head_need, ENCRYPT_DATA)) {
 -			ieee80211_free_txskb(&local->hw, skb);
 -			skb = NULL;
 -			return ERR_PTR(-ENOMEM);
@@ -180,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	}
  
  	if (encaps_data)
-@@ -3375,7 +3365,6 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3408,7 +3388,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,14 +201,14 @@ 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
+@@ -3460,10 +3439,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'
  	 */
 -	if (unlikely(ieee80211_skb_resize(sdata, skb,
 -					  max_t(int, extra_head + hw_headroom -
 -						     skb_headroom(skb), 0),
--					  false))) {
+-					  ENCRYPT_NO))) {
 +	if (unlikely(ieee80211_skb_resize(local, sdata, skb, extra_head, 0))) {
  		kfree_skb(skb);
  		return true;

+ 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:
+@@ -3694,8 +3694,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
+@@ -3703,7 +3704,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
+@@ -3723,7 +3725,7 @@ void ieee80211_schedule_txq(struct ieee8
  
  	spin_unlock_bh(&local->active_txq_lock[txq->ac]);
  }

+ 1 - 1
package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch

@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -1508,7 +1508,15 @@ static void sta_ps_start(struct sta_info
+@@ -1507,7 +1507,15 @@ static void sta_ps_start(struct sta_info
  		return;
  
  	for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {

+ 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)
+@@ -3793,6 +3793,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
+@@ -3806,7 +3807,15 @@ void __ieee80211_subif_start_xmit(struct
  	if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
  		goto out_free;
  

+ 2 - 2
package/kernel/mac80211/patches/subsys/361-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch

@@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  /**
 --- a/net/mac80211/wpa.c
 +++ b/net/mac80211/wpa.c
-@@ -947,7 +947,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct
+@@ -958,7 +958,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct
  
  	info = IEEE80211_SKB_CB(skb);
  
@@ -46,7 +46,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  		return TX_CONTINUE;
  
  	if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
-@@ -963,6 +964,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct
+@@ -974,6 +975,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct
  
  	bip_ipn_set64(mmie->sequence_number, pn64);
  

+ 3 - 3
package/kernel/mac80211/patches/subsys/362-mac80211-minstrel-remove-divisions-in-tx-status-path.patch

@@ -11,9 +11,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/rc80211_minstrel.c
 +++ b/net/mac80211/rc80211_minstrel.c
-@@ -295,8 +295,7 @@ minstrel_tx_status(void *priv, struct ie
- 	if (mi->sample_deferred > 0)
- 		mi->sample_deferred--;
+@@ -289,8 +289,7 @@ minstrel_tx_status(void *priv, struct ie
+ 			mi->r[ndx].stats.success += success;
+ 	}
  
 -	if (time_after(jiffies, mi->last_stats_update +
 -				(mp->update_interval * HZ) / 1000))

+ 5 - 5
package/kernel/mac80211/patches/subsys/363-mac80211-minstrel_ht-replace-rate-stats-ewma-with-a-.patch

@@ -64,9 +64,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  		/* Sample less often below the 10% chance of success.
  		 * Sample less often above the 95% chance of success. */
-@@ -295,7 +299,8 @@ minstrel_tx_status(void *priv, struct ie
- 	if (mi->sample_deferred > 0)
- 		mi->sample_deferred--;
+@@ -289,7 +293,8 @@ minstrel_tx_status(void *priv, struct ie
+ 			mi->r[ndx].stats.success += success;
+ 	}
  
 -	if (time_after(jiffies, mi->last_stats_update + mp->update_interval))
 +	if (time_after(jiffies, mi->last_stats_update +
@@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	/* statistis of packet delivery probability
  	 *  prob_ewma - exponential weighted moving average of prob
  	 *  prob_ewmsd - exp. weighted moving standard deviation of prob */
-@@ -114,6 +166,7 @@ struct minstrel_sta_info {
+@@ -113,6 +165,7 @@ struct minstrel_sta_info {
  struct minstrel_priv {
  	struct ieee80211_hw *hw;
  	bool has_mrr;
@@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	u32 sample_switch;
  	unsigned int cw_min;
  	unsigned int cw_max;
-@@ -153,7 +206,8 @@ extern const struct rate_control_ops mac
+@@ -152,7 +205,8 @@ extern const struct rate_control_ops mac
  void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
  
  /* Recalculate success probabilities and counters for a given rate using EWMA */

+ 3 - 3
package/kernel/mac80211/patches/subsys/364-mac80211-minstrel_ht-rename-prob_ewma-to-prob_avg-us.patch

@@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  				tmp_prob_rate = i;
  		}
  	}
-@@ -436,7 +436,7 @@ minstrel_get_rate(void *priv, struct iee
+@@ -418,7 +418,7 @@ minstrel_get_rate(void *priv, struct iee
  	 * has a probability of >95%, we shouldn't be attempting
  	 * to use it, as this only wastes precious airtime */
  	if (!mrr_capable &&
@@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		return;
  
  	mi->prev_sample = true;
-@@ -587,7 +587,7 @@ static u32 minstrel_get_expected_through
+@@ -570,7 +570,7 @@ static u32 minstrel_get_expected_through
  	 * computing cur_tp
  	 */
  	tmp_mrs = &mi->r[idx].stats;
@@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	/* maximum retry counts */
  	u8 retry_count;
  	u8 retry_count_rtscts;
-@@ -208,7 +205,7 @@ void minstrel_add_sta_debugfs(void *priv
+@@ -207,7 +204,7 @@ void minstrel_add_sta_debugfs(void *priv
  /* Recalculate success probabilities and counters for a given rate using EWMA */
  void minstrel_calc_rate_stats(struct minstrel_priv *mp,
  			      struct minstrel_rate_stats *mrs);

+ 7 - 7
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
+@@ -2059,7 +2059,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,
@@ -66,7 +66,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  enum {
 --- a/net/mac80211/mlme.c
 +++ b/net/mac80211/mlme.c
-@@ -2203,8 +2203,9 @@ static void ieee80211_set_disassoc(struc
+@@ -2208,8 +2208,9 @@ static void ieee80211_set_disassoc(struc
  		    !ifmgd->have_beacon)
  			drv_mgd_prepare_tx(sdata->local, sdata, 0);
  
@@ -78,7 +78,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  	}
  
  	/* flush out frame - make sure the deauth was actually sent */
-@@ -4369,7 +4370,7 @@ void ieee80211_mgd_quiesce(struct ieee80
+@@ -4381,7 +4382,7 @@ void ieee80211_mgd_quiesce(struct ieee80
  		 * cfg80211 won't know and won't actually abort those attempts,
  		 * thus we need to do that ourselves.
  		 */
@@ -87,7 +87,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  					       IEEE80211_STYPE_DEAUTH,
  					       WLAN_REASON_DEAUTH_LEAVING,
  					       false, frame_buf);
-@@ -5349,7 +5350,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+@@ -5361,7 +5362,7 @@ int ieee80211_mgd_deauth(struct ieee8021
  			   ieee80211_get_reason_code_string(req->reason_code));
  
  		drv_mgd_prepare_tx(sdata->local, sdata, 0);
@@ -96,7 +96,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  					       IEEE80211_STYPE_DEAUTH,
  					       req->reason_code, tx,
  					       frame_buf);
-@@ -5369,7 +5370,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+@@ -5381,7 +5382,7 @@ int ieee80211_mgd_deauth(struct ieee8021
  			   ieee80211_get_reason_code_string(req->reason_code));
  
  		drv_mgd_prepare_tx(sdata->local, sdata, 0);
@@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  					       frame_buf);
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
-@@ -1433,7 +1433,8 @@ void ieee80211_send_auth(struct ieee8021
+@@ -1435,7 +1435,8 @@ void ieee80211_send_auth(struct ieee8021
  }
  
  void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
@@ -117,7 +117,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  				    bool send_frame, u8 *frame_buf)
  {
  	struct ieee80211_local *local = sdata->local;
-@@ -1444,7 +1445,7 @@ void ieee80211_send_deauth_disassoc(stru
+@@ -1446,7 +1447,7 @@ void ieee80211_send_deauth_disassoc(stru
  	mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | stype);
  	mgmt->duration = 0; /* initialize only */
  	mgmt->seq_ctrl = 0; /* initialize only */

+ 1 - 1
package/kernel/mac80211/patches/subsys/367-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch

@@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
 
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -322,6 +322,7 @@ struct sta_info *sta_info_alloc(struct i
+@@ -340,6 +340,7 @@ struct sta_info *sta_info_alloc(struct i
  	INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
  	INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
  	mutex_init(&sta->ampdu_mlme.mtx);

+ 1 - 1
package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch

@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	__NL80211_SURVEY_INFO_AFTER_LAST,
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -8373,6 +8373,10 @@ static int nl80211_send_survey(struct sk
+@@ -8380,6 +8380,10 @@ static int nl80211_send_survey(struct sk
  	    nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN,
  			      survey->time_scan, NL80211_SURVEY_INFO_PAD))
  		goto nla_put_failure;

+ 4 - 4
package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch

@@ -57,7 +57,7 @@
  	__NL80211_ATTR_AFTER_LAST,
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -2456,6 +2456,19 @@ static int ieee80211_get_tx_power(struct
+@@ -2457,6 +2457,19 @@ static int ieee80211_get_tx_power(struct
  	return 0;
  }
  
@@ -77,7 +77,7 @@
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
  				  const u8 *addr)
  {
-@@ -3845,6 +3858,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -3846,6 +3859,7 @@ const struct cfg80211_ops mac80211_confi
  	.set_wiphy_params = ieee80211_set_wiphy_params,
  	.set_tx_power = ieee80211_set_tx_power,
  	.get_tx_power = ieee80211_get_tx_power,
@@ -87,7 +87,7 @@
  	CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1365,6 +1365,7 @@ struct ieee80211_local {
+@@ -1353,6 +1353,7 @@ struct ieee80211_local {
  	int dynamic_ps_forced_timeout;
  
  	int user_power_level; /* in dBm, for all interfaces */
@@ -137,7 +137,7 @@
  };
  
  /* policy for the key attributes */
-@@ -2629,6 +2630,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -2632,6 +2633,20 @@ static int nl80211_set_wiphy(struct sk_b
  		if (result)
  			return result;
  	}

+ 54 - 0
package/libs/libevdev/Makefile

@@ -0,0 +1,54 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libevdev
+PKG_VERSION:=1.6.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://www.freedesktop.org/software/libevdev/
+PKG_HASH:=f5005c865987d980cc1279b9ec6131b06a89fd9892f649f2a68262b8786ef814
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libevdev
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=a wrapper library for evdev devices
+  URL:=https://www.freedesktop.org/wiki/Software/libevdev/
+endef
+
+define Package/libevdev/description
+  libevdev is a wrapper library for evdev devices. it moves the common
+  tasks when dealing with evdev devices into a library and provides a
+  library interface to the callers, thus avoiding erroneous ioctls, etc.
+
+  The eventual goal is that libevdev wraps all ioctls available to
+  evdev devices, thus making direct access unnecessary.
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/include
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libevdev/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libevdev))

+ 14 - 0
package/libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch

@@ -0,0 +1,14 @@
+--- a/test/test-libevdev-init.c
++++ b/test/test-libevdev-init.c
+@@ -32,6 +32,11 @@
+ #include <libevdev/libevdev-uinput.h>
+ #include "test-common.h"
+ 
++/* work-around CLOCK_MONOTONIC_RAW definition missing in uClibc */
++#ifndef CLOCK_MONOTONIC_RAW
++#define CLOCK_MONOTONIC_RAW 4
++#endif
++
+ START_TEST(test_new_device)
+ {
+ 	struct libevdev *dev;

+ 21 - 5
package/libs/libgpg-error/Makefile

@@ -8,22 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgpg-error
-PKG_VERSION:=1.36
-PKG_RELEASE:=3
+PKG_VERSION:=1.42
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \
 		http://ring.ksc.gr.jp/archives/net/gnupg/libgpg-error \
 		https://www.gnupg.org/ftp/gcrypt/libgpg-error
-PKG_HASH:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c
+PKG_HASH:=fc07e70f6c615f8c4f590a8e37a9b8dd2e2ca1e9408f8e60459c67452b925e23
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -60,11 +60,23 @@ define Build/InstallDev
 		$(2)/bin/gpg-error-config
 	ln -sf $(STAGING_DIR)/host/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
 
+	$(INSTALL_BIN) \
+		$(PKG_INSTALL_DIR)/usr/bin/gpgrt-config \
+		$(2)/bin/
+	$(SED) \
+		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+		$(2)/bin/gpgrt-config
+	ln -sf $(STAGING_DIR)/host/bin/gpgrt-config $(1)/usr/bin/gpgrt-config
+
 	$(INSTALL_DIR) $(1)/usr/include
 	$(INSTALL_DATA) \
 		$(PKG_INSTALL_DIR)/usr/include/gpg-error.h \
 		$(1)/usr/include/
 
+	$(INSTALL_DATA) \
+		$(PKG_INSTALL_DIR)/usr/include/gpgrt.h \
+		$(1)/usr/include/
+
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) \
 		$(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{la,a,so*} \
@@ -74,6 +86,10 @@ define Build/InstallDev
 	$(INSTALL_DATA) \
 		$(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 \
 		$(1)/usr/share/aclocal/
+
+	$(INSTALL_DATA) \
+		$(PKG_INSTALL_DIR)/usr/share/aclocal/gpgrt.m4 \
+		$(1)/usr/share/aclocal/
 endef
 
 define Package/libgpg-error/install

+ 0 - 7
package/libs/libgpg-error/patches/010-add-arc-support.patch

@@ -26,8 +26,6 @@ Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
  2 files changed, 24 insertions(+)
  create mode 100644 src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
 
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 380ea7c09c04..bd00961c2f27 100644
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
 @@ -48,6 +48,7 @@ lock_obj_pub = \
@@ -38,9 +36,6 @@ index 380ea7c09c04..bd00961c2f27 100644
          syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h \
          syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h     \
  	syscfg/lock-obj-pub.arm-apple-darwin.h              \
-diff --git a/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
-new file mode 100644
-index 000000000000..3b1a8fadf8a7
 --- /dev/null
 +++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
 @@ -0,0 +1,23 @@
@@ -67,5 +62,3 @@ index 000000000000..3b1a8fadf8a7
 +## buffer-read-only: t
 +## End:
 +##
--- 
-2.17.1

+ 27 - 0
package/libs/libgpg-error/patches/020-build-fix-generation.patch

@@ -0,0 +1,27 @@
+From 33593864cd54143db594c4237bba41e14179061c Mon Sep 17 00:00:00 2001
+From: David Michael <fedora.dm0@gmail.com>
+Date: Fri, 26 Mar 2021 16:06:50 +0900
+Subject: [PATCH 1/2] build: Fix generation of lock-obj-pub.native.h for cross
+ build.
+
+* src/gen-lock-obj.sh: Capture echo output with quotes.
+
+--
+
+Fixes-commit: 99ae862a96a569724f49a604ebb7d3f6d2c2d374
+Signed-off-by: David Michael <fedora.dm0@gmail.com>
+---
+ src/gen-lock-obj.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/gen-lock-obj.sh
++++ b/src/gen-lock-obj.sh
+@@ -38,7 +38,7 @@
+ #     AWK=gawk ./gen-lock-obj.sh
+ #
+ 
+-if test -n `echo -n`; then
++if test -n "`echo -n`"; then
+     ECHO_C='\c'
+     ECHO_N=''
+ else

+ 0 - 158
package/libs/libgpg-error/patches/020-gawk5-support.patch

@@ -1,158 +0,0 @@
-From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
-From: NIIBE Yutaka <gniibe@fsij.org>
-Date: Mon, 15 Apr 2019 15:10:44 +0900
-Subject: [PATCH] awk: Prepare for Gawk 5.0.
-
-* src/Makefile.am: Use pkg_namespace (instead of namespace).
-* src/mkerrnos.awk: Likewise.
-* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
-* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
-
---
-
-In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
-which only allows escaping specific characters.
-
-GnuPG-bug-id: 4459
-Reported-by: Marius Schamschula
-Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
----
- lang/cl/mkerrcodes.awk |  2 +-
- src/Makefile.am        |  2 +-
- src/mkerrcodes.awk     |  2 +-
- src/mkerrcodes1.awk    |  2 +-
- src/mkerrcodes2.awk    |  2 +-
- src/mkerrnos.awk       |  2 +-
- src/mkstrtable.awk     | 10 +++++-----
- 7 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
-index ae29043..9a1fc18 100644
---- a/lang/cl/mkerrcodes.awk
-+++ b/lang/cl/mkerrcodes.awk
-@@ -122,7 +122,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/Makefile.am b/src/Makefile.am
-index ce1b882..f2590cb 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
- 
- errnos-sym.h: Makefile mkstrtable.awk errnos.in
- 	$(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
--		-v prefix=GPG_ERR_ -v namespace=errnos_ \
-+		-v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
- 		$(srcdir)/errnos.in >$@
- 
- 
-diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
-index 46d436c..e9c857c 100644
---- a/src/mkerrcodes.awk
-+++ b/src/mkerrcodes.awk
-@@ -85,7 +85,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
-index a771a73..4578e29 100644
---- a/src/mkerrcodes1.awk
-+++ b/src/mkerrcodes1.awk
-@@ -81,7 +81,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
-index ea58503..188f7a4 100644
---- a/src/mkerrcodes2.awk
-+++ b/src/mkerrcodes2.awk
-@@ -91,7 +91,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
-index f79df66..15b1aad 100644
---- a/src/mkerrnos.awk
-+++ b/src/mkerrnos.awk
-@@ -83,7 +83,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
-index c9de9c1..285e45f 100644
---- a/src/mkstrtable.awk
-+++ b/src/mkstrtable.awk
-@@ -77,7 +77,7 @@
- #
- # The variable prefix can be used to prepend a string to each message.
- #
--# The variable namespace can be used to prepend a string to each
-+# The variable pkg_namespace can be used to prepend a string to each
- # variable and macro name.
- 
- BEGIN {
-@@ -102,7 +102,7 @@ header {
-       print "/* The purpose of this complex string table is to produce";
-       print "   optimal code with a minimum of relocations.  */";
-       print "";
--      print "static const char " namespace "msgstr[] = ";
-+      print "static const char " pkg_namespace "msgstr[] = ";
-       header = 0;
-     }
-   else
-@@ -110,7 +110,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-@@ -150,7 +150,7 @@ END {
-   else
-     print "  gettext_noop (\"" last_msgstr "\");";
-   print "";
--  print "static const int " namespace "msgidx[] =";
-+  print "static const int " pkg_namespace "msgidx[] =";
-   print "  {";
-   for (i = 0; i < coded_msgs; i++)
-     print "    " pos[i] ",";
-@@ -158,7 +158,7 @@ END {
-   print "  };";
-   print "";
-   print "static GPG_ERR_INLINE int";
--  print namespace "msgidxof (int code)";
-+  print pkg_namespace "msgidxof (int code)";
-   print "{";
-   print "  return (0 ? 0";
- 
--- 
-2.21.0
-

+ 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)
+ 	{

+ 2 - 3
package/libs/libpcap/Makefile

@@ -12,15 +12,14 @@ PKG_VERSION:=1.9.1
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
-        http://www.tcpdump.org/release/
+PKG_SOURCE_URL:=http://www.tcpdump.org/release/
 PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
 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

+ 0 - 60
package/libs/libtirpc/Makefile

@@ -1,60 +0,0 @@
-# 
-# Copyright (C) 2006-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libtirpc
-PKG_VERSION:=1.1.4
-PKG_RELEASE:=1
-
-PKG_SOURCE_URL:=https://librecmc.org/librecmc/downloads/sources/v1.4
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d
-
-PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
-PKG_LICENSE:=BSD-3-Clause
-
-PKG_FIXUP:=autoreconf
-PKG_REMOVE_FILES:=autogen.sh aclocal.m4
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
-define Package/libtirpc
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=Library TI RPC for RPC bindings
-  URL:=http://libtirpc.sourceforge.net/
-  DEPENDS:=+libpthread
-endef
-
-CONFIGURE_ARGS += --disable-gssapi
-HOST_CONFIGURE_ARGS += --disable-gssapi
-
-TARGET_CFLAGS += -DGQ
-HOST_CFLAGS += -DGQ
-
-define Package/libtirpc/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.so* $(1)/usr/lib/
-	$(INSTALL_DIR) $(1)/etc
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/netconfig $(1)/etc/
-endef
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.{a,so*} $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
-	$(SED) 's,/usr,${STAGING_DIR}/usr,g' $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc $(1)/usr/lib/pkgconfig/libtirpc.pc
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,libtirpc))

+ 0 - 18
package/libs/libtirpc/patches/001-musl.patch

@@ -1,18 +0,0 @@
-Consider musl provided built-in defines
-
-Helps compile libtirpc with musl
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- ./tirpc/rpc/types.h.orig	2018-03-17 10:23:10.022055255 +0100
-+++ ./tirpc/rpc/types.h	2018-03-17 10:23:30.877751656 +0100
-@@ -66,7 +66,7 @@
- #define mem_free(ptr, bsize)	free(ptr)
- 
- 
--#if defined __APPLE_CC__ || defined __FreeBSD__
-+#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
- # define __u_char_defined
- # define __daddr_t_defined
- #endif

+ 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

+ 51 - 0
package/libs/libudev-fbsd/Makefile

@@ -0,0 +1,51 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libudev-fbsd
+
+PKG_RELEASE:=1
+PKG_VERSION:=20171216
+PKG_SOURCE_VERSION:=fa190fdf0b22a41b5f42e3a722f754c08ad7b337
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=d4638099fd288a293a165304541eb9c01e828bb358a0091caa02c1327c20964b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/jiixyj/libudev-fbsd.git
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libudev-fbsd
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=small udev shim for FreeBSD/devd (and other non-systemd)
+  URL:=https://github.com/jiixyj/libudev-fbsd
+  DEPENDS:=+libevdev
+  PROVIDES:=libudev
+  CONFLICTS:=libudev eudev udev
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/include
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libudev-fbsd/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libudev-fbsd))

+ 20 - 0
package/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch

@@ -0,0 +1,20 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -26,6 +26,7 @@ install(TARGETS udev LIBRARY DESTINATION
+ install(FILES libudev.h DESTINATION include)
+ 
+ set(PKG_CONFIG_NAME libudev)
++set(PKG_CONFIG_DESCRIPTION small udev shim for FreeBSD/devd)
+ set(PKG_CONFIG_REQUIRES libevdev)
+ set(PKG_CONFIG_LIBDIR "\${prefix}/lib")
+ set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include")
+--- a/src/pkg-config.pc.cmake
++++ b/src/pkg-config.pc.cmake
+@@ -3,6 +3,7 @@ libdir=${PKG_CONFIG_LIBDIR}
+ includedir=${PKG_CONFIG_INCLUDEDIR}
+ 
+ Name: ${PKG_CONFIG_NAME}
++Description: ${PKG_CONFIG_DESCRIPTION}
+ Version: 143
+ Requires: ${PKG_CONFIG_REQUIRES}
+ Libs: ${PKG_CONFIG_LIBS}

+ 25 - 0
package/libs/libudev-fbsd/patches/005-extern-c.patch

@@ -0,0 +1,25 @@
+--- a/src/libudev.h
++++ b/src/libudev.h
+@@ -7,6 +7,11 @@
+ extern "C" {
+ #endif
+ 
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ struct udev;
+ struct udev_device;
+ struct udev_list_entry;
+@@ -76,6 +81,10 @@ void udev_monitor_unref(struct udev_moni
+ 
+ #ifdef __cplusplus
+ } /* extern "C" */
++#endif
++
++#ifdef __cplusplus
++} /* extern "C" */
+ #endif
+ 
+ #endif

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