openwrt/openwrt.git
3 years agoath10k-ct: switch to 5.10
Álvaro Fernández Rojas [Mon, 15 Feb 2021 12:52:23 +0000 (13:52 +0100)]
ath10k-ct: switch to 5.10

Let's switch to 5.10 now that mac80211 has been updated.
Runtime-tested on ipq806x (Netgear R7800).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm4908: add bcm_sf2 fixes for the 5th GPHY
Rafał Miłecki [Mon, 15 Feb 2021 23:21:28 +0000 (00:21 +0100)]
bcm4908: add bcm_sf2 fixes for the 5th GPHY

This allows using the last integrated PHY (and so e.g. WAN port on the
ASUS GT-AC5300).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobuild: IS_TTY is now set according to GNU Make's MAKE_TERMOUT
R. Diez [Wed, 10 Jun 2020 09:33:26 +0000 (11:33 +0200)]
build: IS_TTY is now set according to GNU Make's MAKE_TERMOUT

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Fixes: FS#2086
The logic for IS_TTY was broken, because it was testing stdin
instead of stdout.
MAKE_TERMOUT was introduced in GNU Make version 4.1 (05 Oct 2014),
so it should be available everywhere nowadays.

Signed-off-by: R. Diez <rdiezmail-openwrt@yahoo.com>
3 years agobuild/prereq: require make 4.1 or later
Paul Spooren [Sun, 13 Dec 2020 06:57:21 +0000 (20:57 -1000)]
build/prereq: require make 4.1 or later

FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
stdout piping to a file. The issue describes how e.g. terminal color
codes and up in log files if running make like `make > log.txt`.

The proposed solution uses the make variable "MAKE_TERMOUT", which was
introduced in make 4.1. All major distributions seem to updated to 4.1
or later, so this ideally dosen't break anything.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoutil-linux: move libuuid BuildPackage line further up to fix ABI versioning
Felix Fietkau [Mon, 15 Feb 2021 22:59:18 +0000 (23:59 +0100)]
util-linux: move libuuid BuildPackage line further up to fix ABI versioning

After the ABI version rework, packages need to be declared in the order of
their dependencies, so that dependent packages will use the right ABI version

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: fix getting ABI version for binary packages from the same source package
Felix Fietkau [Mon, 15 Feb 2021 22:09:53 +0000 (23:09 +0100)]
build: fix getting ABI version for binary packages from the same source package

We can't rely on the .version file being created yet, so use package variables
to get it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: Update to version 5.10.16-1
Hauke Mehrtens [Sun, 14 Feb 2021 18:06:45 +0000 (19:06 +0100)]
mac80211: Update to version 5.10.16-1

The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agomac80211: Refresh patches again
Hauke Mehrtens [Mon, 15 Feb 2021 21:23:17 +0000 (22:23 +0100)]
mac80211: Refresh patches again

A wrong quilt configuration was used last time.

Fixes: ed1e234d87fc ("mac80211: refresh patches")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agobcm4908: fix GPIOs support by limiting them to 64
Rafał Miłecki [Mon, 15 Feb 2021 21:18:01 +0000 (22:18 +0100)]
bcm4908: fix GPIOs support by limiting them to 64

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: use DTS patches sent upstream
Rafał Miłecki [Mon, 15 Feb 2021 20:51:37 +0000 (21:51 +0100)]
bcm4908: use DTS patches sent upstream

There are 2 new patches:
1. Netgear R8000P switch ports
2. Netgear R8000P LEDs

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobuild: filter out own packages on package version check
Felix Fietkau [Mon, 15 Feb 2021 20:09:49 +0000 (21:09 +0100)]
build: filter out own packages on package version check

This was accidentally dropped in 27a4a71c2408
("metadata: handle ABI version rebuild tracking for transient dependencies")

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agotools/fakeroot: fix build regression on macOS
Felix Fietkau [Mon, 15 Feb 2021 18:58:54 +0000 (19:58 +0100)]
tools/fakeroot: fix build regression on macOS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agolibubox: update to the latest version, set ABI_VERSION dynamically
Felix Fietkau [Mon, 15 Feb 2021 18:18:10 +0000 (19:18 +0100)]
libubox: update to the latest version, set ABI_VERSION dynamically

2537be018587 cmake: add a possibility to set library version

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: only overwrite ABI version for provided packages when base version changed
Felix Fietkau [Mon, 15 Feb 2021 17:53:42 +0000 (18:53 +0100)]
build: only overwrite ABI version for provided packages when base version changed

Should avoid some spurious rebuilds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoMostly revert "build: add support for fixing up library soname"
Felix Fietkau [Mon, 15 Feb 2021 16:49:46 +0000 (17:49 +0100)]
Mostly revert "build: add support for fixing up library soname"

This reverts commit b12288fa69b171f7c9405518c9bed3581a06f7ce.
The patchelf approach is too fragile, and the only users of this have been
converted to make patching unnecessary
Leave the abi_version_str variable in place in rules.mk

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agowolfssl: use libtool patch for PKG_ABI_VERSION
Felix Fietkau [Mon, 15 Feb 2021 17:46:59 +0000 (18:46 +0100)]
wolfssl: use libtool patch for PKG_ABI_VERSION

Makes it unnecessary to patch .so files after build

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: add support for patching libtool to include ABI version in soname
Felix Fietkau [Mon, 15 Feb 2021 17:46:11 +0000 (18:46 +0100)]
build: add support for patching libtool to include ABI version in soname

Use the version from PKG_ABI_VERSION

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agolibubox: use build system variable to specify ABI version
Felix Fietkau [Mon, 15 Feb 2021 17:07:51 +0000 (18:07 +0100)]
libubox: use build system variable to specify ABI version

This removes the need to patch it afterwards

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobcm4908: add USB packages to the DEFAULT_PACKAGES
Rafał Miłecki [Mon, 15 Feb 2021 15:52:29 +0000 (16:52 +0100)]
bcm4908: add USB packages to the DEFAULT_PACKAGES

All known 41 BCM4908 devices have USB ports so it makes sense to include
those packages by default.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: fix backport of PMB driver
Rafał Miłecki [Mon, 15 Feb 2021 15:51:38 +0000 (16:51 +0100)]
bcm4908: fix backport of PMB driver

Missing Makefile change was preventing kernel from actually compiling
the driver.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: drop ofpart patch dropped from upstream mtd tree
Rafał Miłecki [Mon, 15 Feb 2021 14:05:52 +0000 (15:05 +0100)]
kernel: drop ofpart patch dropped from upstream mtd tree

It stopped ofpart_parser_init() from being called

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: backport "ofpart" mtd parser upstream quirks support
Rafał Miłecki [Mon, 15 Feb 2021 10:47:17 +0000 (11:47 +0100)]
kernel: backport "ofpart" mtd parser upstream quirks support

