Christian Marangi [Fri, 6 Oct 2023 10:15:53 +0000 (12:15 +0200)]
generic: 6.1: fix compilation warning for CONFIG_PROC_STRIPPED
Fix compilation warning for CONFIG_PROC_STRIPPED for kernel 6.1.
Fix compilation warning:
make[4]: Leaving directory '/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-ath79_tiny/linux-6.1.55'
net/ipv4/inet_timewait_sock.c: In function '__inet_twsk_schedule':
net/ipv4/inet_timewait_sock.c:272:22: error: unused variable 'kill' [-Werror=unused-variable]
272 | bool kill = timeo <= 4*HZ;
| ^~~~
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Fri, 6 Oct 2023 09:58:59 +0000 (11:58 +0200)]
generic: 6.1: add missing config SPI_BCM63XX_HSSPI
Add missing config SPI_BCM63XX_HSSPI for kernel 6.1 triggered on
compilation of bcm4908.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Koen Vandeputte [Wed, 20 Sep 2023 13:02:40 +0000 (15:02 +0200)]
ath79: mikrotik: fix build error with kernel 6.1
drivers/mfd/rb4xx-cpld.c:167:19: error: initialization of 'void (*)(struct spi_device *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
167 | .remove = rb4xx_cpld_remove,
| ^~~~~~~~~~~~~~~~~
drivers/mfd/rb4xx-cpld.c:167:19: note: (near initialization for 'rb4xx_cpld_driver.remove')
cc1: some warnings being treated as errors
make[8]: *** [scripts/Makefile.build:250: drivers/mfd/rb4xx-cpld.o] Error 1
make[7]: *** [scripts/Makefile.build:500: drivers/mfd] Error 2
make[6]: *** [scripts/Makefile.build:500: drivers] Error 2
make[5]: *** [Makefile:2012: .] Error 2
As the allocated function does nothing, simply delete it.
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Christian Marangi [Wed, 4 Oct 2023 22:25:18 +0000 (00:25 +0200)]
generic: rtl8366_smi: rename and drop conflicting vlan GPL symbols
Symbol rtl8366_enable_vlan and rtl8366_reset_vlan are also present in
the DSA driver upstream and conflicts as they are EXPORTED.
Rename them to rtl8366_smi_enable_vlan and rtl8366_smi_reset_vlan to fix
the conflict. While at it also make them static and drop the
EXPORT_SYMBOL_GPL as they are not actually used by any other driver and
exporting them is useless.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Javier Tia [Tue, 3 Oct 2023 22:54:38 +0000 (16:54 -0600)]
armsr: armv8: Enable KASLR in kernel 6.1
In userspace, ASLR is enabled, but it's missing to enable KASLR on the
kernel side to improve security as part of SystemReady recommendations.
Signed-off-by: Javier Tia <javier.tia@linaro.org>
Daniel Golle [Thu, 5 Oct 2023 18:40:12 +0000 (20:40 +0200)]
mediatek: fix wrong variable name in patch for Linux 6.1
The name of the variable holding the pointer to the private struct has
changed between Linux 5.15 and Linux 6.1 and adding the identical patch
fixing PCIe #PERST de-assert broke the build on Linux 6.1.
Also change the name in the patch to fix the build.
Fixes: 6a2e17d5c1 ("mediatek: fix PCIe #PERST being de-asserted too early")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Christian Marangi [Thu, 5 Oct 2023 10:40:34 +0000 (12:40 +0200)]
ipq806x: fix wrong QCA8K LED definition for NEC Aterm WG2600HP3
Fix copy-paste error in migrating NEC Aterm WG2600HP3 to new LED
implementation for the QCA8K switch. Correct define the missing
additional LED pin used for each port and fix wrong color for LED 2 for
each port. Also add the required function-enumerator as all 3 LED have
the same color and function.
Fixes: c707cff6c94b ("ipq806x: add LEDs definition for non-standard qca8k LEDs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Martin Schiller [Mon, 31 Jul 2023 06:10:23 +0000 (08:10 +0200)]
linux-atm: use target specific kernel headers
There are a few targets that mess with the atm kernel headers. To avoid
incompatibility between kernel and user space during compilation, the
correct headers should be used.
Consequently, the package must also be marked as nonshared.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Glen Lee [Thu, 29 Jun 2023 19:58:05 +0000 (15:58 -0400)]
ipq806x: add support for Extreme Networks AP3935
Extreme Networks AP3935i/e -
https://www.extremenetworks.com/support/documentation/access-points-ap3935i-e/
SoC: IPQ8068 QYY AT46279K45060I
RAM: NANYA 1527 NT5CC256M16DP-DI 515073W0EF 7 TW
FLASH: NOR - S25FL256S1 - 32MB
NAND - Macronix MX30UF4G28AB - 512MB
LAN: Atheros AR8035-A J5150WL 1515 CN - RGMII
LAN2: Atheros AR8033-AL1A SKCSR.AJ1 1444 China - SGMII
WLAN2: QCA9990 OVV FNPV209 K451406
WLAN5: QCA9990 OVV FNPV209 K451406
SERIAL: RS232 Port (115200 8n1) Cisco console cable and
4pin Serial Header | 3.3 | GND | RX | TX
MAC address for LAN1/LAN2/WLAN 2G/WLAN 5G in uboot env
* Installation via either RJ45 console or on-board 4 PIN header
Install Method
--------------
1) Setup TFTP server, and place
openwrt-ipq806x-generic-extreme_ap3935-initramfs-uImage image
in /srv/tftp or similar
2) Connect to console on router and connect ethernet port "LAN1" to
your LAN
3) Interupt the boot with any character
4) Login with admin/new2day for default password
(use reset/FactoryDefault if password needs to be reset)
5) Set serverip to TFTP IP: set serverip 192.168.1.2
6) Set ipaddr to another IP: set ipaddr 192.168.1.101
7) Make uboot ping something to activate eth0 on boot:
set bootcmd 'ping 192.168.1.1; run boot_flash'
saveenv
8) TFTP image to RAM:
tftpboot 0x42000000
openwrt-ipq806x-generic-extreme_ap3935i-initramfs-uImage
9) Boot image: bootm 0x42000000
In OpenWRT, "LAN1" is LAN, "LAN2" is WAN
10) SFTP openwrt-ipq806x-generic-extreme_ap3935-squashfs-nand-sysupgrade.bin
image to /tmp
11) sysupgrade /tmp/openwrt-*-nand-sysupgrade.bin
Signed-off-by: Glen Lee <g2lee@yahoo.com>
John Audia [Sat, 23 Sep 2023 14:15:37 +0000 (10:15 -0400)]
kernel: bump 5.15 to 5.15.133
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.133
Removed upstreamed:
bcm47xx/patches-5.15/101-v5.18-mtd-rawnand-brcmnand-Allow-SoC-to-provide-I-O-operations.patch[1]
Cherry picked build fix.[2] All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.133&id=
56cf9f446b331414a15ef0e8dedf23583ec2c427
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.15/fix-up-backport-of-
136191703038-interconnect-teach-l.patch
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
Linus Walleij [Thu, 28 Sep 2023 13:28:31 +0000 (15:28 +0200)]
Delete arm-magic script
This script was used to modify the wrong machine type passed
from the boot loader to the kernel. The device tree kernels
does not use the machine type so this script is no longer
needed.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Thu, 28 Sep 2023 18:12:47 +0000 (20:12 +0200)]
gemini: Drop kernel v5.15 and default to v6.1
There is no point in keeping the v5.15 kernel around for Gemini,
we are maintaining the platform with a strong upstream focus and
newer is always better.
Now that OpenWrt can support pure v6.1 kernels, switch up to
v6.1 and drop v5.15 so we don't need to migrate configs and
patches for no reason.
The USB FOTG2 module handling can be simplified as a result.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Rudolf Vesely [Mon, 2 Oct 2023 06:51:19 +0000 (06:51 +0000)]
rtl83xx: fix STP by trapping BPDUs
Fix Spanning Tree Protocol (STP) by changing COPY2CPU which currently
makes switch to ignore Bridge Protocol Data Units (BPDUs).
Tested on Zyxel GS1900-8, 24 and 48.
Signed-off-by: Rudolf Vesely <i@rudolfvesely.com>
[ improve commit description and add new line in different sections ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Wed, 4 Oct 2023 11:28:58 +0000 (13:28 +0200)]
CI: push-containers: refresh containers also on modify cmake options
Refresh containers also on modify of cmake options in the include file.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Wed, 4 Oct 2023 11:27:55 +0000 (13:27 +0200)]
CI: push-containers: fix concurrency group
Fix concurrency group for push-containers workflow to handle running on
different branches.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tjalling Hattink [Tue, 26 Sep 2023 13:10:52 +0000 (15:10 +0200)]
build: suppress cmake warnings about unused vars
When cmake is invoked to build a package it usually reports a warning
about unused variables passed to it. This is caused by openwrt passing
all supported variables to cmake, even if they are not all required by
the package being compiled.
To reduce clutter when compiling such packages these warnings are now
suppressed.
Approved-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Tjalling Hattink <t.hattink@fugro.com>
Tobias Schramm [Sat, 23 Sep 2023 11:46:40 +0000 (13:46 +0200)]
realtek: 5.15: rtl93xx: support 2500baseT and 5000baseT on USXGMII links
The USXGMII implementation of Realtek switches can not only support
10GbE but also 2.5Gb and 5Gb on top of the usual data rates.
Mark those as supported to allow them to be negotiated.
This change has been tested on a ZyXEL XGS1250-12 with the following link
partners:
- NWA50AX Pro (2.5Gb)
- RTL8152 USB NIC (2.5Gb)
- AQC111 USB NIC (2.5Gb & 5Gb)
Gbit and 10GbE has also been tested to still work fine with a variety of
devices.
Signed-off-by: Tobias Schramm <tobias@t-sys.eu>
Peter Körner [Sun, 24 Sep 2023 18:58:13 +0000 (20:58 +0200)]
rtl93xx: fix condition intended to only select internal serdes ports
This condition was introduced in commit
51c8f7661244 ("realtek: Improve
MAC config handling for all SoCs") to correctly report the speed of the
internal serdes ports as 10G, but instead makes all ports read 10G
because the or-operator should have been an and-operator.
Fixes: #9953
Fixes: 51c8f7661244 ("realtek: Improve MAC config handling for all SoCs")
Signed-off-by: Peter Körner <git@mazdermind.de>
[ wrap comment to 72 column and improve commit ref ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Daniel Golle [Tue, 3 Oct 2023 01:32:35 +0000 (02:32 +0100)]
mediatek: fix PCIe #PERST being de-asserted too early
The driver for MediaTek gen3 PCIe hosts de-asserts all reset
signals at the same time using a single register write operation.
Delay the de-assertion of the #PERST signal by 100ms as some PCIe
devices fail to come up otherwise.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Uwe Niethammer [Sun, 1 Oct 2023 10:26:51 +0000 (12:26 +0200)]
uqmi: added timeout to fix hanging qmi.sh
Modems which are using qmi do not reply on the 1st sync but they do
on subsequent. So qmi.sh is hanging on the first call. Since 2020 uqmi
supports a timeout parameter. Unfortunately qmi.sh didn't make use of
this parameter. So qmi.sh is now invoking an early dummy access to
unlock the modem
Signed-off-by: Uwe Niethammer <uwe@dr-niethammer.de>
Christian Marangi [Mon, 2 Oct 2023 20:13:10 +0000 (22:13 +0200)]
yafut: add missing PKG_MIRROR_HASH
Add missing PKG_MIRROR_HASH. This is always needed as is used to
generate and use a tar instead of git clone and validate the hash of it.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Robert Marko [Sat, 30 Sep 2023 11:19:30 +0000 (13:19 +0200)]
ipq40xx: use upstreamed SDI disable support
Google WiFi board has what seems as debug version of TZ/QSEE and it is
always enabling SDI (Secure Debug Image) and in order to do a regular
reboot it must be disabled, as otherwise you are stuck in a debug state
where you are supposed to extract debug logs via QCA tooling which is not
helpfull at all for regular users.
So, instead of using our downstream version to disable SDI lets use the
version that was merged upstream and relies on a boolean property in the
SCM node instead of checking the compatible.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Tested-by: Brian Norris <computersforpeace@gmail.com>
Christian Marangi [Mon, 2 Oct 2023 16:53:16 +0000 (18:53 +0200)]
ipq-wifi: improve and update instructions on how to add board files
Improve and update instructions on how to add board files and both
describe the needed step to upstream a board file or to use it locally.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Hauke Mehrtens [Mon, 2 Oct 2023 10:59:18 +0000 (12:59 +0200)]
rtl8812au-ct: Fix PKG_MIRROR_HASH
The PKG_MIRROR_HASH is wrong, fix it.
Found and fixed using this command:
make package download check FIXUP=1
Fixes: c123e4f0533e ("rtl8812au-ct: bump to fix kernel 6.1 compile")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Mikhail Zhilkin [Sat, 30 Sep 2023 14:07:15 +0000 (14:07 +0000)]
mediatek: fix eeprom loading (Mercusys MR90X v1)
Commit mt76: drop default eeprom file for mt7986-firmware
(
e3aa645b267ca4f08773b5366583e9b0020fc3e9) breaks eeprom loading for
Mercusys MR90X v1. As a result WiFi is not working at all.
This commit adds Mercusus MR90x to the caldata script (it works after the
commit mentioned above). And we can safely drop "81_fix_eeprom" script
as it's no longer required.
Fixes: e3aa645b267ca4f08773b5366583e9b0020fc3e9
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Oskari Rauta [Sun, 1 Oct 2023 10:07:31 +0000 (13:07 +0300)]
uci: fix Makefile formatting
Fix wrong declaration for PKG_SROUCE_URL and PKG_VERSION variables and add missing colon
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
Christian Marangi [Sat, 30 Sep 2023 20:06:05 +0000 (22:06 +0200)]
ipq806x: disable unused SWCONFIG config flags
Disable unused SWCONFIG config flags now that we switched to DSA and are
not needed anymore.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Mon, 18 Sep 2023 14:36:34 +0000 (16:36 +0200)]
ipq806x: add patch fixing regression from stmmac TX timer
Add patch fixing regression from stmmac TX timer.
Refer to the single patch for extensive details on the problem.
This should restore original performance before 4.19 kernel.
Fixes: #11676
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Mon, 18 Sep 2023 14:36:34 +0000 (16:36 +0200)]
ipq806x: add patch fixing regression from stmmac TX timer
Add patch fixing regression from stmmac TX timer.
Refer to the single patch for extensive details on the problem.
This should restore original performance before 4.19 kernel.
Fixes: #11676
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Tue, 26 Sep 2023 13:39:55 +0000 (15:39 +0200)]
ipq40xx: refresh qca8k patches
Refresh qca8k patches to sync with the generic backports changes.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Tue, 26 Sep 2023 12:10:42 +0000 (14:10 +0200)]
ipq806x: add LEDs definition for non-standard qca8k LEDs
Add LEDs definition for devices that use a non-standard qca8k LEDs
configuration.
This is to restore original setup of the LED and be on par with swconfig
old configuration.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Tue, 20 Jun 2023 07:49:53 +0000 (09:49 +0200)]
ipq806x: enable and setup multi-CPU port for qca8k switch
Enable and setup multi-cpu for qca8k switch for ipq806x based devices.
Rework each DTS to enable the secondary CPU port on QCA8K switch and
apply the required values originally set by the OEM in the old swconfig
node.
In original firmware the first CPU port was always assigned to the WAN
port and the secondary CPU port was assigned to the rest of the LAN
port. Follow this original implementation using an init.d script.
To setup the CPU port ip tools is required. Add additional default
package ip-tiny to correctly setup the CPU port.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Tue, 20 Jun 2023 06:41:32 +0000 (08:41 +0200)]
generic: 6.1: backport patch for multi CPU port support on QCA8K
Backport pending patch for multi CPU port support on QCA8K. 6.1 already
supports all the requiredt code to change a DSA master port so only this
patch fixing the driver is required.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Tue, 26 Sep 2023 11:47:44 +0000 (13:47 +0200)]
generic: 6.1: backport various qca8k fixes patch
Backport various QCA8K fixes patch merged upstream. Refresh any changed
patches due to backports.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Tue, 20 Jun 2023 07:57:07 +0000 (09:57 +0200)]
ipq806x: move ASRock G10 fix mac preinit script to generic board.d script
Drop and move ASRock G10 preinit script to fix mac address to generic
board.d script and rework for consistency with other devices following a
similar implementation.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Fri, 6 Aug 2021 10:40:54 +0000 (12:40 +0200)]
ipq806x: convert each device to DSA implementation
Convert each ipq806x device to DSA implementation using the qca8k
driver. Rework 02_network to follow the new naming scheme.
Update 01_leds to use netdev trigger with correct DSA port and drop
now unused switch trigger.
Currently secondary CPU is disabled and will be reneabled later.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Thu, 28 Sep 2023 20:55:08 +0000 (22:55 +0200)]
generic: add patch for GPON-ONU-34-20BI quirk
Backport patch merged upstream adding quirk for SFP GPON-ONU-34-20BI.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Nick Hainke [Fri, 29 Sep 2023 09:12:02 +0000 (11:12 +0200)]
hostapd: increase PKG_RELEASE to fix builds
Recent hostapd changes just edited the ucode files. It is required to
bump the PKG_RELEASE to include the newest changes in the latest builds.
Signed-off-by: Nick Hainke <vincent@systemli.org>
Jianhui Zhao [Sun, 24 Sep 2023 14:34:12 +0000 (22:34 +0800)]
filogic: add support for GL.iNet GL-MT6000
Hardware specification:
* SoC: MediaTek MT7986A 4x A53
* Flash: 8GB EMMC
* RAM: 1GB DDR4
* Ethernet:
* 2x2.5G RJ45 port (RTL8221B)
* 4x1G RJ45 ports (MT7531AE)
* WLAN:
* 2.4GHz: MT7976GN 4T4R
* 5GHz: MT7976AN 4T4R
* Button: Reset
* LED: 1 x dual color LED
* USB: 1 x USB 3.0
* Power: DC 12V 4A
* UART: 3V3 115200 8N1 (Pinout: GND TX RX VCC)
* JTAG: 9 PIN
If you want to use u-boot from OpenWrt, you can upgrade it safely.
* bl2: openwrt-mediatek-filogic-glinet_gl-mt6000-preloader.bin
* fip: openwrt-mediatek-filogic-glinet_gl-mt6000-bl31-uboot.fip
`openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-factory.bin` is used in OpenWrt's u-boot.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Chukun Pan [Thu, 4 May 2023 15:10:03 +0000 (23:10 +0800)]
mt76: drop default eeprom file for mt7986-firmware
The mt76 driver usually reads the eeprom on the mtd partition at dts.
For emmc device we need to use caldata_extract script to read the
eeprom. However, the default eeprom file breaks the caldata script
execution, so remove it.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Jianhui Zhao [Sun, 24 Sep 2023 14:15:00 +0000 (22:15 +0800)]
generic: net: phy: realtek: add interrupt support for RTL8221B
This commit introduces interrupt support for RTL8221B.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Chukun Pan [Mon, 18 Sep 2023 13:28:01 +0000 (21:28 +0800)]
uboot-mediatek: sync spi-nand driver with SDK
When adding new router support, I found that uboot
could not recognize flash: "unknown raw ID xxx".
Sync SPI-NAND driver for mediatek to fixes this:
* Add support for Winbond W25N01KV 1Gbit chip.
* Add support for Etron SPI-NAND chip.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Zoltan HERPAI [Sat, 23 Sep 2023 15:28:55 +0000 (17:28 +0200)]
sifiveu: refresh 6.1 config
Add new config symbols as required.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Zoltan HERPAI [Fri, 22 Sep 2023 17:47:01 +0000 (19:47 +0200)]
sifiveu: remove upstreamed patches, refresh remaining ones
Upstreamed:
0002-riscv-sifive-unmatched-update-regulators-values.patch
0003-riscv-sifive-unmatched-define-PWM-LEDs.patch
0006-riscv-sbi-srst-support.patch
Compile-tested: HiFive Unleashed / Unmatched
Runtime-tested: HiFive Unleashed / Unmatched
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Zoltan HERPAI [Fri, 22 Sep 2023 16:29:57 +0000 (18:29 +0200)]
sifiveu: add testing kernel 6.1
Compile-tested: HiFive Unleashed / Unmatched
Runtime-tested: HiFive Unleashed / Unmatched
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Zoltan HERPAI [Fri, 22 Sep 2023 16:29:15 +0000 (18:29 +0200)]
sifiveu: copy patches from 5.15 to 6.1
To start the upgrade, we copy the patches from 5.15 to 6.1.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Felix Fietkau [Thu, 28 Sep 2023 08:28:43 +0000 (10:28 +0200)]
hostapd: fix wpa_supplicant mac address allocation on ap+sta
If the full interface is restarted while bringing up an AP, it can trigger a
wpa_supplicant interface start before wpa_supplicant is notified of the
allocated mac addresses.
Fix this by moving the iface_update_supplicant_macaddr call to just after
the point where mac addresses are allocated.
Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
David Bauer [Wed, 27 Sep 2023 14:43:54 +0000 (16:43 +0200)]
mpc85xx: add Enterasys WS-AP3715i reset button
The reset button was missing from the Enterasys WS-AP3715i DTS.
Add the node required for making the reset button work.
Signed-off-by: David Bauer <mail@david-bauer.net>
Felix Fietkau [Wed, 27 Sep 2023 13:03:16 +0000 (15:03 +0200)]
hostapd: fix mac address of interfaces created via wdev.uc
Use the wdev config with the generated MAC address
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Alexey D. Filimonov [Fri, 18 Aug 2023 21:26:59 +0000 (00:26 +0300)]
ramips: cf-ew72-v2: Add support for COMFAST CF-EW72 V2
Add support for COMFAST CF-EW72 V2
Hardware:
- SoC: Mediatek MT7621 (MT7621DAT or MT7621AT)
- Flash: 16 MiB NOR
- RAM: 128 MiB
- Ethernet: Built-in, 2 x 1GbE
- Power: only 802.3af PD on any port, injector supplied in the box
- PoE passthrough: No
- Wifi 2.4GHz: Mediatek MT7603BE 802.11b/g/b
- Wifi 5GHz: Mediatek MT7613BEN 802.11ac/n/a
- LEDs: 8x (only 1 is both visible and controllable, see below)
- Buttons: 1x (RESET)
Installing OpenWrt:
Flashing is done using Mediatek U-Boot System Recovery Mode
- make wired connection with 2 cables like this:
- - PC (LAN) <-> PoE Injector (LAN)
- - PoE Injector (POE) <-> CF-EW72 V2 (LAN). Leave unconnected to CF-EW72 V2 yet.
- configure 192.168.1.(2-254)/24 static ip address on your PC LAN
- press and keep pressed RESET button on device
- power the device by plugging PoE Injector (POE) <-> CF-EW72 V2 (LAN) cable
- wait for about 10 seconds until wifi led stops blinking and release RESET button
- navigate from your PC to http://192.168.1.1 and upload OpenWrt *-factory.bin firmware file
- proceed until router starts blinking with wifi led again (flashing) and stops (rebooting to OpenWrt)
MAC addresses as verified by OEM firmware:
vendor OpenWrt address
LAN lan\eth0 label
WAN wan label + 1
2g phy0 label + 2
5g phy1 label + 3
The label MAC address was found in 0xe000.
LEDs detailed:
The only both visible and controllable indicator is blue:wlan LED.
It is not bound by default to indicate activity of any wireless interfaces.
Place (WAN->ANT) | Num | GPIO | LED name (LuCI) | Note
-----------------|-----|-----------------------------------------------------------------------------------------
power | 1 | | | POWER LED. Not controlled with GPIO.
hidden_led_2 | 2 | 13 | blue:hidden_led_2 | This LED does not have proper hole in shell.
wan | 3 | | | WAN LED. Not controlled with GPIO.
hidden_led_4 | 4 | 16 | blue:hidden_led_4 | This LED does not have proper hole in shell.
lan | 5 | | | LAN LED. Not controlled with GPIO.
noconn_led_6 | 6 | | | Not controlled with GPIO, possibly not connected
wlan | 7 | 15 | blue:wlan | WLAN LED. Wireless indicator.
noconn_led_8 | 8 | | | Not controlled with GPIO, possibly not connected
mt76-phy0 and mt76-phy1 leds also exist in OpenWrt, but do not exist on board.
Signed-off-by: Alexey D. Filimonov <alexey@filimonic.net>
David Bauer [Mon, 25 Sep 2023 18:58:04 +0000 (20:58 +0200)]
mpc85xx: drop WS-AP3715i label-mac
Label MAC detection does not work properly, as MAC address is assigned
on preinit. Thus, remove the label-mac definition.
Signed-off-by: David Bauer <mail@david-bauer.net>
Glen Lee [Sat, 26 Aug 2023 01:46:59 +0000 (21:46 -0400)]
ipq40xx: add support for Extreme Networks WS-AP391x series APs
This in a single image to run many types of hardware in the AP391x
series (AP3912/AP3915/AP3916/AP3917/AP7662).
Hardware
--------
Qualcomm IPQ4029 WiSoC
2T2R 802.11 abgn
2T2R 802.11 nac
Macronix MX25L25635E SPI-NOR (32M)
512M DDR3 RAM
1-4x Gigabit Ethernet
Senao EXT1025 HD Camera (AP3916 only)
USB 2.0 Port (AP3915e only)
1x Cisco RJ-45 Console port
- except for AP3916 and AP3912 where there is no external serial
console and it is TDB how to solder one. Possibly J12 is UART with
pin1 = 3.3V, pin2 = GND, pin3 = TXD, pin4 = RXD.
- Settings: 115200 8N1
Installation With Serial Console
--------------------------------
1. Attach to the Console port. Power up the device and press the s key
to interrupt autoboot.
2. The default username / password to the bootloader is admin / new2day
3. Check uboot variables using printenv, and update if necessary:
$ setenv AP_MODE 0
$ setenv WATCHDOG_COUNT 0
$ setenv WATCHDOG_LIMIT 0
$ setenv AP_PERSONALITY identifi
$ setenv serverip <SERVER_IPADDR>
$ setenv ipaddr <UNIQUE_IPADDR>
$ setenv MOSTRECENTKERNEL 0; ## OpenWRT only uses the primary image
$ saveenv
$ saveenv ## 2nd time to write the secondary copy
4. On the TFTP server located at <SERVER_IPADDR>, download the OpenWrt
initramfs image. Rename and serve it as vmlinux.gz.uImage.3912
5. TFTP boot the OpenWrt initramfs image from the AP serial console:
$ run boot_net
6. Wait for OpenWrt to start. Internet port sw-eth5 is assiged to LAN
bridge and sw-eth4 (if available) is assigned to WAN. The LAN port
will use default IP address 192.168.1.1 and run a DHCP server.
If you already have a working DHCP server or already have 192.168.1.1
on your network you MUST DISCONNECT the LAN cable from your active
network immediately after the power/status LED turns green!
At this point, you need to temporarily reconfigure the AP to have
a way to transfer the OpenWRT sysupgrade image to it.
Reconfigure the newly converted OpenWRT AP using serial console or
plug in a PC to a sw-eth5 as a separate network. Note -- the LAN/WAN
port assignments were designed to make it possible to convert to
OpenWRT without serial console and using a common firmware
image for many AP models -- they may not make the most sense when
fully deployed.
7. Download and transfer the sysupgrade image to the device using e.g.
SCP.
8. Install OpenWrt to the device using "sysupgrade"
$ sysupgrade -n /path/to/openwrt.bin
9. After it boots up again, as in step 6, connect to AP and reconfigure
for final deployment.
This build supports APs in the AP391x series and similar such as WiNG
AP7662.
Ethernet devices within OpenWRT are named "sw-eth1" thru "sw-eth5".
Mapping from OpenWRT internal naming to external naming on the case is
as follows:
```
|sw-eth1|sw-eth2|sw-eth3|sw-eth4|sw-eth5
------------+-------+-------+-------+-------+-------
AP3917 | | | | GE2 | GE1
------------+-------+-------+-------+-------+-------
AP7662 | | | | GE2 | GE1
------------+-------+-------+-------+-------+-------
AP3916 | | | | CAM* | GE1
------------+-------+-------+-------+-------+-------
AP3915 | | | | | GE1
------------+-------+-------+-------+-------+-------
AP3912 | | P1 | P2 | P3 | LAN1
------------+-------+-------+-------+-------+-------
```
By default sw-eth4 is mapped to WAN. All others are assigned to the
LAN.
CAM* - On AP3916, sw-eth4 is the camera's interface. You should
reconfigure this to be on LAN after OpenWRT boots from flash.
Installation Without Serial Console
-----------------------------------
The main premise is to set u-boot environment variables using the
Extreme Networks firmware's rdwr_boot_cfg program.
$ rdwr_boot_cfg
Utility to manipulate the boot ROM config blocks
All errors are written to the sytem log file (/tmp/log/ap.log)
```
Usage: rdwr_boot_cfg <read_all|read_var|read_var_f|write_var|rm_var> ...
read_all read the entire active block
read_var <var> read a single variable from the active block
read_var_f <var> read a single variable from the active block
(formatted)
write_var <var=val> write a single variable/value pair to both
blocks
rm_var <var> delete a single variable from both blocks
```
WARNING: Be very sure you have set the u-boot environment correctly.
If not, it can only be fixed by attaching serial console!
Be aware that the Extreme Networks shell environment will automatically
reboot every 5 minutes if there is no controller present.
Read and understand these steps fully before attempting. It is easy
to make mistakes!
1. Place the OpenWRT initramfs on the TFTP server and name it as
vmlinux.gz.uImage.3912
2. Boot up to Extreme Networks WING-Campus mode OS. Port GE1/LAN1
will be a DHCP **client**. Find out the IP address from your DHCP
server and SSH in. Default user/passwd is admin/new2day or
admin/admin123.
If it is booting to WING-Distributed mode, use this command to
convert to Campus mode.
$ operational-mode centralized
3. Upon bootup you have about 5mins to changed these u-boot variables
if necessary using the rdwr_boot_cfg command in Linux shell:
$ rdwr_boot_cfg write_var AP_MODE=0
$ rdwr_boot_cfg write_var MOSTRECENTKERNEL=0
$ rdwr_boot_cfg write_var WATCHDOG_COUNT=0
$ rdwr_boot_cfg write_var WATCHDOG_LIMIT=0
$ rdwr_boot_cfg write_var AP_PERSONALITY=identifi
$ rdwr_boot_cfg write_var serverip=<SERVER_IPADDR>
$ rdwr_boot_cfg write_var ipaddr=<UNIQUE_IPADDR>
$ rdwr_boot_cfg write_var bootcmd="run boot_net"
4. Reboot AP.
5. Connect PC with ethernet to GE1/LAN1 port. You should get a
DHCP address in the 192.168.1.x range and should be able to
SSH to the new OpenWRT TFTP recovery/installation shell.
6. At this point, u-boot is still set to TFTP boot, so you have to
replace the TFTP image with the original Extreme Networks image so
that you can change the u-boot environment.
See the instructions for Extracting Extreme Networks firmware
image.
DON'T REBOOT YET!
7. Next you must follow steps 6 thru 8 from the Installation with serial
console. After which you should have OpenWRT installed to primary
flash firmware.
8. Now Reboot. This time it will boot using TFTP into Extreme Networks
image. You may need to reconnect cables at this point -- GE1/LAN1
will be a DHCP **client** and you can SSH in -- just like step 2.
Get the IP address from you own DHCP server.
9. Set u-boot env as follows:
$ rdwr_boot_cfg write_var MOSTRECENTKERNEL=0
$ rdwr_boot_cfg write_var WATCHDOG_COUNT=0
$ rdwr_boot_cfg write_var bootcmd="run boot_flash"
10. Reboot AP. This time it should be into OpenWRT. GE1/LAN1 will be
a DHCP **server** and have static IP 192.168.1.1 -- just like step 5.
11. SSH into the LAN port and reconfigure to final configuration. Don't
make any changes that prevent you from SSH or Luci access!
Restoring Extreme Networks firmware
-----------------------------------
Assuming you have the original Extreme Networks image:
1. Login to OpenWRT shell
2. scp the Extreme Networks packaged firmware image file AP391x-*.img to
/tmp
3. Extract the firmware uimage file:
$ tar xjf AP391x-*.img vmlinux.gz.uImage
4. Force run sysupgrade:
$ sysupgrade -F /tmp/AP391x-*.img /
5. Restore the u-boot varable(s):
$ rdwr_boot_cfg write_var WATCHDOG_LIMIT=3
USB 2.0 Port on AP3915e
-----------------------
Enable this by setting LED "eth:amber_or_usb_enable" to ALWAYS ON.
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Glen Lee <g2lee@yahoo.com>
Hauke Mehrtens [Sun, 24 Sep 2023 18:16:21 +0000 (20:16 +0200)]
treewide: Add extra CPE identifier
This adds some Common Platform Enumerations (CPE) identifiers which I
found.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Andreas Böhler [Mon, 25 Sep 2023 18:18:52 +0000 (20:18 +0200)]
ipq40xx: ZTE MF282 Plus fix sysupgrade
While adding support for the MF282 Plus, an entry in platform.sh was
overlooked - this fixes sysupgrade on this devices.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Andreas Böhler [Mon, 25 Sep 2023 18:16:22 +0000 (20:16 +0200)]
ipq40xx: ZTE MF287 fix sysupgrade
While refactoring support for the MF287 series, an entry in platform.sh
was overlooked - this fixes sysupgrade on this devices.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Christian Marangi [Mon, 25 Sep 2023 15:38:00 +0000 (17:38 +0200)]
ipq40xx: drop patches/files/config for kernel 5.15
Drop patches/files/config for kernel 5.15 now that they are not used
anymore.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Mon, 25 Sep 2023 15:37:38 +0000 (17:37 +0200)]
ipq40xx: move to kernel 6.1 by default
Move ipq40xx to kernel 6.1 by default.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Mon, 25 Sep 2023 16:04:51 +0000 (18:04 +0200)]
generic: 6.1: add missing config TRUSTED_KEYS_TEE
Add missing config TRUSTED_KEYS_TEE for kernel 6.1 triggered when
TRUSTED_KEYS is enabled.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Felix Fietkau [Mon, 25 Sep 2023 13:36:29 +0000 (15:36 +0200)]
hostapd: fix rare crash with AP+STA and ACS enabled
Ensure that the iface disable in uc_hostapd_iface_start also clears the ACS
state.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Oskari Rauta [Sun, 24 Sep 2023 05:25:03 +0000 (08:25 +0300)]
kernel: add missing symbols
CONFIG_DEVTMPFS_SAFE and CONFIG_DM_AUDIT were not
set and had to be manually selected during build
everytime kernel was updated.
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
Leon M. Busch-George [Wed, 20 Sep 2023 21:42:08 +0000 (23:42 +0200)]
base-files: ipcalc.sh: make check slightly more future-proof
The previous code handling the equal-condition might be removed or
altered in the future and the case might be overlooked.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Leon M. Busch-George [Sun, 20 Aug 2023 19:08:20 +0000 (21:08 +0200)]
base-files: ipcalc.sh: turn error into warning
Some users have their routers configured to supply a DHCP range that
includes the local interface address.
That worked with dnsmasq because it automatically skips the local
address.
Re-enable those existing configurations for the release and hint at
possible future problems.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
[ wrap commit description and remove unecessary text ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Leon M. Busch-George [Tue, 27 Jun 2023 14:01:09 +0000 (16:01 +0200)]
base-files: ipcalc.sh clarify range parameters in comment
To avoid confusion when working with ipcalc.sh, clarify that the last two
parameters belong to the range calculation and rename 'num' to the slightly
less ambiguous 'size'.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Leon M. Busch-George [Fri, 16 Jun 2023 13:12:18 +0000 (15:12 +0200)]
package: dnsmasq: remove off-by-one mitigation for limit
In the dnsmasq init script, an off-by-one in the range calculation of
ipcalc.sh was mitigated by passing the limit as if its counting started
at zero. This patch removes the mitigation as the off-by-one has been
fixed.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Leon M. Busch-George [Sun, 18 Jun 2023 18:17:27 +0000 (20:17 +0200)]
package: avoid the use of eval to parse ipcalc.sh output
Add a function 'ipcalc' to /lib/functions.sh that sets variables more
safely using export.
With this new function, dnsmasq also handles the return value of ipcalc
correctly.
Fixes: e4bd3de1be8e ("dnsmasq: refuse to add empty DHCP range")
Co-Authored-By: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Leon M. Busch-George [Fri, 16 Jun 2023 12:58:48 +0000 (14:58 +0200)]
base-files: ipcalc.sh: don't print broadcast addr for prefix > 30
Printing a broadcast address doesn't make any sense for /31 and /32
prefixes.
Strictly speaking, the same goes for the network address but it is useful
to get the first address in the prefix, e.g. to create a canonical
CIDR notation "$NETWORK/$PREFIX".
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Leon M. Busch-George [Fri, 16 Jun 2023 12:56:39 +0000 (14:56 +0200)]
base-files: ipcalc.sh: correctly set limit for prefix > 30
For /31 and /32 prefixes, there are only host addresses - no network and
broadcast address with all-zero and all-one bits.
Reflect this when setting the limit.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Leon M. Busch-George [Fri, 16 Jun 2023 12:53:09 +0000 (14:53 +0200)]
base-files: ipcalc.sh: correctly interpret num parameter
The start and end addresses are inclusive.
Thus, adding num without substracting one results in num + 1 addresses.
Add the substraction and to implement the documented behaviour.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Florian Eckert [Fri, 8 Sep 2023 12:01:15 +0000 (14:01 +0200)]
build: replace SourceName with PKG_NAME compile unit name
Currently, the same information is stored at the Packages.manifest in
the 'Package:' variable and also additionally in the 'SourceName:' variable.
So we have for Packages.manifest for strongswan-charon-cmd:
```
Package: strongswan-charon-cmd
Version: 5.9.11-1
SourceName: strongswan-charon-cmd
License: GPL-2.0-or-later
Section: net
```
This is not correct. Several installable packages are built from the same
strongswan source. Therefore it makes more sense that the source name is
really the source name. In this case the it is 'strongswan'.
After this change the Packages.manifest for strongswan-charon-cmd:
```
Package: strongswan-charon-cmd
Version: 5.9.11-1
SourceName: strongswan
License: GPL-2.0-or-later
Section: net
```
In summary. The 'Package' name is the name of the package to be installed
on the target system. The 'SourceName' is the compile unit from which the
package was build from. This must be the same for all installable
packages built from the same compile unit. This commit fixes that.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Leon M. Busch-George [Sat, 22 Jul 2023 08:29:56 +0000 (10:29 +0200)]
ipq40xx: wpj428: panic on squashfs error to work around boot limbo
Apparently, a few ipq40xx devices have sporadic problems when reading the
flash over SPI. When that happens, the result of the faulty SPI read is
cached and it isn't re-attempted. Depending on when it happens, the router
either panics and reboots or is left in a partially broken state (an
application wont start).
The data on the flash is alright.
This wasn't the case with Openwrt with Linux < 5.x but I wasn't able to
work out which software change was responsible.
Github user karlpip created a patch for testing that disabled the cache
entirely and added logs. Typically, only one or two SPI operations fail at
a time:
[689200.631152] spi-nor spi0.0: SPI transfer failed: -110
[689200.631280] spi_master spi0: failed to transfer one message from queue
[689200.635369] jffs2: Write of 68 bytes at 0x00ffccf4 failed. returned -110, retlen 0
[689200.642014] jffs2: Not marking the space at 0x00ffccf4 as dirty because the flash driver returned retlen zero
Because reads aren't re-attempted, squashfs can't recover:
[
3171844.279235] SQUASHFS error: Failed to read block 0x2bb912: -5
[
3171844.279284] SQUASHFS error: Unable to read fragment cache entry [2bb912]
[
3171844.283980] SQUASHFS error: Unable to read page, block 2bb912, size 14e6c
[
3171844.291650] SQUASHFS error: Unable to read fragment cache entry [2bb912]
[
3171844.297831] SQUASHFS error: Unable to read page, block 2bb912, size 14e6c
I assume there to be some kind of underlying electrical problem because,
in my experience, this happens a lot more when PoE is used.
NoTengoBattery has made an in-depth investigation:
https://forum.openwrt.org/t/patch-squashfs-data-probably-corrupt/70480
.. and created a patch that evicts the page cache and retries reading:
https://github.com/NoTengoBattery/openwrt/blob/linksys-ea6350v3-mastertrack/target/linux/ipq40xx/patches-5.4/9996-fs_squashfs_improve_squashfs_error_resistance.patch
The patch also works well with the WPJ428 but NoTengoBattery didn't try to
upstream it ("This is not the solution that should be used").
In 2020, I tried and failed to create a working patch that prevents faulty pages to
be cached in the first place. Because I needed a solution, I backported
"squashfs: add option to panic on errors " (
10dde05b89980ef)
which has since become available in Openwrt.
The 'error=panic' option has been tested on a fleet of multiple hundred
WPJ428s over multiple years. Without this patch, devices regularly went
into 'limbo' on reboot or update and required a manual reboot.
Devices with this patch don't. I was initially concerned that the kernel
panic would leave devices with a real corrupted data but I haven't seen a
case of actual corruption since (outside of people turning off the power
during upgrades).
The WPJ428 is the only device I tested this patch on - others might also
benefit.
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
INAGAKI Hiroshi [Sun, 27 Aug 2023 14:23:20 +0000 (23:23 +0900)]
mediatek: add support for Buffalo WSR-3200AX4S
Buffalo WSR-3200AX4S is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7622B.
Specification:
- SoC : MediaTek MT7622B
- RAM : DDR3 512 MiB
- Flash : SPI-NAND 128 MiB (Winbond W25N01GVZEIG)
- WLAN : 2.4/5 GHz 4T4R
- 2.4 GHz : MediaTek MT7622B (SoC)
- 5 GHz : MediaTek MT7915
- Ethernet : 5x 10/100/1000 Mbps
- Switch : MediaTek MT7531
- LEDs/Keys : 6x/5x (2x: buttons, 3x: slide-switches)
- UART : through-hole on PCB (J4)
- assignment: 3.3V, GND, TX, RX from tri-angle marking
- settings : 115200n8
- Power : 12 VDC, 1.5 A
Flash instruction using factory.bin image:
1. Boot WSR-3200AX4S with "Router" mode
2. Access to "http://192.168.11.1/" and open firmware update page
("ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update ("更新実行")
button
4. Wait ~120 seconds to complete flashing
Note:
- This device has 2x OS images on flash. The first one will always be
used for booting and the secondary is for backup.
- This support generates multiple factory*.bin image:
- factory.bin : for flashing from OEM WebUI
- factory-uboot.bin: for flashing from U-Boot or clean installation
via sysupgrade (don't use for normal sysupgrade)
Known issues:
- Wi-Fi MAC addresses won't be applied to each adapter.
MAC Addresses:
LAN : C4:3C:EA:xx:xx:60 (board_data, mac (text))
WAN : C4:3C:EA:xx:xx:60 (board_data, mac (text))
2.4 GHz: C4:3C:EA:xx:xx:61
5 GHz : C4:3C:EA:xx:xx:68
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 09:21:28 +0000 (18:21 +0900)]
mediatek: separate dts/dtsi for Buffalo WSR series
Separate dts/dtsi from the dts of Buffalo WSR-2533DHP2 to prepare adding
suppport for WSR-3200AX4S.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 09:37:15 +0000 (18:37 +0900)]
mediatek: expand kernel size to 6MiB for WSR-2533DHP2
Expand kernel partition size on WSR-2533DHP2 for the kernel larger than
4 MiB.
To prevent upgrading from old firmware before this commit, bump the
compat version to 1.1 and add a message for forced sysupgrade using
factory-uboot.bin image.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 08:29:12 +0000 (17:29 +0900)]
mediatek: merge trx helpers in image/mt7622.mk
Merge similar helpers of trx image generation, "buffalo-kernel-trx" and
"trx-nand".
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 14:26:01 +0000 (23:26 +0900)]
mediatek: drop pwm7_pins from Buffalo WSR-2533DHP2
MediaTek MT7622 doesn't support ch7 of PWM and pinctrl groups were dropped from
driver source[0]. So pwm7-related groups are unavailable now, then, kernel shows a
warning.
[ 0.370264] mt7622-pinctrl
10211000.pinctrl: invalid group "pwm_ch7_2" for function "pwm"
Drop that pinmux from pinctrl node.
[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pinctrl/mediatek/pinctrl-mt7622.c?id=
57972641810a97566ffd13e4be3f6a66d61eb3b5
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 09:04:04 +0000 (18:04 +0900)]
mediatek: add label-mac-device for Buffalo WSR-2533DHP2
Add label-mac-device with "&gmac0" phandle for Buffalo WSR-2533DHP2.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 06:10:53 +0000 (15:10 +0900)]
mediatek: update NVMEM bindings for Buffalo WSR-2533DHP2
Update NVMEM-related nodes and use newer binding for MAC addresses on
Buffalo WSR-2533DHP2.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Sun, 27 Aug 2023 05:49:41 +0000 (14:49 +0900)]
mediatek: update LED/Key bindings for Buffalo WSR-2533DHP2
Update LED and key nodes with newer DeviceTree bindings for WSR-2533DHP2.
- LED
- use led-[0-9] for node name of LEDs
- add "color" and "function" properties
- drop default-state = "on" from green:power LED
- this LED will be turned on by led-running alias
- key
- drop unnecessary poll-interval property
- use key-[0-9] for node name of keys
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Sebastian Pflieger [Mon, 18 Sep 2023 12:04:09 +0000 (14:04 +0200)]
sunxi: generalize top-level BOARDNAME and update suported SoCs
Allwinner created to may SoC variants to list them all at top-level.
Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
Glen Lee [Sun, 3 Sep 2023 15:05:27 +0000 (11:05 -0400)]
ipq806x: sync config-6.1 with latest kernel
Ran "make kernel_oldconfig" to generate
Signed-off-by: Glen Lee <g2lee@yahoo.com>
Elbert Mai [Sun, 17 Sep 2023 14:59:48 +0000 (07:59 -0700)]
mediatek: filogic: add support for Ubiquiti UniFi 6 Plus (U6+)
Ubiquiti U6+ is a dual-band WiFi 6 PoE access point.
It is a drop-in upgrade of the U6 lite.
Specifications
---
- SoC: MediaTek MT7981A dual-core ARM Cortex-A53 1.3 GHz
- RAM: 256 MB DDR3-2133 RAM
- Flash: 16 MB SPI NOR and 4 GB eMMC
- LAN: 1x Gigabit Ethernet with 802.3af/at support
- WLAN: MediaTek MT7976C 2x2 MIMO dual-band WiFi 6
- LEDs: 1x blue and 1x white
- Buttons: 1x reset button
Installation
---
1. Power device using a PoE injector or switch
2. Connect via Ethernet to the device with static IP 192.168.1.2
3. SSH into the device with password: ubnt
$ ssh ubnt@192.168.1.20
4. Unlock kernel partitions for writing
$ echo
5edfacbf > /proc/ubnthal/.uf
5. Confirm correct partitions
$ grep PARTNAME /sys/block/mmcblk0/mmcblk0p6/uevent
PARTNAME=kernel0
$ grep PARTNAME /sys/block/mmcblk0/mmcblk0p7/uevent
PARTNAME=kernel1
$ grep PARTNAME /sys/block/mmcblk0/mmcblk0p8/uevent
PARTNAME=bs
6. Set and confirm bootloader environment
$ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt"
$ fw_setenv bootcmd_real "run boot_openwrt"
$ fw_printenv
7. Copy sysupgrade image to /tmp/openwrt.bin via scp
8. Copy kernel and rootfs to mmcblk0p6 and mmcblk0p7, respectively
$ tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-plus/kernel -O | dd of=/dev/mmcblk0p6
$ tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-plus/root -O | dd of=/dev/mmcblk0p7
9. Ensure device boots from mmcblk0p6
$ echo -ne "\x00\x00\x00\x00\x2b\xe8\x4d\xa3" > /dev/mmcblk0p8
10. Reboot the device
$ reboot
Signed-off-by: Elbert Mai <code@elbertmai.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Sebastian Pflieger [Mon, 18 Sep 2023 13:02:13 +0000 (15:02 +0200)]
arm-trusted-firmware-sunxi: update to version 2.9
- detect die revision used in variants of the Allwinner H616 SoC (H313, T507)
- support for H6 boards without PMIC
Tested on Pine64+ and Orange PI Zero2
Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
Andreas Böhler [Mon, 18 Sep 2023 09:55:57 +0000 (11:55 +0200)]
ramips: fix Mercusys MR70X LAN port assignments
A bug report in the forum found that the MR70X lists four LAN ports in LuCI
while it has only three. This adds the device to the network setup file
to fix the issue.
Identified-by: Forum User "Lexeyko"
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Sebastian Pflieger [Wed, 20 Sep 2023 18:13:14 +0000 (20:13 +0200)]
lldpd: add lldp_syscapabilities config option
allow to overwrite the detected system capabilities e.g. if devices
does not operate as bridge.
Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
Kristian Skramstad [Mon, 21 Aug 2023 15:45:36 +0000 (17:45 +0200)]
ipq807x: add support for Netgear WAX620
```
Specifications:
* CPU: Qualcomm IPQ8072A, SoC Version: 2.0, Quad core Cortex-A53 1.6896 GHz
* RAM: 1 GiB of DDR4 600 MHz
* Flash: NAND 2x256 MiB (Macronix MX30UF2G18AC)
* 4 RGB LEDs: Power, LAN, 2.4GHz and 5GHz
* UART: Two 4-pin unpopulated headers under the LEDs.
Use the header closest to LED 4 and 5.
They are marked with a white stroke.
TX RX GND, beginning from "4". 115200n8.
Lan:
* One 100/1000/2.5GBASE-T Gigabit Ethernet (QCA8081)
Wlan:
* 4x4 in 2.4GHz: 802.11b/g/n/ax
* 4x4 in 5.0GHz: 802.11a/n/ac/ax
* OFDM and OFDMA
* Bidir and MU-MIMO
* Internal antenna 3.1/4.3 dBi (2.4GHz/5GHz)
Power:
* PoE+ 802.3at/af 25.5W
* DC 12V 2.5A
```
```
Note: The OpenWrt image is setup with DHCP and not a static IP.
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect to console on the AP, and connect the LAN port to your LAN
3. Stop auto boot to get to U-boot shell, interrupt the autoboot process by pressing '0' when prompted
4. Set active_fw in env
# setenv active_fw 1
5. Transfer the initramfs image with TFTP
# setenv serverip 192.168.1.10 (IP of TFTP server host)
# setenv ipaddr 192.168.1.1 (IP used by the router for getting the image, must be in the same subnet as the TFTP host)
# tftpboot openwrt-qualcommax-ipq807x-netgear_wax620-initramfs-uImage.itb
6. Reboot and load the image
# bootm
7. SCP factory image to the AP
# scp openwrt-qualcommax-ipq807x-netgear_wax620-squashfs-factory.ubi root@192.168.1.1:/tmp/
8. Connect to device using SSH (use the LAN port)
9. Flash squashfs-factory.ubi from within the initramfs instance of OpenWRT
Before you flash, please check your mtd partitions where mtdX is the right mtd rootfs partition.
# cat /proc/mtd (To check MTD partitions)
# ubiformat /dev/mtd19 -y -f /tmp/openwrt-qualcommax-ipq807x-netgear_wax620-squashfs-factory.ubi
10. Set active_fw to 0
# /usr/sbin/fw_setenv active_fw 0
11. Reboot the AP and your done
# reboot
```
Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Mathew McBride [Fri, 22 Sep 2023 21:38:54 +0000 (21:38 +0000)]
armsr: ensure kmod-fs-vfat is selected for mounting ESP
vfat support is needed to mount the EFI System Partition (ESP)
during sysupgrade. If it is not available, the sysupgrade process
will not complete
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Oskari Rauta [Sun, 24 Sep 2023 08:29:39 +0000 (11:29 +0300)]
ccache: add missing \
-DREDIS_STORAGE_BACKEND=OFF option is ignored due to missing \
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
John Audia [Sat, 23 Sep 2023 11:39:00 +0000 (07:39 -0400)]
kernel: bump 6.1 to 6.1.55
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.55
All patches automatically rebased.
Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Signed-off-by: John Audia <therealgraysky@proton.me>
Ivan Pavlov [Sat, 23 Sep 2023 15:09:36 +0000 (18:09 +0300)]
openssl: update to 3.0.11
Changes between 3.0.10 and 3.0.11 [19 Sep 2023]
* Fix POLY1305 MAC implementation corrupting XMM registers on Windows. ([CVE-2023-4807])
Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Sijia Huang [Sat, 26 Aug 2023 00:38:01 +0000 (00:38 +0000)]
ramips: add support for WAVLINK WL-WN573HX1
Hardware
--------
Specifications:
- Device: WAVLINK WL-WN573HX1 Outdoor AP
- SoC: MT7621AT
- Flash: 16MB
- RAM: 256MB
- Switch:1 LAN (10/100/1000 Mbps)
- WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G
- LEDs: 1x STATUS (blue, configurable)
1x LAN (green)
Product link:
https://www.wavlink.com/en_us/product/WL-WN573HX1.html
Signed-off-by: Sijia Huang <engineer31@win-star.com>
John Audia [Tue, 19 Sep 2023 18:00:07 +0000 (14:00 -0400)]
kernel: bump 6.1 to 6.1.54
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.54
Removed upstreamed:
generic/backport-6.1/020-v6.3-02-UPSTREAM-mm-multi-gen-LRU-rename-lrugen-lists-to-lru.patch[1]
ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch[2]
All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.54&id=
a73d04c460521e45f257d28d73df096e41ece324
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.54&id=
e93bc372dbc0bde133c854c03502a95617041972
Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne
Signed-off-by: John Audia <therealgraysky@proton.me>
John Audia [Wed, 13 Sep 2023 20:01:32 +0000 (16:01 -0400)]
kernel: bump 6.1 to 6.1.53
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.53
Removed upstreamed:
bcm53xx/patches-6.1/032-v6.6-0005-ARM-dts-BCM53573-Drop-nonexistent-usb-cells.patch[1]
bcm53xx/patches-6.1/032-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[2]
bcm53xx/patches-6.1/032-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[3]
bcm53xx/patches-6.1/032-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch[4]
All other patches automatically rebased.
Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=
ee1d740374aa73fb32857685eb05167ad87458cf
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=
ab5154ae26c446136827451e907db45d7b92a76f
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=
f5ff6897094fa161be55786cb9e5d5b1bf7a9049
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=
0ef736fec61422794c4a991d46c4ec212b01d8d1
Signed-off-by: John Audia <therealgraysky@proton.me>
John Audia [Sat, 16 Sep 2023 10:57:38 +0000 (06:57 -0400)]
config-6.1: disable CONFIG_VIDEO_CAMERA_SENSOR
Disable new ksym globally as it is unconditionally selecting symbols.
See: https://github.com/torvalds/linux/commit/
7d3c7d2a2914e10bec3b9cdacdadb8e1f65f715a
Signed-off-by: John Audia <therealgraysky@proton.me>
Shiji Yang [Sat, 23 Sep 2023 01:25:15 +0000 (09:25 +0800)]
mac80211: rt2x00: fix MT7620 low RSSI issue
Introducing SoC specific RSSI base value to fix the low RSSI issue
on MT7620. With this fix[1], the RSSI value reported by MT7620 will
increase by 10 dB.
[1] https://lore.kernel.org/linux-wireless/TYAP286MB031571CDB146C414A908A66DBCFEA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
Fixes: https://github.com/openwrt/openwrt/issues/11036
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Felix Fietkau [Fri, 22 Sep 2023 17:59:09 +0000 (19:59 +0200)]
hostapd: fix patch rebase after a crash fix
The patch refresh accidentally moved the hostapd_ucode_free_iface call to
the wrong function
Fixes: e9722aef9e84 ("hostapd: fix a crash when disabling an interface during channel list update")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Josef Schlehofer [Sun, 17 Sep 2023 12:31:54 +0000 (14:31 +0200)]
tools/libressl: update to version 3.7.3
Release notes:
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.7.3-relnotes.txt
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Felix Fietkau [Fri, 22 Sep 2023 05:58:45 +0000 (07:58 +0200)]
hostapd: fix wpa_supplicant bringup with non-nl80211 drivers
Needed for wired 802.1x
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Daniel Golle [Tue, 12 Sep 2023 23:57:49 +0000 (00:57 +0100)]
mediatek: add build for MT7981 RFB
Add build for the MTK3943 reference board for MT7981B+MT7976C.
**Hardware specification:**
- SoC: MediaTek MT7981B 2x A53
- Flash: various options
- RAM: 256MB DDR3
- Ethernet: 4 x 10/100/1000 Mbps via MT7531AE switch
EITHER 1 x 10/100/1000 Mbps built-in PHY
OR 1 x 10/100/1000/2500 Mbps MaxLinear GPY211C
- Switch: MediaTek MT7531AE
- WiFi: MediaTek MT7976C
- Button: RST, WPS
**Flash instructions for SPIM-NAND:**
- write *mt7981-rfb-spim-nand-preloader.bin to 'BL2' partition
- write *mt7981-rfb-spim-nand-bl31-uboot.fip to 'FIP' partition
- erase 'ubi' partition
- reset board
- create ubootenv and ubootenv2 UBI volumes in U-Boot
- edit environment and set bootcmd, e.g.
setenv bootconf 'config-1#mt7981-rfb-spim-nand#mt7981-rfb-mxl-2p5g-phy-eth1'
setenv bootcmd 'ubi read $loadaddr fit; bootm $loadaddr#$bootconf'
- load initramfs image via TFTP:
setenv serverip 192.168.1.254
setenv ipaddr 192.168.1.1
setenv bootfile openwrt-mediatek-filogic-mediatek_mt7981-rfb-initramfs.itb
saveenv ; saveenv
tftpboot
bootm $loadaddr#$bootconf
- Now use sysupgrade to write OpenWrt firmware to flash.
SNFI-NAND, SPIM-NOR and eMMC all work very similar, a bootable SD card image
is also being generated. However, as the board I've been provided only comes
with SPIM-NAND all other boot media are untested.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Tue, 12 Sep 2023 23:57:23 +0000 (00:57 +0100)]
uboot-mediatek: add build for mt7981 rfb
Improve and package builds for various boot media configurations of the
MediaTek MT7981 reference board.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Mon, 18 Sep 2023 15:40:30 +0000 (16:40 +0100)]
arm-trusted-firmware-mediatek: fix copy&paste error in Makefile
When adding builds for MT7981 the related Makefile sections for MT7986
have apparently been copied, but in one instance the rename from 7986 to
7981 has been omitted. Fix that now.
Fixes: 602cb4f325 ("arm-trusted-firmware-mediatek: add build for MT7981 DDR3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>