Daniel Golle [Sun, 11 Sep 2022 19:24:05 +0000 (20:24 +0100)]
mediatek: fix ledbar of UniFi 6 LR when running custom U-Boot
The RGB LED of the UniFi 6 LR v1 doesn't work when using the Openwrt-
built U-Boot. This is because the vendor loader resets the ledbar
controller while our U-Boot doesn't care.
Add reset-gpio so the ledbar driver in Linux will always reset the
ledbar controller.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
0b5cf952cf5b70d3af2424d05b15ce2730a3dc11)
Sven Wegener [Sat, 1 May 2021 11:51:51 +0000 (13:51 +0200)]
ramips: add support for Ubiquiti UniFi FlexHD
Hardware
--------
- SoC: MediaTek MT7621AT with 128 MiB RAM and 32 MiB Flash
- Wi-Fi: MediaTek MT7603 (b/g/n, 2x2) and MediaTek MT7615 (ac, 4x4)
- Bluetooth: CSR8811 (internal USB, install kmod-bluetooth)
Installation
------------
1. Connect to the booted device at 192.168.1.20 using username/password
"ubnt".
2. Update the bootloader environment.
$ fw_setenv devmode TRUE
$ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr);
fdt rm /signature; bootubnt"
$ fw_setenv bootcmd "run boot_openwrt"
3. Transfer the OpenWrt sysupgrade image to the device using SCP.
4. Check the mtd partition number for bs / kernel0 / kernel1
$ cat /proc/mtd
5. Set the bootselect flag to boot from kernel0
$ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4
6. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1
$ dd if=openwrt.bin of=/dev/mtdblock6
$ dd if=openwrt.bin of=/dev/mtdblock7
7. Reboot the device. It should boot into OpenWrt.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
820f0c07c544652c1c53a45262a481ac5dbe139b)
Daniel Golle [Sun, 18 Sep 2022 14:38:47 +0000 (15:38 +0100)]
ath79: Make patches apply again
The patch adding support for LEDs connected to a reset controller did
not apply any more, refresh it on top of current master.
Fixes: 53fc987b2552 ("generic: move ledbar driver from mediatek target")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
76fc277917fc847892dbbf525aea9f90a035d296)
Sven Wegener [Mon, 2 May 2022 20:13:14 +0000 (22:13 +0200)]
generic: move ledbar driver from mediatek target
This moves the ledbar driver to generic, to be also used by the ramips target.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
53fc987b25524c28525313347f0e2e5653dce43c)
Sven Wegener [Sat, 12 Jun 2021 19:56:22 +0000 (21:56 +0200)]
mediatek: add led count
The LEDs connected to the MCU are so-called smart LEDs and their signal is
daisy-chained. Because of this, the MCU needs to be told how many LEDs are
connected. It also means the LEDs could be individually controlled, if the MCU
has a command for this.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
76198e8f09a607c6aca2621f59d7a4cd7f6653e3)
Sven Wegener [Sat, 12 Jun 2021 19:56:22 +0000 (21:56 +0200)]
mediatek: add initialization after reset
During GPIO initialization the pin state flips and triggers a reset of
the ledbar MCU. It needs to be moved through an initialization sequence
before working correctly.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
013a956f086dc5d88f6e9cbd852ed4d900d436e0)
Sven Wegener [Sat, 12 Jun 2021 19:56:22 +0000 (21:56 +0200)]
mediatek: add support for reset gpio
Some versions of the ledbar MCU have a reset pin. It needs to be
correctly initialized or we might keep the MCU in reset state.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
84e4bbf5f049cdb862eb25c446bd6973ed4238aa)
Sven Wegener [Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)]
mediatek: support reading more than one byte of response
There are commands that return more than one byte of response.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
7c852e7df50e370b26b060c96c3cc4491cee88eb)
Sven Wegener [Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)]
mediatek: cast literal value to char
Or the comparison against a signed char is always true, because the
literal 0xaa is treated as an unsigned int, to which the signed char is
casted during comparison. 0xaa is above the positive values of a signed
char and negative signed char values result in values larger than 0xaa
when casted to unsigned int.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
e9a22ce2535c4a0faf83d5595304fe0e2c7bd1b2)
Sven Wegener [Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)]
mediatek: correctly log i2c response
The read response is in the i2c_response variable. Also use %hhx format,
because we're dealing with a single char.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
c4f9f9b44c82ffeacd9d3c00ba07171c35831337)
Sven Wegener [Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)]
mediatek: remove gpiod_direction_output()
It's already set to output with GPIOD_OUT_LOW.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
a188356484f434c72ea536d91d7f93f59c562eb5)
Sven Wegener [Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)]
mediatek: do not use gpiod_set_raw_value()
The polarity of the signal is set in the device dts.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit
56c2d15587dfe5285f1cf3bfb236c827bc446465)
Daniel Golle [Sun, 11 Sep 2022 13:26:25 +0000 (14:26 +0100)]
kernel: modules: package kmod-crypto-essiv
Package kernel module providing ESSIV support for block encryption.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
4133102898502c9bb453e8603b6c891aa103bce4)
Daniel Golle [Thu, 8 Sep 2022 18:29:44 +0000 (19:29 +0100)]
mediatek: fix typo in bpi-r64 image recipe
Janusz Dziedzic reported a typo introduced by a recent commit. Fix it.
Fixes: 50c892d67b ("mediatek: bpi-r64: make initramfs/recovery optional")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
007c8809c1e888748af70c1b878f4d0105fe7531)
Daniel Golle [Thu, 8 Sep 2022 01:44:30 +0000 (02:44 +0100)]
mediatek: bpi-r64: make initramfs/recovery optional
Only include recovery image in SD card image generated for the
BananaPi BPi-R64 if building with CONFIG_TARGET_ROOTFS_INITRAMFS
This allows to build images larger than 32 MB (the limit for
initramfs/recovery image) by deselecting initramfs.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
50c892d67bb4af90861be9fbb6831c2eeb62de11)
Arınç ÜNAL [Wed, 14 Sep 2022 18:30:59 +0000 (21:30 +0300)]
ramips: fix GB-PC1 and GB-PC2 LEDs
Add the missing LEDs for GB-PC2. Some of these LEDs don't exist on the
device schematics. Tests on a GB-PC2 by me and Petr proved otherwise.
Remove ethblack-green and ethblue-green LEDs for GB-PC1. They are not wired
to GPIO 3 or 4 and the wiring is currently unknown.
Set ethyellow-orange to display link state and activity of the ethyellow
interface for GB-PC2.
Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit
2a6ef7f53d7b96e4ee0200196c28ed6b0a7c8465)
Nick Hainke [Sat, 17 Sep 2022 06:05:47 +0000 (08:05 +0200)]
wireless-regdb: update to 2022-08-12
Changes:
9dc9c89 wireless-regdb: update regulatory database based on preceding changes
442bc25 wireless-regdb: update 5 GHz rules for PK and add 60 GHz rule
daee7f3 wireless-regdb: add 5 GHz rules for GY
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit
1d2d69c810261308652a577fc136e7327e0e1358)
John Audia [Thu, 15 Sep 2022 13:56:36 +0000 (09:56 -0400)]
kernel: bump 5.10 to 5.10.143
All patches automatically rebased.
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit
b77217d916ba48accbdb46589e6e5e3a9972c44e)
John Audia [Thu, 8 Sep 2022 10:19:20 +0000 (06:19 -0400)]
kernel: bump 5.10 to 5.10.142
All patches automatically rebased.
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit
837fd23c80b22c566b40181a28630ac29af8f96e)
John Audia [Mon, 5 Sep 2022 10:47:34 +0000 (06:47 -0400)]
kernel: bump 5.10 to 5.10.141
All patches automatically rebased.
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit
e8a62a1e6040de71bdcb1be1a1c30c064acbc059)
John Audia [Mon, 29 Aug 2022 15:30:27 +0000 (11:30 -0400)]
kernel: bump 5.10 to 5.10.139
All patches automatically rebased.
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit
e0753c5d5cef5b03c60601364188afb262ccd02e)
Josef Schlehofer [Tue, 30 Aug 2022 07:02:32 +0000 (09:02 +0200)]
kernel: build crypto md5/sha1/sha256 modules for powerpc
This builds and enables kernel optimized modules for mpc85xx target:
- CONFIG_CRYPTO_MD5_PPC [1]
- CONFIG_CRYPTO_SHA1_PPC_SPE [2]
- CONFIG_CRYPTO_SHA256_PPC_SPE [3]
Where it was possible, then use Signal Processing Engine, because
CONFIG_SPE is already enabled in mpc85xx config.
[1] https://cateee.net/lkddb/web-lkddb/CRYPTO_MD5_PPC.html
[2] https://cateee.net/lkddb/web-lkddb/CRYPTO_SHA1_PPC.html
[3] https://cateee.net/lkddb/web-lkddb/CRYPTO_SHA256_PPC_SPE.html
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit
3a702f8733ff371f30e9e3ba1e1aed5f4686b6b4)
Petr Štetiar [Tue, 13 Sep 2022 05:40:37 +0000 (07:40 +0200)]
scripts/download.pl: fix downloads with wget
Several users of wget for downloads (curl is not available in the
system) have reported broken download functionality:
wget --tries=5 --timeout=20 --output-document=- https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.142.tar.xz
http://: Invalid host name.
Thats all happening due to '' was passed as an argument, which got later
expanded to http://.
In the context of a list constructor '' is not nothing, it is an empty
string element. So fix it by using () as it will yield "nothing" and
thus not introduce an empty string element.
Fixes: #10692
Fixes: 90c6e3aedf16 ("scripts: always check certificates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [shellwords() -> ()]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
50a48faa1b8424e6b4b436b7118fffa2cba14b18)
Petr Štetiar [Tue, 13 Sep 2022 05:38:10 +0000 (07:38 +0200)]
scripts/download.pl: silence can't exec curl warning
When running build in verbose mode `make V=s` we can see a lot of
following warnings when curl is not available in the system:
Can't exec "curl": No such file or directory at scripts/download.pl line 77.
So lets fix it by redirecting of the stderr to null hole.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
c836ca84e8f641e10a8349a8f9b7432b33d6cec1)
Josh Roys [Sat, 23 Jul 2022 15:23:16 +0000 (11:23 -0400)]
scripts: always check certificates
Remove flags from wget and curl instructing them to ignore bad server
certificates. Although other mechanisms can protect against malicious
modifications of downloads, other vectors of attack may be available
to an adversary.
TLS certificate verification can be disabled by turning oof the
"Enable TLS certificate verification during package download" option
enabled by default in the "Global build settings" in "make menuconfig"
Signed-off-by: Josh Roys <roysjosh@gmail.com>
[ add additional info on how to disable this option ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
90c6e3aedf167b0ae1baf376e7800a631681e69a)
Petr Štetiar [Tue, 30 Aug 2022 06:41:07 +0000 (08:41 +0200)]
tools: remove xxd package
It shouldn't be needed anymore as we've now `scripts/xxdi.pl`, which
should be self contained and fully compatible `xxd -i` replacement.
Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
88c9056a70901577489ecdc7a25207a9b7576d6e)
Petr Štetiar [Tue, 30 Aug 2022 06:45:39 +0000 (08:45 +0200)]
build: provide xxd -i with scripts/xxdi.pl
Dependency on xxd was added in commit
c4dd2441e787 ("tools: add xxd
(from vim)") as U-Boot requires xxd to create the default environment
from an external file.
Later in commit
2b94aac7a128 ("tools: xxd: use more convenient source
tarball"), xxd from another source was used instead, but that source is
currently unavailable, so let's fix it by using simple xxdi.pl Perl
script instead.
Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
eae2fb8027cb892e42181e471ba344aa5d26bf7e)
Petr Štetiar [Tue, 30 Aug 2022 06:34:26 +0000 (08:34 +0200)]
scripts: xxdi.pl: add xxd -i compat mode
So it can serve as a standalone drop in replacement for xxd utility used
currently mostly in U-Boot packages with `xxd -i` mode which outputs C
include file style, with aim for byte to byte identical output, so the
eventual difference in the generated output is easily spottable.
Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [perl-fu]
(cherry picked from commit
06e01e817ec6643a35beb9e6946689e9cc7d020a)
Jo-Philipp Wich [Tue, 30 Aug 2022 16:20:04 +0000 (18:20 +0200)]
scripts: xxdi.pl: remove File::Slurp dependency
In order to make it more portable.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
8b278a76d90e3724815a5fde32be59f7796be1d8)
Petr Štetiar [Tue, 30 Aug 2022 06:31:42 +0000 (08:31 +0200)]
scripts: add xxdi.pl
xxdi.pl is a Perl script that implements vim's 'xxd -i' mode so that
packages do not have to use all of vim just to get this functionality.
References: #10555
Source: https://github.com/gregkh/xxdi/blob/
97a6bd5cee05d1b15851981ec38ef5a460ddfcb1/xxdi.pl
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
2117d04a3aaad3394c0afec799d9c43f8a09c2cf)
Felix Fietkau [Sat, 26 Mar 2022 23:05:49 +0000 (00:05 +0100)]
mac80211: backport tx queueing bugfixes add a bug fix for a rare crash
Re-introduce the queue wake fix that was reverted due to a regression,
but this time with the follow-up fixes that take care of the regression.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
9a93b62f315ad4c9f021c414ed80ba337ab4a01e)
(cherry-picked from commit
8b804cae5e039142bc63896a75f15146eca3bebc)
(cherry-picked from commit
8b06e06832ebe757246582b65306ad2a2537741f)
Rafał Miłecki [Wed, 14 Sep 2022 12:20:38 +0000 (14:20 +0200)]
bcm53xx: update NVMEM driver for NVRAM
Include support for NVMEM cells.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
2f50c53f1772f24e4687e960e21c5b392fb522f0)
Christian Marangi [Wed, 29 Jun 2022 15:34:51 +0000 (17:34 +0200)]
kernel: backport mtd dynamic partition patch
Backport upstream solution that permits to declare nvmem cells with
dynamic partition defined by special parser.
This provide an OF node for NVMEM and connect it to the defined dynamic
partition.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
1a9ee367343edce263f82cc91a49d796c9d45ea3)
David Bauer [Sun, 11 Sep 2022 14:23:03 +0000 (16:23 +0200)]
ipq40xx: add GL-AP1300 label-mac-device
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
470ca65bda154fb5a601c6bbe20e20646535563f)
David Bauer [Sat, 10 Sep 2022 12:05:34 +0000 (14:05 +0200)]
ipq40xx: add WAN LED mapping for GL-AP1300
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
4d014a7bd6d8fbfe7dc4cebd6c55d85601231fa4)
David Bauer [Fri, 9 Sep 2022 21:35:49 +0000 (23:35 +0200)]
rockchip: add system-LED aliases specific to OpenWrt
Add the aliases sections required to detect LEDs specific to OpenWrt
boot / update indication for the NanoPi R4S.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
1588069612f5db0720cbb942a6f8787878c223c3)
David Bauer [Fri, 9 Sep 2022 23:01:57 +0000 (01:01 +0200)]
rockchip: ensure NanoPi R4S has unique MAC address
Ensure the MAC address for all NanoPi R4S boards is assigned unique for
each board.
FriendlyElec ship two versions of the R4S: The standard as well as the
enterprise edition with only the enterprise edition including the EEPROM
chip that stores the unique MAC address.
In order to assign both board types unique MAC addresses, fall back on
the same method used for the NanoPi R2S in case the EEPROM chip is not
present by generating the board MAC from the SD card CID.
[0] https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R4S#Differences_Between_R4S_Standard_Version_.26_R4S_Enterprise_Version
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
b5675f500daff3ef3f904e53a5566aa7dc09b786)
Bjørn Mork [Fri, 9 Sep 2022 06:28:13 +0000 (08:28 +0200)]
realtek: fix RTL839x receive tag decoding
The previous fixup was incomplete, and the offsets for the
queue and crc_error cpu_tag bitfields were still wrong on
RTL839x.
Fixes: 545c6113c93b ("realtek: fix RTL838x receive tag decoding")
Suggested-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
David Bauer [Fri, 9 Sep 2022 16:14:08 +0000 (18:14 +0200)]
ipq40xx: add LTE packages for GL-AP1300
Add LTE packages required for operating the LTE modem optionally shipped
with the GL-AP1300.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
c7c350922668e262068c9301b75434d7bb4b8d10)
David Bauer [Mon, 5 Sep 2022 17:23:16 +0000 (19:23 +0200)]
ath79: add support for ZTE MF281
Add support for the ZTE MF281 battery-powered WiFi router.
Hardware
--------
SoC: Qualcomm Atheros QCA9563
RAM: 128M DDR2
FLASH: 2M SPI-NOR (GigaDevice GD25Q16)
128M SPI-NAND (GigaDevice)
WLAN: QCA9563 2T2R 802.11 abgn
QCA9886 2T2R 802.11 nac
WWAN: ASRMicro ASR1826
ETH: Qualcomm Atheros QCA8337
UART: 115200 8n1
Unpopulated connector next to SIM slot
(SIM) GND - RX - TX - 3V3
Don't connect 3V3
BUTTON: Reset - WPS
LED: 1x debug-LED (internal)
LEDs on front of the device are controlled
using the modem CPU and can not be controlled
by OpenWrt
Installation
------------
1. Connect to the serial console. Power up the device and interrupt
autoboot when prompted
2. Connect a TFTP server reachable at 192.168.1.66 to the ethernet port.
Serve the OpenWrt initramfs image as "speedbox-2.bin"
3. Boot the initramfs image using U-Boot
$ setenv serverip 192.168.1.66
$ setenv ipaddr 192.168.1.154
$ tftpboot 0x84000000 speedbox-2.bin
$ bootm
4. Copy the OpenWrt factory image to the device using scp and write to
the NAND flash
$ mtd write /path/to/openwrt/factory.bin firmware
WWAN
----
The WWAN card can be used with OpenWrt. Example configuration for
connection with a unauthenticated dual-stack APN:
network.lte=interface
network.lte.proto='ncm'
network.lte.device='/dev/ttyACM0'
network.lte.pdptype='IPV4V6'
network.lte.apn='internet.telekom'
network.lte.ipv6='auto'
network.lte.delay='10'
The WWAN card is running a modified version of OpenWrt and handles
power-management as well as the LED controller (AW9523). A root shell
can be acquired by installing adb using opkg and executing "adb shell".
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
1e1695f959e678868bb7911d059b847f38fc9cf4)
Bjørn Mork [Thu, 8 Sep 2022 17:35:34 +0000 (19:35 +0200)]
realtek: fix RTL838x receive tag decoding
Commit
dc9cc0d3e2a1 ("realtek: add QoS and rate control") replaced a
16 bit reserved field in the RTL83xx packet header with the initial
cpu_tag word, shifting the real cpu_tag fields by one. Adjusting for
this new shift was partially forgotten in the new RX tag decoders.
This caused the switch to block IGMP, effectively blocking IPv4
multicast.
The bug was partially fixed by commit
9d847244d9fd ("realtek: fix
RTL839X receive tag decoding")
Fix on RTL838x too, including correct NIC_RX_REASON_SPECIAL_TRAP value.
Suggested-by: Jan Hoffmann <jan@3e8.eu>
Fixes: dc9cc0d3e2a1 ("realtek: add QoS and rate control")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit
545c6113c93bbf7de1b0e515141a4565f7e6cece)
Felix Fietkau [Tue, 6 Sep 2022 20:44:43 +0000 (22:44 +0200)]
mt76: update to the latest version
d70546462b7b mt76: fix 5 GHz connection regression on mt76x0/mt76x2
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit
33c11442b2fc60313a2d3196c9b01cf9b0931305)
Felix Fietkau [Tue, 6 Sep 2022 10:12:12 +0000 (12:12 +0200)]
hostapd: rename hostapd multicast_to_unicast option to multicast_to_unicast_all
There are two feature currently altered by the multicast_to_unicast option.
1. bridge level multicast_to_unicast via IGMP snooping
2. hostapd/mac80211 config multicast_to_unicast setting
The hostapd/mac80211 setting has the side effect of converting *all* multicast
or broadcast traffic into per-station duplicated unicast traffic, which can
in some cases break expectations of various protocols.
It also has been observed to cause ARP lookup failure between stations
connected to the same interface.
The bridge level feature is much more useful, since it only covers actual
multicast traffic managed by IGMP, and it implicitly defaults to 1 already.
Renaming the hostapd/mac80211 option to multicast_to_unicast_all should avoid
unintentionally enabling this feature
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit
09ea1db93b53d2c1e4a081f20fbbddd4bffd451d)
Rafał Miłecki [Sun, 4 Sep 2022 14:38:11 +0000 (16:38 +0200)]
bcm27xx: make NVMEM driver patch apply again
Fixes: 4efa0b70d54f1 ("kernel: backport U-Boot environment data NVMEM driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 17 Aug 2022 20:45:11 +0000 (22:45 +0200)]
bcm4908: enable NVMEM U-Boot env data driver
It's needed for devices with U-Boot bootloader.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
fb47b9fa1aa760de58f1b43d9f3e654acf1f1671)
Rafał Miłecki [Wed, 17 Aug 2022 18:44:52 +0000 (20:44 +0200)]
kernel: backport U-Boot environment data NVMEM driver
It parses U-Boot env data into NVMEM cells.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
34cf31043504473df3174a22d163b71b75e46542)
Rafał Miłecki [Fri, 8 Jul 2022 05:58:20 +0000 (07:58 +0200)]
kernel: backport mtd patch adding of_platform_populate() calls
This is required for non-parser drivers handling MTD devices.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
41e1e838fbbb0308ad7353a3714e04b8c4585e7e)
Hauke Mehrtens [Sat, 3 Sep 2022 16:49:08 +0000 (18:49 +0200)]
OpenWrt v22.03.0: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sat, 3 Sep 2022 16:49:01 +0000 (18:49 +0200)]
OpenWrt v22.03.0: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Daniel Golle [Sat, 3 Sep 2022 02:53:56 +0000 (03:53 +0100)]
uboot-mediatek: mt7622: suppress unwanted pinctrl warning
Import patch which removes the default pinctrl of uart0 to suppress
the unwanted warning. Apply also to downstream boards.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Sat, 3 Sep 2022 01:24:14 +0000 (02:24 +0100)]
mediatek: mt7622: fix DTS compatible of UniFi 6 LR variants
Make sure the compatible string in DTS matches the now v1/v2
differentiated board name in target/linux/mediatek/image/mt7622.mk.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
be555b9dd8618b8da68c42ae8dda493337519838)
Daniel Golle [Sat, 3 Sep 2022 00:57:08 +0000 (01:57 +0100)]
uboot-mediatek: backport fix for unstable UART on MT7622
Import pending patch "arm: dts: mt7622: force high-speed mode for uart"
from Weijie Gao <weijie.gao@mediatek.com> fixing the UART problems on
MT7622 which made it hard to use the U-Boot menu on devices with this
SoC.
This patch is also contained in commit
c09eb08dad ("uboot-mediatek: add support for MT798x platforms")
in the development branch.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Mon, 15 Aug 2022 11:19:15 +0000 (13:19 +0200)]
uboot-mediatek: no compression means IH_COMP_NONE
Treat missing compression node in FIT image as IH_COMP_NONE.
This is implicentely already happening in most places, but for now
was still triggering an annoying warning about initramfs compression
being obsolete despite compression note being absent.
Fix this.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
0a18456ffc25d6a26911fca6f9079090243c2284)
Daniel Golle [Sun, 28 Aug 2022 19:20:31 +0000 (20:20 +0100)]
uboot-mediatek: fix factory reset on UBI
Truncating a UBI volume using `ubi write 0x0 volname 0x0` results in
segfault on newer U-Boot. Write 1MB of 0s instead.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
d118cbdfece181994a96d1bcb1868bd807d481bf)
Daniel Golle [Sun, 28 Aug 2022 15:07:05 +0000 (16:07 +0100)]
uboot-envtools: mt7622: use 4k sectors for UniFi 6 LR (ubootmod)
Use 4k sectors when accessing the U-Boot environment on the 64MiB
SPI-NOR flash chip found in the UniFi 6 LR. The speeds up environment
write access as only 4kB instead of 64kB have to be written.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
f0adf253fdcf78ce005dad9652b405a4ad2726e6)
Daniel Golle [Sun, 28 Aug 2022 15:05:30 +0000 (16:05 +0100)]
mediatek: mt7622: use variable sector size for spi-nor
Make use of minor sector size (4k) on supported SPI-NOR flash chips.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
51f4c8417819bc0ba6bc1808328478503e179fc4)
Daniel Golle [Sun, 28 Aug 2022 15:01:12 +0000 (16:01 +0100)]
uboot-mediatek: fix Ubiquiti UniFi 6 LR U-Boot mod
Image names as well as the calculation of the padded image size did
not work as intended. Fix that.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
0bc8889e7b4f19d7e33a9be6c3db918fed051501)
Martin Kennedy [Tue, 30 Aug 2022 00:47:24 +0000 (20:47 -0400)]
mpc85xx: Drop pci aliases to avoid domain changes
As of upstream Linux commit
0fe1e96fef0a ("powerpc/pci: Prefer PCI
domain assignment via DT 'linux,pci-domain' and alias"), the PCIe
domain address is no longer numbered by the lowest 16 bits of the PCI
register address after a fallthrough. Instead of the fallthrough, the
enumeration process accepts the alias ID (as determined by
`of_alias_scan()`). This causes e.g.:
9000:00:00.0 PCI bridge: Freescale Semiconductor Inc P1020E (rev 11)
9000:01:00.0 Network controller: Qualcomm Atheros AR958x 802.11abgn ...
to become
0000:00:00.0 PCI bridge: Freescale Semiconductor Inc P1020E (rev 11)
0000:01:00.0 Network controller: Qualcomm Atheros AR958x 802.11abgn ...
... which then causes the sysfs path of the netdev to change,
invalidating the `wifi_device.path`s enumerated in
`/etc/config/wireless`.
One other solution might be to migrate the uci configuration, as was
done for mvebu in commit
0bd5aa89fcf2 ("mvebu: Migrate uci config to
new PCIe path"). However, there are concerns that the sysfs path will
change once again once some upstream patches[^2][^3] are merged and
backported (and `CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT` is enabled).
Instead, remove the aliases and allow the fallthrough to continue for
now. We will provide a migration in a later release.
This was first reported as a Github issue[^1].
[^1]: https://github.com/openwrt/openwrt/issues/10530
[^2]: https://lore.kernel.org/linuxppc-dev/
20220706104308.5390-1-pali@kernel.org/t/#u
[^3]: https://lore.kernel.org/linuxppc-dev/
20220706101043.4867-1-pali@kernel.org/
Fixes: #10530
Tested-by: Martin Kennedy <hurricos@gmail.com>
[Tested on the Aerohive HiveAP 330 and Extreme Networks WS-AP3825i]
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
(cherry picked from commit
7f4b4c29f3489697dca7495216460d0ed5023e02)
Claudiu Beznea [Thu, 28 Jul 2022 10:14:59 +0000 (13:14 +0300)]
at91bootstrap: use sdmmc0 as booting media for sama5d27_som1_ek
Commit
0b7c66c ("at91bootstrap: add sama5d27_som1_eksd1_uboot as
default defconfig") changed default booting media for sama5d27_som1_ek
board w/o any reason. Changed it back to sdmmc0 as it is for all the
other Microchip supported distributions for this board (Buildroot,
Yocto Project). The initial commit cannot be cleanly reverted.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
(cherry picked from commit
e9f12931e60ee291cd7d2c8fd19a14682dae0197)
Claudiu Beznea [Thu, 28 Jul 2022 10:12:34 +0000 (13:12 +0300)]
uboot-at91: use sdmmc0 as booting media for sama5d27_som1_ek
Commit
adc69fe (""uboot-at91: changed som1 ek default defconfigs")
changed the booting media to sdmmc1 as default booting w/o any reason.
The Microchip releases for the rest of supported distributions (Buildroot,
Yocto Project) uses sdmmc0 as default booting media for this board.
Thus change it back to sdmmc0. With this remove references to sdmmc1
config. The initial commit cannot be cleanly reverted.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
(cherry picked from commit
9a49788008c18fd4fe6fefe9697962c102fb14c6)
Rafał Miłecki [Wed, 17 Aug 2022 09:04:29 +0000 (11:04 +0200)]
kernel: rename 5.20 patches to 6.0
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
372ee1919d281dd3e86121996805291a6948c982)
Rafał Miłecki [Thu, 28 Jul 2022 15:46:33 +0000 (17:46 +0200)]
bcm4908: enable & setup packet steering
Without packet steering NAT masquarade speed on BCM4908 /jumps/ between
two speeds:
1. 826 Mb/s (±3 Mb/s)
2. 909 Mb/s (±8 Mb/s)
and it never reaches ~940 Mb/s.
Proper packet steering can improve it. Below are testing results for
running iperf TCP traffic from LAN to WAN. They were used to pick up
golden values.
┌──────────┬──────────┬───────────┐
│ eth0 │ br-lan │ speed │
│ rps_cpus │ rps_cpus │ [Mbps] │
├──────────┼──────────┼───────────┤
│ 0 │ 0 │ 743 / 804 │
│ 0 │ 1 │ 738 / 821 │
│ 0 │ 2 │ ✓ 940 │
│ 0 │ 4 │ ✓ 938 │
│ 0 │ 8 │ ✓ 941 │
├──────────┼──────────┼───────────┤
│ 1 │ 0 │ 829 │
│ 1 │ 1 │ 829 │
│ 1 │ 2 │ ✓ 942 │
│ 1 │ 4 │ ✓ 941 │
│ 1 │ 8 │ ✓ 941 │
├──────────┼──────────┼───────────┤
│ 2 │ 0 │ ✓ 942 │
│ 2 │ 1 │ 926 │
│ 2 │ 2 │ ✓ 942 │
│ 2 │ 4 │ ✓ 942 │
│ 2 │ 8 │ ✓ 941 │
├──────────┼──────────┼───────────┤
│ 4 │ 0 │ ✓ 941 │
│ 4 │ 1 │ 925 │
│ 4 │ 2 │ ✓ 941 │
│ 4 │ 4 │ ✓ 941 │
│ 4 │ 8 │ ✓ 941 │
├──────────┼──────────┼───────────┤
│ 8 │ 0 │ ✓ 942 │
│ 8 │ 1 │ 925 │
│ 8 │ 2 │ ✓ 941 │
│ 8 │ 4 │ ✓ 942 │
│ 8 │ 8 │ ✓ 942 │
└──────────┴──────────┴───────────┘
Ref:
fcbd39689ebfe ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
57cad53f4e52be987cdd61308ff7d2704baca539)
Rafał Miłecki [Wed, 20 Jul 2022 18:03:56 +0000 (20:03 +0200)]
bcm4908: prepare for Asus GT-AX6000 support
It isn't tested & Linux DT will surely need more work.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
3f2b2fe084c0019221a17e3217a01c41d003f6fd)
Rafał Miłecki [Wed, 20 Jul 2022 16:12:31 +0000 (18:12 +0200)]
bcm4908: backport bcmbca DT patches queued for 5.20
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
d63ef7c90f75393270ec4f5ff1b2563d6bd52066)
Rafał Miłecki [Wed, 30 Mar 2022 14:05:55 +0000 (16:05 +0200)]
bcm53xx: backport DT changes from 5.17 & 5.18
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
a721fb9f839b3ca71da275a1c99620ef9342fb28)
Rafał Miłecki [Tue, 29 Mar 2022 14:14:54 +0000 (16:14 +0200)]
bcm53xx: drop dead upgrade code
platform_nand_pre_upgrade() is gone since commit
790692dde2b9
("base-files: drop support for the platform_nand_pre_upgrade()").
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
a6dc0f680d3715322abd7a5dc1426f56274292ac)
Jo-Philipp Wich [Thu, 1 Sep 2022 10:37:58 +0000 (12:37 +0200)]
firewall4: update to latest Git HEAD
f5fcdcf cli: introduce test mode and refuse firewall restart on errors
a540f6d fw4: fix cosmetic issue with per-ruleset and per-table include paths
695e821 doc: fix swapped include positions in nftables.d README
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
ab31ffc425b59afc102f8a3275791c153f39c8f4)
Jo-Philipp Wich [Mon, 29 Aug 2022 14:02:16 +0000 (16:02 +0200)]
ucode: update to latest Git HEAD
344fa9e lib: extend render() to support function values
89452b2 lib: improve getenv() and split() implementations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
[fix commit subject]
(cherry picked from commit
c6d6306827e9296faad26981996825ce3e90259d)
Felix Fietkau [Tue, 30 Aug 2022 08:57:26 +0000 (10:57 +0200)]
mac80211: disable ft-over-ds by default
Testing has shown it to be very unreliable in variety of configurations.
It is not mandatory, so let's disable it by default until we have a better
solution.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit
2984a0420649733662ff95b0aff720b8c2c19f8a)
Thibaut VARÈNE [Wed, 17 Aug 2022 17:36:41 +0000 (19:36 +0200)]
ramips: define Yuncore AX820 switch LEDs
This patch defines the two switch LED to bring them under user control.
Fixes: 158a5af80102d ("ramips: improve YunCore AX820 LEDs")
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
[rmilecki: leave "label"s in place]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
7bee10a7d2d16251113147c28dd4548af5c14bab)
Albin Hellström [Thu, 7 Jan 2021 21:51:06 +0000 (22:51 +0100)]
ath79: add support for Extreme Networks WS-AP3805i
Specifications:
- SoC: Qualcomm Atheros QCA9557-AT4A
- RAM: 2x 128MB Nanya NT5TU64M16HG
- FLASH: 64MB - SPANSION FL512SAIFG1
- LAN: Atheros AR8035-A (RGMII GbE with PoE+ IN)
- WLAN2: Qualcomm Atheros QCA9557 2x2 2T2R
- WLAN5: Qualcomm Atheros QCA9882-BR4A 2x2 2T2R
- SERIAL: UART pins at J10 (115200 8n1)
Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V)
- LEDs: Power (Green/Amber)
WiFi 5 (Green)
WiFi 2 (Green)
- BTN: Reset
Installation:
1. Download the OpenWrt initramfs-image.
Place it into a TFTP server root directory and rename it to
1D01A8C0.img
Configure the TFTP server to listen at 192.168.1.66/24.
2. Connect the TFTP server to the access point.
3. Connect to the serial console of the access point.
Attach power and interrupt the boot procedure when prompted.
Credentials are admin / new2day
4. Configure U-Boot for booting OpenWrt from ram and flash:
$ setenv boot_openwrt 'setenv bootargs; bootm 0xa1280000'
$ setenv ramboot_openwrt 'setenv serverip 192.168.1.66;
tftpboot 0x89000000
1D01A8C0.img; bootm'
$ setenv bootcmd 'run boot_openwrt'
$ saveenv
5. Load OpenWrt into memory:
$ run ramboot_openwrt
6. Transfer the OpenWrt sysupgrade image to the device.
Write the image to flash using sysupgrade:
$ sysupgrade -n /path/to/openwrt-sysupgrade.bin
Signed-off-by: Albin Hellström <albin.hellstrom@gmail.com>
[rename vendor - minor style fixes - update commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
f8c87aa2d27ab405f284dd4357377ab5c893a345)
Hauke Mehrtens [Sun, 28 Aug 2022 13:09:23 +0000 (15:09 +0200)]
kernel: Refresh on 5.10.138
Refresh all patches on top of kernel 5.10.138.
The following patches were applied upstream:
bcm27xx/patches-5.10/950-0311-drm-vc4-Adopt-the-dma-configuration-from-the-HVS-or-.patch
bcm27xx/patches-5.10/950-0317-vc4_hdmi-Remove-firmware-logic-for-MAI-threshold-set.patch
bcm27xx/patches-5.10/950-0346-drm-vc4-A-present-but-empty-dmas-disables-audio.patch
bcm27xx/patches-5.10/950-0354-drm-vc4-Add-the-2711-HVS-as-a-suitable-DMA-node.patch
bcm27xx/patches-5.10/950-0413-drm-vc4-hdmi-Don-t-access-the-connector-state-in-res.patch
bcm27xx/patches-5.10/950-0505-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch
bcm27xx/patches-5.10/950-0512-vc4-drm-vc4_plane-Remove-subpixel-positioning-check.patch
bcm27xx/patches-5.10/950-0560-drm-vc4-drv-Remove-the-DSI-pointer-in-vc4_drv.patch
bcm27xx/patches-5.10/950-0561-drm-vc4-dsi-Use-snprintf-for-the-PHY-clocks-instead-.patch
bcm27xx/patches-5.10/950-0562-drm-vc4-dsi-Introduce-a-variant-structure.patch
bcm27xx/patches-5.10/950-0565-drm-vc4-Correct-pixel-order-for-DSI0.patch
bcm27xx/patches-5.10/950-0566-drm-vc4-Register-dsi0-as-the-correct-vc4-encoder-typ.patch
bcm27xx/patches-5.10/950-0567-drm-vc4-Fix-dsi0-interrupt-support.patch
bcm27xx/patches-5.10/950-0568-drm-vc4-Add-correct-stop-condition-to-vc4_dsi_encode.patch
bcm27xx/patches-5.10/950-0647-drm-vc4-Fix-timings-for-interlaced-modes.patch
bcm27xx/patches-5.10/950-0695-drm-vc4-Fix-margin-calculations-for-the-right-bottom.patch
Upstream sets the pixel clock to 340MHz now, do not set it to 600MHz any more.
bcm27xx/patches-5.10/950-0576-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch
Fixes: 89956c653252 ("kernel: bump 5.10 to 5.10.138")
Fixes: 4209c33ae27d ("kernel: bump 5.10 to 5.10.137")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sat, 27 Aug 2022 21:11:30 +0000 (23:11 +0200)]
mbedtls: update to version 2.28.1
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.1
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for security issues.
The build problem was reported upstream:
https://github.com/Mbed-TLS/mbedtls/issues/6243
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
f3870546a544c39c6fde2e7e014394aa085d8057)
Petr Štetiar [Sun, 28 Aug 2022 06:46:46 +0000 (08:46 +0200)]
Revert "mediatek: mt7622: fix banana pi r64 wps button"
This reverts commit
5a81e0006380c301cdc691838f519275fc6c28d2 as it was
backported upstream in commit
a1e238690916 ("arm64: dts: mt7622: fix
BPI-R64 WPS button").
Signed-off-by: Petr Štetiar <ynezz@true.cz>
John Audia [Thu, 25 Aug 2022 14:52:50 +0000 (10:52 -0400)]
kernel: bump 5.10 to 5.10.138
All patches automatically rebased.
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit
fc89ec06928469021010c2f5776450f739af07a5)
Petr Štetiar [Mon, 22 Aug 2022 20:45:53 +0000 (22:45 +0200)]
kernel: bump 5.10 to 5.10.137
Removed following upstreamed patch:
* bcm53xx: 081-next-ARM_dts_BCM53015-add-mr26.patch
All other patches automagically rebased.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
d1163fd13f6498826d202f0b58cedf32d7891d52)
Etienne Champetier [Sat, 20 Aug 2022 22:08:15 +0000 (18:08 -0400)]
iptables: default to ip(6)tables-nft when using buildroot
35fec487e30f05c81bd135326a993dad7f861812 fixed opkg usage,
but when using buildroot we were still defaulting to
ip(6)tables-legacy
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit
0c8d7e34ab35f6b41f034fd94fec740970e0125b)
Arınç ÜNAL [Tue, 5 Jul 2022 14:10:43 +0000 (17:10 +0300)]
ramips: fix GB-PC1 and GB-PC2 device support
Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.
Tested on GB-PC2 by Petr.
Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit
4807bd6a00bcf44dd821047db76a2a799f403cd4)
Joerg Werner [Sun, 26 Jun 2022 15:18:39 +0000 (17:18 +0200)]
hostapd: fix WPA3 enterprise keys and ciphers
WPA3 enterprise requires group_mgmt_cipher=BIP-GMAC-256 and if 802.11r is
active also wpa_key_mgmt FT-EAP-SHA384. This commit also requires
corresponding changes in netifd.
Signed-off-by: Joerg Werner <schreibubi@gmail.com>
(cherry picked from commit
9fbb76c0470fd54f1f34909b1098d0f76078878f)
Hauke Mehrtens [Sat, 20 Aug 2022 20:51:29 +0000 (22:51 +0200)]
iwinfo: update to latest HEAD
0dad3e6 Add support for CCMP-256 and GCMP-256 ciphers
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
cc6a323e2328176b732b13f1f09745354270cd39)
Hauke Mehrtens [Tue, 16 Aug 2022 21:38:52 +0000 (23:38 +0200)]
iproute2: Fix KERNEL_INCLUDE in SDK
In the SDK the folder $(LINUX_DIR)/user_headers/include does not exist,
but it more or less contains the same content as
$(LINUX_DIR)/include/uapi which also exists in the SDK.
Since iproute2 commit
1d819dcc741e ("configure: fix parsing issue on
include_dir option") it checks if this folder exists and aborts the
build if it does not exists.
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=
1d819dcc741e25958190e31f8186c940713fa0a8
With this commit the KERNEL_INCLUDE variable points to a valid folder
with the kernel include headers. I am not sure if they are actually
needed because the build worked before even with an invalid path.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
60738fedede1746922a8b227f24ad5c733661585)
Hauke Mehrtens [Sat, 13 Aug 2022 17:01:15 +0000 (19:01 +0200)]
umbim: bump to git HEAD
146bc77 umbim: fix invalid mbim message string encoding
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
90bedc411b1e98e9adf668dde09f8eafe4490344)
Felix Fietkau [Fri, 26 Aug 2022 17:48:45 +0000 (19:48 +0200)]
mt76: update to the latest version
9485e3b47066 mt76: remove q->qid
e5674c4aa402 mt76: mt7921: enable HW beacon filter not depending on PM flag
7fd299e3c921 mt76: mt7921: enable HW beacon filter in the initialization stage
d5459efaaf14 mt76: mt7921: make mt7921_pci_driver static
b8304b456e23 mt76: connac: move tx initialization/cleanup in mt76_connac module
6e0d7077486c mt76: mt7921: reduce log severity levels for informative messages
cb80da974fe6 mt76: mt7921: reduce the mutex lock scope during reset
a2d61f4f4063 mt76: mt7915 add ht mpdu density
08ea730c1130 mt76: add len parameter to __mt76_mcu_msg_alloc signature
60ef85fa352c mt76: introduce MT_RXQ_BAND2 and MT_RXQ_BAND2_WA in mt76_rxq_id
8ccbb38ca6e6 mt76: add phy_idx in mt76_rx_status
eb19ac83c07e mt76: introduce phys array in mt76_dev structure
30887591e3ab mt76: add phy_idx to mt76_wcid
4bf8c20a9524 mt76: convert MT_TX_HW_QUEUE_EXT_PHY to MT_TX_HW_QUEUE_PHY
e6c6bf8cee09 mt76: get rid of mt76_wcid_hw routine
120f73ad992a mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init()
111e92cf8c22 mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node()
13bedd62ff4a mt76: connac: introduce mt76_connac_reg_map structure
5ec78e1ec43d wifi: mt76: fix reading current per-tid starting sequence number for aggregation
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit
ec7d32f3769fbd815f72a7471e4bb7a07aee359d)
Felix Fietkau [Thu, 25 Aug 2022 19:16:00 +0000 (21:16 +0200)]
netifd: update to the latest version
76d2d41b7355 interface: fix use-after-free bug when rewriting resolv.conf
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit
31648c4b59add5b1cb441073a46c80ab768b588c)
Hauke Mehrtens [Sat, 20 Aug 2022 20:52:49 +0000 (22:52 +0200)]
netifd: update to git HEAD
87fbefd interface: support "zone" config option
bfa039c netifd: fix WPA3 enterprise ciphers
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry-picked from commit
8008816a2ceeb7e66d27d9882685933bb9df4c76)
Petr Štetiar [Wed, 24 Aug 2022 11:10:37 +0000 (13:10 +0200)]
rpcd: bump version to 2022-08-24
gcc 10 with -O2 reports following:
In function ‘strncpy’,
inlined from ‘rpc_sys_packagelist’ at /opt/devel/openwrt/c-projects/rpcd/sys.c:244:4:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
inlined from ‘rpc_sys_packagelist’ at /opt/devel/openwrt/c-projects/rpcd/sys.c:227:4:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since it is not possible to avoid truncation by strncpy, it is necessary
to make sure the result of strncpy is properly NUL-terminated and the
NUL must be inserted explicitly, after strncpy has returned.
References: #10442
Reported-by: Alexey Smirnov <s.alexey@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
34ddd2e545f068e4684ecce98c1da3a6c7c9b04a)
Jo-Philipp Wich [Fri, 12 Aug 2022 19:37:05 +0000 (21:37 +0200)]
rpcd: update to latest Git HEAD
ae5afea ucode: parse ucode plugin scripts in raw mode, init search path
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit
66a360206e341abdd1e5560e9cb522d8e453b095)
Jo-Philipp Wich [Fri, 12 Aug 2022 19:24:26 +0000 (21:24 +0200)]
uhttpd: update to latest Git HEAD
e3395cd ucode: initialize search path before VM init
8cb3f85 ucode: initialize default library search path
188dea2 utils: accept '?' as path terminator in uh_path_match()
c5eac5d file: support using dynamic script handlers as error pages
290ff88 relay: trigger close if in header read state with pending data
f9db538 ucode: ignore exit exceptions
8ba0b64 cmake: use variables and find_library for dependency
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit
4ee77cfcfadcd2b28678a1f3e8e78383b0b21963)
Jo-Philipp Wich [Wed, 29 Jun 2022 18:19:35 +0000 (20:19 +0200)]
ucode: update to latest Git HEAD
bcdd2cb examples: add module search path initialization and freeing
ee1946f ubus: fix GCC strncpy() truncation warning
131d99c lib: introduce three new functions call(), loadstring() and loadfile()
8e8dae0 lib: introduce helper function for indenting error messages
476f02b lib: simplify include_path()
d84b53a source: avoid null pointer access in uc_source_runpath_set()
c43a54f types: gracefully handle unpatched upvalues in ucv_free()
e2fb11a README.md: document gc() function
b41cb2d main: introduce -g flag to allow enabling periodic gc from cli
85d7885 lib: implement gc()
47528f0 vm: support automatic periodic GC runs
381cc75 types: treat vm->exports as GC roots
fcc49e6 compiler: add import statement support for dynamic extensions
c9442f1 vm: introduce new I_DYNLOAD opcode
b6fd8a2 lib: internally expose new uc_require_library() helper
a486adc vm: don't treat offset 0 special for exceptions
41ccd19 compiler: don't treat offset 0 special at syntax errors
b4a3f68 compiler: improve formatting of nested syntax error messages
5d5dadc program: remove now unused uc_program_export_lookup()
304995b compiler: rework export index allocation
506cc37 compiler: fix deriving module path from source runpath
54b7fac compiler: enforce stricter module compilation rules
d62e372 vm: don't initialize upvalues for module functions
b856602 program: add serialization and deserialization for module function flag
d7d1bde compiler: add a flag denoting module functions
156d584 treewide: unexport libucode internal functions
10e056d compiler: add support for import/export statements
862e49d compiler: resolve predeclared upvalues
78dfb08 compiler: require a name in function declarations
afd78c1 compiler: fix reported source position in inc/dec operator error
e1c3db0 tests: run_tests.sh: substitute dynamic test directory path in output
3c168b5 vm, cli: move search path into global configuration structure
d85bc71 vm: introduce import and export opcodes
365782e vm: honor constant flag of objects and arrays
6becc64 vm: transparently resolve upvalue references
3418967 vm: gracefully handle unresolved upvalues
50cf572 program: add function to globally lookup exported name
c441f65 program: add infrastructure to handle multiple sources per program
2322468 program: fix reporting source position of first instruction
9c9a9ec program: fix en/decoding debuginfo upvalue slots in precompiled bytecode
41114a0 source: add tracking of exported symbols
70ae304 lib: honor constant flag of arrays
3c104f5 types: resolve upvalue references on stringification
3a6f9cb types: add ability to mark array and object values as constant
b738f3a lexer: recognize module related keywords
03c8e4b lexer: rewrite token scanner
fd433aa lexer: fix parsing with disabled block left stripping
557577a rtnl: fix parsing/creation of IFLA_AF_SPEC RTA for the AF_BRIDGE family
35c6b73 compiler: fix stack mismatch on continue statements nested in switches
f673096 uloop: end uloop on exceptions in managed code
2e5426c ubus: end uloop on exceptions in managed code
c024270 rtnl: expose IFLA_STATS64 contents
d3c58c0 rtnl: expose ifinfomsg.ifi_change member
c4dde50 rtnl: update NETLINK_GET_STRICT_CHK socket flag with every request
7ef0d02 nl80211: fix NL80211_SURVEY_INFO_NOISE datatype
9a2e592 compiler: fix stack mismatch on nonmatching switch statements with locals
03c8ca5 nl80211: recognize further NL80211_STA_INFO_* NLAs
a1ed566 struct: add optional offset argument to `unpack()`
230e595 rtnl: fix segmentation fault on parsing linkinfo RTA without data
523566d rtnl: zero request message headers
56be30d rtnl: fix premature netlink reply receive abort
1347440 rtnl: avoid stray "netlink: %d bytes leftover after parsing attributes."
44b0a3b struct: fix packing `*` format after other repeated formats
Also package uloop binding module which has been introduced by a previous
ucode update and introduce a host build with the basic set of modules.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
3446d32616efad335c4eeeafc2f542089839bf20)
Jo-Philipp Wich [Mon, 8 Aug 2022 22:05:02 +0000 (00:05 +0200)]
nftables: fix parsing date expressions
Musl libc does not support the non-POSIX "%F" format for strptime() so
replace all occurrences of it with an equivalent "%Y-%m-%d" format.
Fixes: #10419
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit
e6e4f979999393825370e9db9fe04d75cb01acf2)
Jo-Philipp Wich [Wed, 24 Aug 2022 21:04:45 +0000 (23:04 +0200)]
firewall4: update to latest Git HEAD
a4484d4 fw4: support automatic includes
ca7e3a1 fw4: honour enabled option of include sections
5a02f74 tests: add missing fs.stat) mock data for `nf_conntrack_dummy`
111a7f7 fw4: don't inherit zone family from ct helpers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
fe86b2ffaaf6059250e3ba0a9e1436312415e23f)
Christian Marangi [Sun, 21 Aug 2022 16:52:52 +0000 (18:52 +0200)]
ipq806x: add missing scaling_available_frequencies for dedicated cpufreq
Add missing scaling_available_frequencies sysfs entry for dedicated
cpufreq driver.
This sysfs entry is not standard and each cpufreq driver needs to
provide it and declare it in the cpufreq driver struct attr.
Fixes: 5dbbefcbccc0 ("ipq806x: introduce dedicated krait cpufreq")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[ fix conflict by dropping 5.15 patch not present in openwrt-22.03 ]
(cherry picked from commit
d6994c53cd0e5334478d2aab424674da438804e2)
Sultan Alsawaf [Fri, 22 Jul 2022 06:36:31 +0000 (23:36 -0700)]
mac80211: parse the correct set of HE capabilities for AP mode
It is common for 802.11ax NICs to support more than just AP mode, which
results in there being a distinct set of HE capabilities for each mode. As
(bad) luck would have it, iw prints out info for each HE mode in sequential
order according to `enum nl80211_iftype`, and AP mode isn't always first.
As a result, the wrong set of HE capabilities can be parsed if an AP NIC
supports station (managed) mode or any other mode preceding AP mode, since
only the first set of HE capabilities printed by iw is parsed from awk's
output.
This has a noticeable impact on beamforming for example, since managed mode
usually doesn't have beamformer capabilities enabled, while AP mode does.
Hostapd won't be set up with the configs to enable beamformer capabilities
in this scenario, causing hostapd to disable beamforming to HE stations
even when it's supported by the AP.
Always parse the correct set of HE capabilities for AP mode to fix this.
This is achieved by trimming all of iw's output prior to the AP mode
capabilities, which ensures that the first set of HE capabilities are
always for AP mode.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
(cherry picked from commit
f338f76a66a50d201ae57c98852aa9c74e9e278a)
Mikhail Zhilkin [Sat, 9 Jul 2022 17:09:57 +0000 (17:09 +0000)]
ramips: get MAC addr from the encrypted partition (WG4хх223)
This commit resolves #10062. Adds decryption of the Arcadyan WG4xx223
configuration partition (board_data)to get base MAC address from it.
As a result, after this change the hack with saving MAC addressees to
u-boot-env before installation of OpenWrt is no longer necessary.
This is necessary for the following devices:
- Beeline Smartbox Flash (Arcadyan WG443223)
- MTS WG430223 (Arcadyan WG430223)
Example:
+----------------+-------------------+------------------------+
| | MTS WG430223 | Beeline Smartbox Flash |
+----------------+-------------------+------------------------+
| base mac (mtd) | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:06 |
| label | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:09 |
| LAN | A4:xx:xx:51:xx:F6 | 30:xx:xx:51:xx:09 |
| WAN | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:06 |
| WLAN_2g | A4:xx:xx:51:xx:F5 | 30:xx:xx:51:xx:07 |
| WLAN_5g | A6:xx:xx:21:xx:F5 | 32:xx:xx:41:xx:07 |
+----------------+-------------------+------------------------+
Collected statistic shows that the 2-4th bits of the 7th byte of the
WLAN_5g MAC are the constant (see #10062 for more details):
- Beeline Smartbox Flash - 100
- MTS WG430223 - 010
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
a6b0d0806055a53a2538df83f8322c38ee9f3441)
Mikhail Zhilkin [Tue, 12 Jul 2022 14:52:04 +0000 (14:52 +0000)]
base-files: add mtd_get_mac_encrypted_arcadyan function
Some Arcadyan devices (e.g. MTS WG430223) keep their config in encrypted
mtd. This adds mtd_get_mac_encrypted_arcadyan() function to get the MAC
address from the encrypted partition. Function uses uencrypt utility for
decryption (and openssl if the uencrypt wasn't found).
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
12c971bc26ac0ff04257bc475fff6fa68068c6c0)
Eneas U de Queiroz [Fri, 8 Jul 2022 14:08:21 +0000 (11:08 -0300)]
uencrypt: add package to decrypt WG4хх223 config
This adds a simple AES-128-CBC encryption/decryption program using
either wolfSSL or OpenSSL as backend to decrypt Arcadyan WG4xx223
configuration partitions. The ipk size is 3,355 bytes.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit
bc43ad88ed18722c0621fd6dfef0ff68268f4e14)
Hans Dedecker [Fri, 5 Aug 2022 16:29:05 +0000 (18:29 +0200)]
odhcp6c: update to git HEAD
7d21e8d dhcpv6: add option to ignore stateless advertise
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit
a23d132cff541210b281ac60de619e7ce7ec3ba0)
Mikhail Zhilkin [Thu, 28 Apr 2022 18:24:07 +0000 (18:24 +0000)]
ramips: allow custom trx magic for Arcadyan
This commit:
1. Renames beeline-trx recipe in mt7621.mk to arcadyan-trx. The recipe
is necessary for:
- MTS WG430223 (Arcadyan WG430223)
- Beeline Smartbox Flash (Arcadyan WG443223)
2. Allows specify custom trx magic which is different for the routers
mentined above.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
109c503bee9aed34ffb485a29af1e2ec6f3bb6b1)
[fix merging conflict in mt7621.mk]
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Mikhail Zhilkin [Wed, 4 May 2022 15:07:28 +0000 (15:07 +0000)]
ramips: create new dtsi for Arcadyan routers
This commit moves common properties for the boards below to a new dtsi:
Beeline Smartbox Flash (Arcadyan WG443223)
MTS WG430223 (Arcadyan WG430223)
The boards are almost the same. Here is the differences:
+------+----------+----------+
| | WG430223 | WG443223 |
+------+----------+----------+
| RAM | 128 | 256 |
+------+----------+----------+
| USB | - | 1x3.0 |
+------+----------+----------+
| LEDS | RG | RGB |
+------+----------+----------+
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
5b59137a162c07738abbe9fd37125193b3107cb7)
Mikhail Zhilkin [Wed, 4 May 2022 15:16:38 +0000 (15:16 +0000)]
ramips: add support for MTS WG430223
MTS WG430223 is a wireless AC1300 (WiFi 5) router manufactured by
Arcadyan company. It's very similar to Beeline Smartbox Flash (Arcadyan
WG443223).
Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 128 MiB
Flash: 128 MiB (Winbond W29N01HV)
Wireless 2.4 GHz (MT7615DN): b/g/n, 2x2
Wireless 5 GHz (MT7615DN): a/n/ac, 2x2
Ethernet: 3xGbE (WAN, LAN1, LAN2)
USB ports: No
Button: 1 (Reset/WPS)
LEDs: 2 (Red, Green)
Power: 12 VDC, 1 A
Connector type: Barrel
Bootloader: U-Boot (Ralink UBoot Version: 5.0.0.2)
OEM: Arcadyan WG430223
Installation
------------
1. Login to the router web interface (superadmin:serial number)
2. Navigate to Administration -> Miscellaneous -> Access control lists &
enable telnet & enable "Remote control from any IP address"
3. Connect to the router using telnet (default admin:admin)
4. Place *factory.trx on any web server (192.168.1.2 in this example)
5. Connect to the router using telnet shell (no password required)
6. Save MAC adresses to U-Boot environment:
uboot_env --set --name eth2macaddr --value $(ifconfig | grep eth2 | \
awk '{print $5}')
uboot_env --set --name eth3macaddr --value $(ifconfig | grep eth3 | \
awk '{print $5}')
uboot_env --set --name ra0macaddr --value $(ifconfig | grep ra0 | \
awk '{print $5}')
uboot_env --set --name rax0macaddr --value $(ifconfig | grep rax0 | \
awk '{print $5}')
7. Ensure that MACs were saved correctly:
uboot_env --get --name eth2macaddr
uboot_env --get --name eth3macaddr
uboot_env --get --name ra0macaddr
uboot_env --get --name rax0macaddr
8. Download and write the OpenWrt images:
cd /tmp
wget http://192.168.1.2/factory.trx
mtd_write erase /dev/mtd4
mtd_write write factory.trx /dev/mtd4
9. Set 1st boot partition and reboot:
uboot_env --set --name bootpartition --value 0
Back to Stock
-------------
1. Run in the OpenWrt shell:
fw_setenv bootpartition 1
reboot
2. Optional step. Upgrade the stock firmware with any version to
overwrite the OpenWrt in Slot 1.
MAC addresses
-------------
+-----------+-------------------+----------------+
| Interface | MAC | Source |
+-----------+-------------------+----------------+
| label | A4:xx:xx:51:xx:F4 | No MACs was |
| LAN | A4:xx:xx:51:xx:F6 | found on Flash |
| WAN | A4:xx:xx:51:xx:F4 | [1] |
| WLAN_2g | A4:xx:xx:51:xx:F5 | |
| WLAN_5g | A6:xx:xx:21:xx:F5 | |
+-----------+-------------------+----------------+
[1]:
a. Label wasb't found neither in factory nor in other places.
b. MAC addresses are stored in encrypted partition "glbcfg". Encryption
key hasn't known yet. To ensure the correct MACs in OpenWrt, a hack
with saving of the MACs to u-boot-env during the installation was
applied.
c. Default Ralink ethernet MAC address (00:0C:43:28:80:A0) was found in
"Factory" 0xfff0. It's the same for all MTS WG430223 devices. OEM
firmware also uses this MAC when initialazes ethernet driver. In
OpenWrt we use it only as internal GMAC (eth0), all other MACs are
unique. Therefore, there is no any barriers to the operation of several
MTS WG430223 devices even within the same broadcast domain.
Stock firmware image format
---------------------------
The same as Beeline Smartbox Flash but with another trx magic
+--------------+---------------+----------------------------------------+
| Offset | | Description |
+==============+===============+========================================+
| 0x0 | 31 52 48 53 | TRX magic "1RHS" |
+--------------+---------------+----------------------------------------+
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
498c15376bae109bfe130cc5581f83e4cc52c0f9)