This adds quirks support to the "ofpart" parser. It's required to
support fixed partitions that require some extra logic.

Right now only BCM4908 binding is supported (BCM4908 requires detecting
currently used "firmware" partition).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: fix busy wait loop in mediatek PPE code
Ilya Lipnitskiy [Mon, 8 Feb 2021 04:17:12 +0000 (20:17 -0800)]
kernel: fix busy wait loop in mediatek PPE code

The intention is for the loop to timeout if the body does not succeed.
The current logic calls time_is_before_jiffies(timeout) which is false
until after the timeout, so the loop body never executes.

time_is_after_jiffies(timeout) will return true until timeout is less
than jiffies, which is the intended behavior here.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
3 years agowolfssl: use dynamic ABI_VERSION depending on the configuration and package version
Felix Fietkau [Fri, 12 Feb 2021 10:36:47 +0000 (11:36 +0100)]
wolfssl: use dynamic ABI_VERSION depending on the configuration and package version

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agolibubox: use PKG_ABI_VERSION
Felix Fietkau [Fri, 12 Feb 2021 09:10:41 +0000 (10:10 +0100)]
libubox: use PKG_ABI_VERSION

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agofakeroot: fix to work with glibc 2.33
Ilya Lipnitskiy [Sun, 14 Feb 2021 04:41:03 +0000 (20:41 -0800)]
fakeroot: fix to work with glibc 2.33

The following commit removed _STAT_VER definitions from glibc:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8ed005daf0ab03e142500324a34087ce179ae78e

That subsequently broke fakeroot:
https://bugs.archlinux.org/task/69572
https://bugzilla.redhat.com/show_bug.cgi?id=1889862#c13
https://forum.openwrt.org/t/unable-to-build-toolchain-fakeroot-fails-perhaps-others-after-it/87966

Make the patch based on Jan Pazdziora's suggestion from here:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/

Add wrappers for newly exported symbols in glibc.

Apply patch from Debian to fix warnings in fts_read and fts_children:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676428
https://sources.debian.org/patches/fakeroot/1.25.3-1.1/eglibc-fts-without-LFS/

Fix __xmknod{,at} dev pointer argument. Switch default to assume * and
not the absence of *. On glibc 2.33+, there is no definition for these
functions in header files, so the compile test doesn't work. But, we
can default to using the pointer (as is the case with newer glibc), and
use the header file on older platforms to fail the test and use no pointer.

Tested on my x86_64 Arch Linux machine, fakeroot unit tests pass.
Also tested by building various .ipks and examining the tar contents, to
ensure that the owner uid/gid was 0/0.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
3 years agotools/patchelf: bump to use latest master
Ilya Lipnitskiy [Mon, 15 Feb 2021 00:46:23 +0000 (16:46 -0800)]
tools/patchelf: bump to use latest master

Recent ABI_VERSION commits make use of patchelf. It was discovered that
with patchelf 0.10(and even 0.12) various big endian targets fail to
link against libubox SO that was processed through patchelf. Using
latest master patchelf fixes those link errors.

Potential commits affecting big-endian processing
https://github.com/NixOS/patchelf/commit/884eccc4f061a3dbdbe63a4c73f1cc9bbf77fa7d
https://github.com/NixOS/patchelf/commit/d148bae6c1291b93d660a156a1756670069cd8cc

Recent builds with failures:
http://buildbot.openwrt.org/master/images/builders/lantiq%2Fxrx200/builds/682
http://buildbot.openwrt.org/master/images/builders/ath79%2Fmikrotik/builds/449

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoodhcpd: setup dhcpv4 server automagically
Daniel Golle [Sun, 14 Feb 2021 22:39:24 +0000 (22:39 +0000)]
odhcpd: setup dhcpv4 server automagically

Automatically setup dhcpv4 server just like it's done for dhcpv6.
To select whether odhcpd or dnsmasq are serving DHCPv4 requests there
still is the 'maindhcp' option. To make things less confusing, make
sure things really work out-of-the-box in case dnsmasq is not even
installed at the time the uci-defaults script is being run.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoRevert "wolfssl: use dynamic ABI_VERSION depending on the configuration and package...
Hauke Mehrtens [Sun, 14 Feb 2021 23:28:35 +0000 (00:28 +0100)]
Revert "wolfssl: use dynamic ABI_VERSION depending on the configuration and package version"

This fixes the build on MIPS BE like ath25 and ath79 target.
We get this error message when linking libwolfssl:
mips-openwrt-linux-musl/bin/ld: /home/hauke/openwrt/openwrt/staging_dir/target-mips_mips32_musl/usr/lib/libwolfssl.so: unknown type [0x7000002a] section `.MIPS.abiflags'
mips-openwrt-linux-musl/bin/ld: /home/hauke/openwrt/openwrt/staging_dir/target-mips_mips32_musl/usr/lib/libwolfssl.so: unknown type [0x7000002a] section `.MIPS.abiflags'
mips-openwrt-linux-musl/bin/ld: skipping incompatible /home/hauke/openwrt/openwrt/staging_dir/target-mips_mips32_musl/usr/lib/libwolfssl.so when searching for -lwolfssl
mips-openwrt-linux-musl/bin/ld: cannot find -lwolfssl
collect2: error: ld returned 1 exit status

This reverts commit 2591c83b3406c16d3c1cd2dc7fa59c3c1b901d3c.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoRevert "libubox: use PKG_ABI_VERSION"
Hauke Mehrtens [Sun, 14 Feb 2021 23:13:07 +0000 (00:13 +0100)]
Revert "libubox: use PKG_ABI_VERSION"

This fixes the build on MIPS BE like ath25 and ath79 target.
We get this error message when linking libubox:
mips-openwrt-linux-musl/bin/ld: /home/hauke/openwrt/openwrt/staging_dir/target-mips_mips32_musl/usr/lib/libubox.so: unknown type [0x7000002a] section `.MIPS.abiflags'
mips-openwrt-linux-musl/bin/ld: /home/hauke/openwrt/openwrt/staging_dir/target-mips_mips32_musl/usr/lib/libubox.so: unknown type [0x7000002a] section `.MIPS.abiflags'
mips-openwrt-linux-musl/bin/ld: skipping incompatible /home/hauke/openwrt/openwrt/staging_dir/target-mips_mips32_musl/usr/lib/libubox.so when searching for -lubox

This reverts commit f421fefa8a34319c5ff5dcc1af39d6311ec1ad1e.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoramips: mark toggle input on EX6150 as a switch
Kurt Roeckx [Sun, 14 Feb 2021 13:28:20 +0000 (14:28 +0100)]
ramips: mark toggle input on EX6150 as a switch

The Netgear EX6150 has an Access Point/Extender switch. Set it as
an EV_SW. Otherwise when it's set to Access Point, it will trigger
failsafe mode during boot.

Fixes: FS#3590
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
3 years agoRevert "imx6: bootscript-apalis: make it working on v2021.01 release"
Petr Štetiar [Sun, 14 Feb 2021 22:22:57 +0000 (23:22 +0100)]
Revert "imx6: bootscript-apalis: make it working on v2021.01 release"

This reverts commit 4968fc8fb110612018af3ba2836be1b4744346e2 as the bump
to v2021.01 needs swig on the host for pylibfdt which is needed by dtoc
tool to generate .h/.c files from DTBs in SPL for mx6cuboxi_config.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoRevert "uboot-imx6: bump to 2021.01 release"
Petr Štetiar [Sun, 14 Feb 2021 22:22:55 +0000 (23:22 +0100)]
Revert "uboot-imx6: bump to 2021.01 release"

This reverts commit 50a5a8993d15fe090fdbf10fc25aba3f78c47d40 as the bump
to 2021.01 unveiled issue with missing swig host tool needed for
mx6cuboxi's SPL.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agotarget: fix copying of licenses for SDK/toolchain
Adrian Schmutzler [Sun, 14 Feb 2021 20:51:14 +0000 (21:51 +0100)]
target: fix copying of licenses for SDK/toolchain

The SDK and target/toolchain copy the license file into their
directories. During the rename/move from LICENSE to a LICENSES
folder, this has not been updated.

Update it now, and include the new COPYING file.

While at it, improve formatting/indent.

Fixes: 882e3014610b ("LICENSES: include all used licenses in
LICENSES directory")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath9k: fix transmitting to stations in dynamic SMPS mode
Felix Fietkau [Sun, 14 Feb 2021 18:55:09 +0000 (19:55 +0100)]
ath9k: fix transmitting to stations in dynamic SMPS mode

When transmitting to a receiver in dynamic SMPS mode, all transmissions that
use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to
give the receiver's extra chains some time to wake up.
This fixes the tx rate getting stuck at <= MCS7 for some clients, especially
Intel ones, which make aggressive use of SMPS.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomt76: update to the latest version
Felix Fietkau [Fri, 18 Dec 2020 18:03:55 +0000 (19:03 +0100)]
mt76: update to the latest version

261d184cebdc mt76: introduce mt76_vif data structure
50349a8664ef mt76: mt76_connac: create mcu library
c88859180c51 mt76: mt76_connac: move hw_scan and sched_scan routine in mt76_connac_mcu module
9856236ab4f9 mt76: mt76_connac: move WoW and suspend code in mt76_connac_mcu module
2da59aacdd50 mt76: mt76_connac: move pm data struct in mt76_connac.h
16be142e40fe mt76: mt76_connac: move pm utility routines in mt76_connac_lib module
c4ccfc66347d mt76: mt7921: add MAC support
8ecf3a50e7ad mt76: mt7921: add MCU support
92c1717f9a55 mt76: mt7921: add DMA support
1cecf9c3da8b mt76: mt7921: add EEPROM support
a9e68410b9ba mt76: mt7921: add ieee80211_ops
39d6f4851b06 mt76: mt7921: introduce mt7921e support
9f37baecf5d6 mt76: mt7921: add debugfs support
b16cf6e26998 mt76: mt7921: introduce schedule scan support
5aa798ee56c7 mt76: mt7921: introduce 802.11 PS support in sta mode
e67d5216f16d mt76: mt7921: introduce support for hardware beacon filter
cb99bf4655f9 mt76: mt7921: introduce beacon_loss mcu event
71f9f09ee987 mt76: mt7921: introduce PM support
2beb9c9530d4 mt76: mt7921: rely on mt76_connac_mcu common library
59e682497d12 mt76: mt7921: rely on mt76_connac_mcu module for sched_scan and hw_scan
1ccf6a9c60cd mt76: mt7921: rely on mt76_connac_mcu module for suspend and WoW support
f8d1ec5e6e11 mt76: mt7921: introduce Runtime PM support
633a1cbd8f4e mt76: mt7921: introduce regdomain notifier support
0d95c6ad1745 mt76: mt7921: enable MSI interrupts
5f4f6792fb37 mt76: mt7921: add coredump support
47eb00e13450 mt76: mt7663: introduce coredump support
26658849a465 mt76: mt7615: fix key set/delete issues
b0ba039bc2ef mt76: mt7615: fix tx skb dma unmap
892f74d37e88 mt76: mt7915: fix tx skb dma unmap
2659f6c6ea23 mt76: mt7615: support loading EEPROM for MT7613BE
b09cc8644529 mt76: dma: do not report truncated frames to mac80211
ae6473f1d2af mt76: mt7921: enable random mac addr during scanning
b59e3677476d mt76: mt7921: remove unnecessary variable
781911f167aa mt76: mt7921: removed unused definitions in mcu.h
994893d38d51 mt76: always use WTBL_MAX_SIZE for tlv allocation
e6c0948ada07 mt76: mt76x0: disable GTK offloading
a75302bcbfe1 mt76: connac: always check return value from mt76_connac_mcu_alloc_wtbl_req
8da10d6f9251 mt76: mt7915: always check return value from mt7915_mcu_alloc_wtbl_req
80a87412e9e9 mt76: mt7915: fix uninitialized variable in mt7915_tm_set_tx_cont()
c7d98fc35865 mt76: use PCI_VENDOR_ID_MEDIATEK to avoid open coded
b5228e75e422 mt76: mt7921: switch to new api for hardware beacon filter
73fce2cbfa41 mt76: connac: fix up the setting for ht40 mode in mt76_connac_mcu_uni_add_bss
2e2cb71901e8 mt76: mt7921: fixup rx bitrate statistics
2d7b1d72b43b mt76: mt7921: add flush operation
96b4c9874e16 mt76: mt7921: fix uninitialized pointer access in mt7921_get_wtbl_info
4492d801cbb5 mt76: connac: update sched_scan cmd usage
200c1b1c234b mac80211: rename csa counters to countdown counters
0d7564d0d899 mt76: add support for 802.3 rx frames
4c0811c647b9 mt76: mt7915: enable hw rx-amsdu de-aggregation
4b7a68634ff6 mt76: mt7915: add rx checksum offload support
289cd7804587 mt76: mt7915: add support for rx decapsulation offload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agowolfssl: use dynamic ABI_VERSION depending on the configuration and package version
Felix Fietkau [Fri, 12 Feb 2021 10:36:47 +0000 (11:36 +0100)]
wolfssl: use dynamic ABI_VERSION depending on the configuration and package version

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: drop ABI version from metadata
Felix Fietkau [Fri, 12 Feb 2021 10:16:35 +0000 (11:16 +0100)]
build: drop ABI version from metadata

Preparation for supporting dynamic ABI versions that depend on the runtime
configuration. Read the suffix from the staging dir pkginfo version files.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agolibubox: use PKG_ABI_VERSION
Felix Fietkau [Fri, 12 Feb 2021 09:10:41 +0000 (10:10 +0100)]
libubox: use PKG_ABI_VERSION

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: add support for fixing up library soname
Felix Fietkau [Fri, 12 Feb 2021 08:56:56 +0000 (09:56 +0100)]
build: add support for fixing up library soname

This makes it possible to declare a package ABI_VERSION independent from the
upstream soname by setting PKG_ABI_VERSION in the package makefile.
The library filename is fixed up for files installed to packages and to the
staging dir. References to the original from executables within the same
package are also fixed up

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: fix ABI version rebuild dependency
Felix Fietkau [Fri, 12 Feb 2021 08:47:14 +0000 (09:47 +0100)]
build: fix ABI version rebuild dependency

A stray comma was being appended to the last package version dependency,
causing it to be missed for ABI version checks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: fix a regression in processing rx stats
Felix Fietkau [Sun, 14 Feb 2021 18:39:02 +0000 (19:39 +0100)]
mac80211: fix a regression in processing rx stats

A logic error caused rx rate update to be missed for any driver not using
fast-rx

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: refresh patches
Felix Fietkau [Sun, 14 Feb 2021 18:24:05 +0000 (19:24 +0100)]
mac80211: refresh patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: add minstrel performance improvements
Felix Fietkau [Sat, 6 Feb 2021 15:46:56 +0000 (16:46 +0100)]
mac80211: add minstrel performance improvements

Reduce fluctuations in rate selection / statistics

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: add decapsulation offload support
Felix Fietkau [Thu, 17 Dec 2020 21:22:22 +0000 (22:22 +0100)]
mac80211: add decapsulation offload support

On hardware that supports this, this will improve performance by passing
802.3 frames from the hardware to the stack

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: fix a corner case in encapsulation offload support
Felix Fietkau [Thu, 17 Dec 2020 21:21:43 +0000 (22:21 +0100)]
mac80211: fix a corner case in encapsulation offload support

Fix encryption key selection with WEP

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: add fq performace improvements
Felix Fietkau [Wed, 25 Nov 2020 18:51:31 +0000 (19:51 +0100)]
mac80211: add fq performace improvements

Improves performance under load

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agolibnftnl: update to 1.1.8
Rosen Penev [Mon, 4 Jan 2021 00:28:34 +0000 (16:28 -0800)]
libnftnl: update to 1.1.8

Fix license information.

Fix wrong ABI version. The library is versioned as libnftnl.so.11.4.0

Add PKG_BUILD_PARALLEL for faster compilation.

Remove autoreconf as nothing is being patched.

Minor cleanups for consistency between packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibevent2: update to 2.1.12
Rosen Penev [Mon, 4 Jan 2021 00:28:18 +0000 (16:28 -0800)]
libevent2: update to 2.1.12

Remove upstream backports.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoreadline: update to 8.1
Rosen Penev [Mon, 4 Jan 2021 00:27:57 +0000 (16:27 -0800)]
readline: update to 8.1

Fix license.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agogmp: update to 6.2.1
Rosen Penev [Mon, 4 Jan 2021 00:27:48 +0000 (16:27 -0800)]
gmp: update to 6.2.1

Fix license information.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agof2fs-tools: update to 1.14.0
Rosen Penev [Mon, 4 Jan 2021 00:27:37 +0000 (16:27 -0800)]
f2fs-tools: update to 1.14.0

Fix license information.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoCOPYING: add COPYING file to specify project licenses
Adrian Schmutzler [Fri, 12 Feb 2021 12:52:03 +0000 (13:52 +0100)]
COPYING: add COPYING file to specify project licenses

Since multiple licenses are provided now in the LICENSES folder,
add a COPYING file to specify the project license.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts: fix checkpatch.pl for changed license dir
Paul Spooren [Tue, 22 Sep 2020 19:08:58 +0000 (09:08 -1000)]
scripts: fix checkpatch.pl for changed license dir

As multiple LICENSES are shipped and no longer just LICENSE, modify the
OpenWrt tree detection in checkpatch.pl.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoLICENSES: include all used licenses in LICENSES directory
Adrian Schmutzler [Fri, 12 Feb 2021 12:37:58 +0000 (13:37 +0100)]
LICENSES: include all used licenses in LICENSES directory

OpenWrt ships code not only licensed via GPL-2.0-{only,or-later}.
Reflect that by adding the missing licenses, just like the kernel
does.

This patch takes the license text as it is found in the Linux
kernel, which might probably be the best common denominator here.

In contrast to the kernel versions, only some changes to the
valid and recommended identifiers were made (GPL-x.x+ vs.
GPL-x.x-or-later and similar).

Suggested-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: bump 5.4 to 5.4.98
John Audia [Sat, 13 Feb 2021 15:30:20 +0000 (10:30 -0500)]
kernel: bump 5.4 to 5.4.98

Ran update_kernel.sh in a fresh clone without any existing toolchains.
No manual changes needed.

Build system:       x86_64
Build-tested:       bcm27xx/bcm2711, ipq806x/R7800
Run-tested:         ipq806x/R7800
Compile-tested [*]: ath79/{generic,tiny}, ipq40xx, octeon, realtek,
                    ramips/{mt7620,mt7621}, x86/64
Run-tested [*]:     ath79/{generic,tiny}: WNDR3700v2 / TL-WR841N v7
                    octeon: EdgeRouter Lite
                    ramips/{mt7620,mt7621}: Archer C2 v1 / DIR-878 A1,
                                      EAP235-Wall, R6800, RT-AC57U v1

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
3 years agoath79: fix factory image generation for Netgear and Zyxel boards
Paul Fertser [Sun, 14 Feb 2021 09:16:33 +0000 (12:16 +0300)]
ath79: fix factory image generation for Netgear and Zyxel boards

The factory images need to embed specific IDs to pass verification with
the OEM firmware (including TFTP recovery), so they need to be
per-device variables.

Fixes: ab1584a797ad ("ath79: netgear: trim down uImage customisations")
Fixes: 459c8c9ef816 ("ath79: add support for ZyXEL NBG6616")
Reported-by: Marcin Juszkiewicz <marcin-openwrt@juszkiewicz.com.pl>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
[minor commit message adjustments, sort DEVICE_VARS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobusybox: remove useless busybox patches
Rosen Penev [Mon, 1 Feb 2021 00:15:54 +0000 (16:15 -0800)]
busybox: remove useless busybox patches

The first two are useless as /bin/sh can execute those scripts just
fine. Shellcheck reports no problems.

Telnetd patch is useless as telnet is no longer used in OpenWrt.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobusybox: update to 1.33
Rosen Penev [Mon, 1 Feb 2021 00:15:53 +0000 (16:15 -0800)]
busybox: update to 1.33

Remove stime backport.

Remove static libgcc patch as upstream fixed it with
BUSYBOX_DEFAULT_STATIC_LIBGCC which defauls to off.

Remove date -k patch as it no longer applies. It's also pointless as
busybox' hwclock utility can do the same thing.

Remove ntpd patch as that seems to have been applied upstream.

Add smalll patch fixing compilation with SELinux. Upstream commit
2496616b0a8d1c80cd1416b73a4847b59b9f969a renamed the variable without
renaming it in the SELinux path.

Refresh config and patches.

Config refresh:

Refresh commands, run after busybox is first built once:

  cd package/utils/busybox/config/
  ../convert_menuconfig.pl ../../../../build_dir/target-mips_24kc_musl/busybox-default/busybox-1.33.0
  cd ..
  ./convert_defaults.pl < ../../../build_dir/target-mips_24kc_musl/busybox-default/busybox-1.33.0/.config > Config-defaults.in

Manual edits needed afterward:

* Config-defaults.in:  OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6
* Config-defaults.in:  OpenWrt configTARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)
* editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)
* shell/Config.in : change at "Options common to all shells"  the symbol
  SHELL_ASH  -->  BUSYBOX_CONFIG_SHELL_ASH
   (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
     Apparently our script does not see the hidden option while
     prepending config options with "BUSYBOX_CONFIG_" which leads to a
     missed dependency when the options are later evaluated.)
* Edit Config.in files by adding quotes to sourced items in
  config/Config.in, networking/Config.in and util-linux/Config.in (commit 1da014f)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[Added comments from Hannu Nyman to commit message]
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobase-files: use hwclock --systz
Rosen Penev [Mon, 1 Feb 2021 00:15:52 +0000 (16:15 -0800)]
base-files: use hwclock --systz

The date -k patch is non standard and will be removed in the next
commit.

Tested behavior to be identical with a simple C program:

 #define _GNU_SOURCE
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/time.h>
 #include <sys/syscall.h>

int main()
{
        struct timezone tt;
struct timezone tz;

        int a = syscall(SYS_gettimeofday, NULL, &tt);
        int b = gettimeofday(NULL, &tz);
        printf("%d - %d, %d\n", a, tt.tz_minuteswest, tt.tz_dsttime);
        printf("%d - %d, %d\n", b, tz.tz_minuteswest, tz.tz_dsttime);
}

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoiw: Update to version 5.9
Hauke Mehrtens [Sun, 29 Nov 2020 12:12:29 +0000 (13:12 +0100)]
iw: Update to version 5.9

The nl80211.h file is mostly matching kernel 5.10, so remove most of our
changes from the patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agomac80211: Update to version 5.10-rc6-1
Hauke Mehrtens [Fri, 13 Nov 2020 19:14:09 +0000 (20:14 +0100)]
mac80211: Update to version 5.10-rc6-1

The removed patches were applied upstream.

This adapts ath10k-ct and mt76 to changed APIs.
nl80211.h in iw is updated to match the version from backports.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agomac80211: Update to version 5.9.12-1
Hauke Mehrtens [Sat, 7 Nov 2020 16:50:20 +0000 (17:50 +0100)]
mac80211: Update to version 5.9.12-1

The removed patches were applied upstream.

Remove the 300-mac80211-optimize-skb-resizing.patch.
This patch was not applied upstream, but it conflicts with upstream
changes and needs bigger changes. It was applied with Felix to remove
this patch for now. It should be reworked and then send upstream later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agomvebu: espressobin: drop COMPHY removement patch
Tomasz Maciej Nowak [Thu, 11 Feb 2021 18:29:32 +0000 (19:29 +0100)]
mvebu: espressobin: drop COMPHY removement patch

There are proper workarounds merged to 5.4 stable tree for ESPRESSObin
boards with older bootloader:
4e1a23779bde ("ata: ahci: mvebu: Make SATA PHY optional for Armada 3720")
40af962eb1d4 ("usb: host: xhci: mvebu: make USB 3.0 PHY optional for
Armada 3720")

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agoramips: manage low reset lines
Sander Vanheule [Thu, 4 Feb 2021 14:49:14 +0000 (15:49 +0100)]
ramips: manage low reset lines

The bootloader of a number of recent TP-Link devices does not properly
initialise the MT7621's internal switch when booting from flash. To
enable the mt7530 driver to clear the reset on the switch, the ramips
reset controller must be allowed to toggle these.

Backport upstream commit 3f9ef7785a9c from mips-next to allow control of
the "mcm" reset line.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoimx6: bootscript-apalis: make it working on v2021.01 release
Petr Štetiar [Mon, 8 Feb 2021 14:40:07 +0000 (15:40 +0100)]
imx6: bootscript-apalis: make it working on v2021.01 release

Upstream in commit 8b9c0cb46471 ("apalis_imx6: boot env configuration
updates") removed emmc legacy wrappers, but so far didn't included any
replacements. Fix it by simply defining the missing variables and UUID
gathering directly into the boot script.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agouboot-imx6: bump to 2021.01 release
Petr Štetiar [Tue, 14 Apr 2020 21:21:19 +0000 (23:21 +0200)]
uboot-imx6: bump to 2021.01 release

Refreshed all patches, removed 110-mx6cuboxi-mmc-fallback.patch as it
seems, that upstream has probably added similar funcionality in commit
6c3fbf3e456c ("mx6cuboxi: customize board_boot_order to access eMMC")
and it needs to be re-verified by device owner.

Run tested on apalis.

Cc: Felix Fietkau <nbd@nbd.name>
Cc: Vladimir Vid <vladimir.vid@sartura.hr>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agobcm4908: refresh patches
Adrian Schmutzler [Sat, 13 Feb 2021 20:01:14 +0000 (21:01 +0100)]
bcm4908: refresh patches

Our patch refresh tool creates quite a big diff for these patches,
as it does not use rename syntax.

Push the refresh separately so it does not pollute the next kernel
bump. This is a purely cosmetic change.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: fix chip used for Meraki MR12 caldata_extract
Martin Kennedy [Sat, 13 Feb 2021 05:38:52 +0000 (05:38 +0000)]
ath79: fix chip used for Meraki MR12 caldata_extract

The original setup fails to trigger ART calibration data
extraction for the AR9287. Instead, it would only have extracted
calibration data for an internal WMAC chip which is not present on
this board.

Fixes: 55d2db0e8ceb ("ath79: add support for Meraki MR12")
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
[commit title/message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: remove factory image for TP-Link Archer C2 v1
Stijn Segers [Sat, 13 Feb 2021 09:39:42 +0000 (10:39 +0100)]
ramips: remove factory image for TP-Link Archer C2 v1

Initial commit 8375623a0640 ("ramips: add support for TP-Link Archer
C2") contains detailed installation instructions, which do not mention
a factory image. From what I can see, no support to install OpenWrt
through the vendor web interface has been added since. The factory
image is also conspicuously absent from the device page in the wiki.
Yet, it is available for download.

I bricked my Archer C2 loading the factory image through the web UI.
Serial showed this error during bootloop:

  Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

This patch disables the undocumented factory image so users won't get
tricked into thinking easy web UI flashing actually works.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
3 years agotrusted-firmware-a: fix project name spelling
Daniel Golle [Sat, 13 Feb 2021 20:10:04 +0000 (20:10 +0000)]
trusted-firmware-a: fix project name spelling

The version string generated for ARM Trusted-Firmware-A was stated as
"OpenWRT". Fix that by changing it to the exact spelling "OpenWrt"

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoiwinfo: update to version 2021-01-31
Daniel Golle [Sat, 13 Feb 2021 19:20:19 +0000 (19:20 +0000)]
iwinfo: update to version 2021-01-31

 5a2dd18 iwinfo: add hardware description for MediaTek MT7622
 4a32b33 iwinfo: add PCI ID for MediaTek MT7613BE

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agohostapd: add patch for setting 4addr mode in multi_ap
Raphaël Mélotte [Tue, 9 Feb 2021 06:54:10 +0000 (07:54 +0100)]
hostapd: add patch for setting 4addr mode in multi_ap

This patch is required to be able to roam from one backhaul AP to
another one in the same ESS.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(daniel@makrotopia.org: PKG_REVISION bump and refreshed patches)
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
3 years agoglibc: update to latest 2.33 commit
Hans Dedecker [Sat, 13 Feb 2021 09:04:51 +0000 (10:04 +0100)]
glibc: update to latest 2.33 commit

c5e3545897 tunables: Disallow negative values for some tunables
905fdc7071 x86: Use SIZE_MAX instead of (long int)-1 for tunable range value
15afd6b8d8 tunables: Simplify TUNABLE_SET interface

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agobcm4908: fix handling Ethernet frames of size 1506 - 1514
Rafał Miłecki [Fri, 12 Feb 2021 15:28:57 +0000 (16:28 +0100)]
bcm4908: fix handling Ethernet frames of size 1506 - 1514

MTU needs to be explicitly set as default value is too low.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: use upstream accepted Ethernet driver patches
Rafał Miłecki [Fri, 12 Feb 2021 08:01:40 +0000 (09:01 +0100)]
bcm4908: use upstream accepted Ethernet driver patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agorealtek: add support for Netgear GS108T v3
Michael Mohr [Sat, 9 Jan 2021 05:35:47 +0000 (21:35 -0800)]
realtek: add support for Netgear GS108T v3

The Netgear GS108T v3 is an 8 port gigabit switch with PoE-PD support
on port 1.  The two prior versions were built using eCos and are not
currently compatible with OpenWRT.

The GS108T v3 is quite similar to both the GS110TPP v1 and GS110TP v3,
all of which use the same firmware image from Netgear.  For this reason,
the device tree is identical aside from the model and compatible values.

All of the above feature a dual firmware layout, referred to as Image0
and Image1 in the Netgear firmware.

Hardware specification
----------------------

 * RTL8380M SoC, 1 MIPS 4KEc core @ 500MHz
 * 128MB DDR3-1600 DRAM (Winbond W631GG8MB-12)
 * 32MB 3v NOR SPI Flash (Macronix MX25L25635F or Winbond W25Q256JVFIQ)
 * RTL8231 GPIO extender to control the LEDs and the reset button
 * 8 x 10/100/1000BASE-T ports, internal PHY (RTL8218B)
 * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J1
 * Power is supplied via a 12V 1A barrel connector or 802.3af

UART pinout
-----------

J1 | [o]ooo
      ^ ||`------ GND
      | |`------- RX         [TX out of the serial adapter]
      | `-------- TX         [RX into the serial adapter]
      `---------- Vcc (3V3)  [the square pin]

The through holes are filled with PB-free solder which melts at 375C.
They can also be drilled using a 0.9mm bit.

Build configuration
-------------------

 * Target System: Realtek MIPS
 * Target Profile: Netgear GS108T v3
 * Target Images -> ramdisk -> Compression: lzma
 * Disable other target images

Boot initramfs image from U-Boot
--------------------------------

 1. Press the Escape key at the `Hit Esc key to stop autoboot` prompt
 2. Init network with `rtk network on` command
 3. Load image with `tftpboot 0x8f000000 openwrt-realtek-generic-netgear_gs108t-v3-initramfs-kernel.bin` command
 4. Boot the image with `bootm` command

The switch defaults to IP 192.168.1.1 and tries to fetch the image via
TFTP from 192.168.1.111.

Updating the installed firmware
-------------------------------

The OpenWRT ramdisk image can be flashed directly from the Netgear UI.
The Image0 slot should be used in order to enable sysupgrade.

As with similar switches, changing the active boot partition can be
accomplished in U-Boot as follows:

 1. Press the Escape key at the `Hit Esc key to stop autoboot` prompt
 2. Run `setsys bootpartition {0|1}` to select the boot partition
 3. Run `savesys` followed by `boota` to proceed with the boot process

Signed-off-by: Michael Mohr <akihana@gmail.com>
3 years agorealtek: refactor the Netgear GS110TPP v1 device tree
Michael Mohr [Sat, 9 Jan 2021 05:31:53 +0000 (21:31 -0800)]
realtek: refactor the Netgear GS110TPP v1 device tree

Move most of the GS110TPP v1 device tree into a dtsi so that it can be
shared with the GS108T v3.  Additionally:

  * Use macros to simplify the ethernet and switch definitions
  * Zero-pad the offsets and sizes in the partition map to 8 digits each

The spi-max-frequency value has been changed from 10MHz to 50MHz based
on an analysis of the relevant datasheets.  The current driver doesn't
use this property, as the clock speed is fixed. However, it's required
for this type of DT node, so that's why it's present here.

The firmware partition has been split in half, since this is how the
stock firmware uses it.  This can be used to easily revert to a stock
firmware if one is written to the second image area.

Signed-off-by: Michael Mohr <akihana@gmail.com>
3 years agorealtek: add and use netgear_nge for the GS110PP v1
Michael Mohr [Sat, 9 Jan 2021 05:21:15 +0000 (21:21 -0800)]
realtek: add and use netgear_nge for the GS110PP v1

The netgear_nge device will be shared between the GS108T v3 (to be added
in a later commit) and the GS110PP v1.  It also enables LZMA compression
for the ramdisk image.

Signed-off-by: Michael Mohr <akihana@gmail.com>
3 years agohostapd: reconfigure wps credentials on reload
Raphaël Mélotte [Thu, 4 Feb 2021 13:21:31 +0000 (14:21 +0100)]
hostapd: reconfigure wps credentials on reload

This patch fixes a bug that prevents updating Multi-AP credentials
after hostapd has started.

It was sent to upstream hostapd here:
https://patchwork.ozlabs.org/bundle/rmelotte/hostapd:%20update%20WPS%20credentials%20on%20SIGHUP/

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
3 years agohostapd: add notifications for management frames
Raphaël Mélotte [Thu, 26 Nov 2020 14:20:52 +0000 (15:20 +0100)]
hostapd: add notifications for management frames

This patch allows other applications to get events management
frames (for example: association requests).

This is useful in Multi-AP context to be able to save association
requests from stations.

It has been sent to upstream hostapd in this series:
https://patchwork.ozlabs.org/project/hostap/list/?series=217500

'700-wifi-reload.patch' is updated due to the introduction of
'110-notify-mgmt-frames.patch'.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
3 years agoltq-ptm: Update VR9 PTM firmware
Antti Seppälä [Sun, 3 Jan 2021 15:09:39 +0000 (17:09 +0200)]
ltq-ptm: Update VR9 PTM firmware

After looking at various vendor GPL source code dumps I discovered that some
of them contain updated versions of ltq-ptm driver when compared to what
openwrt has.

The driver update is mostly cursory (simple changes to comments, whitespace,
formatting etc.) or adds debug features not used by openwrt.

However the updated driver also contains a later version of PTM firmware which
is extracted and included in this commit along with bits to correctly identify
its version when driver loads.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
3 years agoath79: fix USB power GPIO for TP-Link TL-WR810N v1
Adrian Schmutzler [Sat, 2 Jan 2021 14:05:13 +0000 (15:05 +0100)]
ath79: fix USB power GPIO for TP-Link TL-WR810N v1

The TP-Link TL-WR810N v1 is known to cause soft-brick on ath79 and
work fine for ar71xx [1]. On closer inspection, the only apparent
difference is the GPIO used for the USB regulator, which deviates
between the two targets.

This applies the value from ar71xx to ath79.

Tested successfully by a forum user.

[1] https://forum.openwrt.org/t/tp-link-tl-wr810n-v1-ath79/48267

Fixes: cdbf2de77768 ("ath79: Add support for TP-Link WR810N")
Fixes: FS#3522
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for ELECOM WRC-1167FS
INAGAKI Hiroshi [Fri, 13 Sep 2019 15:14:36 +0000 (00:14 +0900)]
ramips: add support for ELECOM WRC-1167FS

ELECOM WRC-1167FS is a 2.4/5 GHz band 11ac (WiFi-5) router, based on
MT7628AN.

Specification:

- SoC : MediaTek MT7628AN
- RAM : DDR2 64 MiB (NT5TU32M16FG-AC)
- Flash : SPI-NOR 16 MiB (W25Q128JVSIQ)
- WLAN : 2.4/5 GHz 2T2R
  - 2.4 GHz : MediaTek MT7628AN (SoC)
  - 5 GHz : MediaTek MT7612E
- Ethernet : 10/100 Mbps x2
  - Switch : MT7628AN (SoC)
- LEDs/Keys : 6x, 3x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J1: 3.3V, GND, TX, RX from "J1" marking
  - 57600n8
- Power : 12 VDC, 1 A

Flash instruction using factory image:

1. Boot WRC-1167FS normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory image and click apply ("適用") button to
   perform firmware update
4. Wait ~120 seconds to complete flashing

Notes:

- Last 0x800000 (8 MiB) in SPI-NOR flash is not used on stock firmware

- Additional padding in factory image is required to avoid incomplete
  flashing on stock firmware

MAC addresses:

- LAN : BC:5C:4C:xx:xx:68 (Config, ethaddr (text) / Factory, 0x28   (hex))
- WAN : BC:5C:4C:xx:xx:69 (Config, wanaddr (text) / Factory, 0x22   (hex))
- 2.4GHz: BC:5C:4C:xx:xx:6A (Config, rmac    (text) / Factory, 0x4    (hex))
- 5GHz : BC:5C:4C:xx:xx:6B (Config, rmac2   (text) / Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agokernel: bump 5.4 to 5.4.97
John Audia [Wed, 10 Feb 2021 16:20:24 +0000 (11:20 -0500)]
kernel: bump 5.4 to 5.4.97

Ran update_kernel.sh in a fresh clone without any existing toolchains.

Manually rebased:
 bcm27xx
  950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
 bcm53xx
  180-usb-xhci-add-support-for-performing-fake-doorbell.patch
 layerscape
  302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch
  820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
  820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch

Build system: x86_64
Build-tested: bcm27xx/bcm2711, ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions/everything functional.

Signed-off-by: John Audia <graysky@archlinux.us>
[remove quilt comment, fix/adjust 820-usb-* layerscape patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoarm-trusted-firmware-tools: add patch to pass LDFLAGS
Daniel Golle [Wed, 10 Feb 2021 19:18:04 +0000 (19:18 +0000)]
arm-trusted-firmware-tools: add patch to pass LDFLAGS

This should hopefully fix builds on the buildbot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoat91: use SPDX license identifiers on DTS files
Adrian Schmutzler [Wed, 10 Feb 2021 14:39:01 +0000 (15:39 +0100)]
at91: use SPDX license identifiers on DTS files

Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotarget: use SPDX license identifiers on scripts
Adrian Schmutzler [Wed, 10 Feb 2021 14:14:52 +0000 (15:14 +0100)]
target: use SPDX license identifiers on scripts

Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotarget: use SPDX license identifiers on Makefiles
Adrian Schmutzler [Wed, 10 Feb 2021 13:52:34 +0000 (14:52 +0100)]
target: use SPDX license identifiers on Makefiles

Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm4908: update Ethernet driver
Rafał Miłecki [Wed, 10 Feb 2021 10:27:44 +0000 (11:27 +0100)]
bcm4908: update Ethernet driver

Use the latest version sent upsteram.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoarm-trusted-firmware-mediatek: mark @BROKEN until bromimage gets fixed
Daniel Golle [Wed, 10 Feb 2021 02:45:05 +0000 (02:45 +0000)]
arm-trusted-firmware-mediatek: mark @BROKEN until bromimage gets fixed

The 'bromimage' tool which is used to wrap bl2 with a MediaTek-specific
header is distributed in binary form only and unfortunately tries to
dynamically link against libopenssl, which fails on the buildbots.
Wait for MTK to provide a at least static executable instead, in the
meantime, mark the package as broken.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoarm-trusted-firmware-tools: fix passing of CFLAGS
Daniel Golle [Wed, 10 Feb 2021 01:05:00 +0000 (01:05 +0000)]
arm-trusted-firmware-tools: fix passing of CFLAGS

HOST_CFLAGS were ignored as they were passed on incorrectly which lead
to build failure if OpenSSL wasn't present on the build host.
Fix that by properly passing HOST_CFLAGS when building each tool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agowolfssl: Backport fix for CVE-2021-3336
Hauke Mehrtens [Mon, 8 Feb 2021 23:53:09 +0000 (00:53 +0100)]
wolfssl: Backport fix for CVE-2021-3336

This should fix CVE-2021-3336:
DoTls13CertificateVerify in tls13.c in wolfSSL through 4.6.0 does not
cease processing for certain anomalous peer behavior (sending an
ED22519, ED448, ECC, or RSA signature without the corresponding
certificate).

The patch is backported from the upstream wolfssl development branch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoarm-trusted-firmware-tools: remove tools which require libopenssl
Daniel Golle [Tue, 9 Feb 2021 20:20:32 +0000 (20:20 +0000)]
arm-trusted-firmware-tools: remove tools which require libopenssl

They are anyway not used for now, so only build fiptool and sptool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoglibc: update to 2.33
Curtis Deptuck [Mon, 8 Feb 2021 21:20:11 +0000 (14:20 -0700)]
glibc: update to 2.33

ChangeLog:
https://sourceware.org/pipermail/libc-alpha/2021-February/122207.html

Refresh patch:
None required

Signed-off-by: Curtis Deptuck <curtdept@me.com>
3 years agoramips: add support for Cudy WR1300
Andrew Pikler [Wed, 27 Jan 2021 17:35:49 +0000 (19:35 +0200)]
ramips: add support for Cudy WR1300

Specifications:
 - SoC: MediaTek MT7621AT
 - RAM: 128 MB (DDR3)
 - Flash: 16 MB (SPI NOR)
 - WiFi: MediaTek MT7603E, MediaTek MT7612E
 - Switch: 1 WAN, 4 LAN (Gigabit)
 - Ports: 1 USB 3.0
 - Buttons: Reset, WPS
 - LEDs: Power, System, Wan, Lan 1-4, WiFi 2.4G, WiFi 5G, WPS, USB
 - Power: DC 12V 1A tip positive

UART Serial:
  115200 baud
  Located on unpopulated 4 pin header near J4:

  J4
  [o] Rx
  [o] Tx
  [o] GND
  [ ] Vcc - Do not connect

Installation:

Download and flash the manufacturer's built OpenWRT image available at
http://www.cudytech.com/openwrt_software_download
Install the new OpenWRT image via luci (System -> Backup/Flash firmware)
Be sure to NOT keep settings. The force upgrade may need to be checked
due to differences in router naming conventions.

Recovery:
 - Loads only signed manufacture firmware due to bootloader RSA verification
 - serve tftp-recovery image as /recovery.bin on 192.168.1.88/24
 - connect to any lan ethernet port
 - power on the device while holding the reset button
 - wait at least 8 seconds before releasing reset button for image to
   download
 - See http://www.cudytech.com/newsinfo/547425.html

MAC addresses as verified by OEM firmware:

use   address   source
LAN   *:f0      label
WAN   *:f1      label + 1
2g    *:f0      label
5g    *:f2      label + 2

The label MAC address is found in bdinfo 0xde00.

Signed-off-by: Andrew Pikler <andrew.pikler@gmail.com>
3 years agoath79: add support for D-Link DAP-3662 A1
Sebastian Schaper [Tue, 1 Dec 2020 21:34:34 +0000 (22:34 +0100)]
ath79: add support for D-Link DAP-3662 A1

Specifications:
 * QCA9557, 16 MiB Flash, 128 MiB RAM, 802.11n 2T2R
 * QCA9882, 802.11ac 2T2R
 * 2x Gigabit LAN (1x 802.11af PoE)
 * IP68 pole-mountable outdoor case

Installation:
 * Factory Web UI is at 192.168.0.50
   login with 'admin' and blank password, flash factory.bin
 * Recovery Web UI is at 192.168.0.50
   connect network cable, hold reset button during power-on and keep it
   pressed until uploading has started (only required when checksum is ok,
   e.g. for reverting back to oem firmware), flash factory.bin

After flashing factory.bin, additional free space can be reclaimed by
flashing sysupgrade.bin, since the factory image requires some padding
to be accepted for upgrading via OEM Web UI.

Both ethernet ports are set to LAN by default, matching the labelling on
the case. However, since both GMAC Interfaces eth0 and eth1 are connected
to the switch (QCA8337), the user may create an additional 'wan' interface
as desired and override the vlan id settings to map br-lan / wan to either
the PoE or non-PoE port, depending on the individual scenario of use.

So, the LAN and WAN ports would then be connected to different GMACs, e.g.

config interface 'lan'
option ifname 'eth0.1'
...

config interface 'wan'
option ifname 'eth1.2'
...

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '2 6t'

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[add configuration example]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for JCG Y2
Chukun Pan [Mon, 8 Feb 2021 08:28:10 +0000 (16:28 +0800)]
ramips: add support for JCG Y2

JCG Y2 is an AC1300M router

Hardware specs:
  SoC: MediaTek MT7621AT
  Flash: Winbond W25Q128JVSQ 16MiB
  RAM: Nanya NT5CB128M16 256MiB
  WLAN: 2.4/5 GHz 2T2R (1x MediaTek MT7615)
  Ethernet: 10/100/1000 Mbps x5
  LED: POWER, INTERNET, 2.4G, 5G
  Button: Reset
  Power: DC 12V,1A

Flash instructions:
  Upload factory.bin in stock firmware's upgrade page.

MAC addresses map:
  0x0004  *:c8  wlan2g/wlan5g/label
  0xe000  *:c7  lan
  0xe006  *:c6  wan

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 years agouboot-envtools: Update to version 2021.01
Hauke Mehrtens [Sun, 31 Jan 2021 16:08:05 +0000 (17:08 +0100)]
uboot-envtools: Update to version 2021.01

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotools: mkimage: Update U-Boot to version 2021.01
Hauke Mehrtens [Wed, 6 Jan 2021 18:36:44 +0000 (19:36 +0100)]
tools: mkimage: Update U-Boot to version 2021.01

* The fit image is now created with 0666 permission in upstream U-Boot
  remove our patch switch creates it with 0744
* The generated/autoconf.h file is created now as an empty file, it is
  not needed to remove this include any more.
* Upstream lib/rsa/rsa-sign.c now includes stdlib.h instead of malloc.h
* ALIGN_MASK was moved to imagetool.h, own patch should not be needed
  any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>