openwrt/staging/wigyori.git
11 months agokernel: bump 6.1 to 6.1.72
John Audia [Wed, 10 Jan 2024 20:54:42 +0000 (15:54 -0500)]
kernel: bump 6.1 to 6.1.72

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.72

Manually rebased:
generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agomediatek: fix WED + wifi reset
Felix Fietkau [Fri, 19 Jan 2024 13:48:05 +0000 (14:48 +0100)]
mediatek: fix WED + wifi reset

The WLAN + WED reset sequence relies on being able to receive interrupts from
the card, in order to synchronize individual steps with the firmware.
When WED is stopped, leave interrupts running and rely on the driver turning
off unwanted ones.
WED DMA also needs to be disabled before resetting.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomt76: update to Git HEAD (2024-01-18)
Felix Fietkau [Thu, 18 Jan 2024 19:53:04 +0000 (20:53 +0100)]
mt76: update to Git HEAD (2024-01-18)

83e3947e2c52 linux-firmware: update firmware for MT7922 WiFi device
ddaa8cb6e81a linux-firmware: update firmware for MT7921 WiFi device
f83b1601cc10 linux-firmware: update firmware for MT7922 WiFi device
61d334ab0f33 linux-firmware: add firmware for MT7925
a7836e4c8a60 wifi: mt76: disable HW AMSDU when using fixed rate
a8571ebbcd95 wifi: mt76: check txs format before getting skb by pid
3d5890e2cab3 wifi: mt76: mt7915: fix error recovery with WED enabled
703c26d01197 wifi: mt76: mt7915: add locking for accessing mapped registers
f77188160441 wifi: mt76: mt7915: update mt798x_wmac_adie_patch_7976

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agohostapd: ACS: Fix typo in bw_40 frequency array
David Bauer [Thu, 18 Jan 2024 21:47:17 +0000 (22:47 +0100)]
hostapd: ACS: Fix typo in bw_40 frequency array

[Upstream Backport]

The range for the 5 GHz channel 118 was encoded with an incorrect
channel number.

Fixes: ed8e13decc71 (ACS: Extract bw40/80/160 freqs out of acs_usable_bwXXX_chan())
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agobcm27xx-utils: update to latest version
Álvaro Fernández Rojas [Thu, 18 Jan 2024 09:50:45 +0000 (10:50 +0100)]
bcm27xx-utils: update to latest version

Fixes build with GCC 13.
Disable LTO to fix build with CONFIG_USE_LTO.

Changelog:
e65f5ec eeptools: eepdump: init type before calling eepio_atom_start

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: config: update documentation links
Álvaro Fernández Rojas [Wed, 17 Jan 2024 09:39:37 +0000 (10:39 +0100)]
bcm27xx: config: update documentation links

The documentation links have changed and are no longer valid.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx-utils: add new package
Álvaro Fernández Rojas [Tue, 16 Jan 2024 13:52:05 +0000 (14:52 +0100)]
bcm27xx-utils: add new package

The raspberypi/userland repository has been deprecated and the RPi tools have
been moved to the raspberrypi/utils repository.
https://github.com/raspberrypi/userland/commit/96a7334ae9d5fc9db7ac92e59852377df63f1848

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: dts: remove unneeded cferom alias
Álvaro Fernández Rojas [Thu, 18 Jan 2024 07:57:43 +0000 (08:57 +0100)]
bmips: dts: remove unneeded cferom alias

This is no longer needed after nvmem-layout changes.
Same as 6f328dfe19 for NAND devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agokernel: bump 5.15 to 5.15.147
John Audia [Mon, 15 Jan 2024 20:25:53 +0000 (15:25 -0500)]
kernel: bump 5.15 to 5.15.147

Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.147

Manually rebased:
generic/backport-5.15/005-v5.17-01-Kbuild-use-Wdeclaration-after-statement.patch

All other patches automatically rebased.

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>
11 months agokernel: ksmbd: only v2 leases handle the directory
Chen Minqiang [Tue, 16 Jan 2024 09:20:04 +0000 (17:20 +0800)]
kernel: ksmbd: only v2 leases handle the directory

This backport a fix for ksmbd.

Refer: https://github.com/namjaejeon/ksmbd/issues/469

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
11 months agomediatek: refresh patches-6.1
Daniel Golle [Wed, 17 Jan 2024 01:48:29 +0000 (01:48 +0000)]
mediatek: refresh patches-6.1

Refresh patches for Linux 6.1 which no longer apply cleanly after
adding patches to fix ethernet rx hang issue on MT7981/MT7986.

Fixes: ede34465de ("mediatek: fix ethernet rx hang issue on MT7981/MT7986")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoramips: mt7621: convert Linksys devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:41:40 +0000 (21:41 +0800)]
ramips: mt7621: convert Linksys devices EEPROM to NVMEM format

-+-----------------------------+-
 |    Model   |       NIC      |
-+-----------------------------+-
 | EA6350 v4 | MT7603 + MT7613 |
-+-----------------------------+-
 | EA7300 v2 | MT7603 + MT7615 |
-+-----------------------------+-
 |  Others   |    MT7615 *2    |
-+-----------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:24:41 +0000 (21:24 +0800)]
ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format

-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | chj series | MT7603 + MT7615 |
-+------------------------------+-
 | bzv series |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert Wavlink devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:03:42 +0000 (21:03 +0800)]
ramips: mt7621: convert Wavlink devices EEPROM to NVMEM format

-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | WL-WN531A6 | MT7603 + MT7615 |
-+------------------------------+-
 | WL-WN533A8 |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:57:35 +0000 (20:57 +0800)]
ramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format

-+-------------------------+-
 | Model |       NIC       |
-+-------------------------+-
 | All   | MT7603 + MT7615 |
-+-------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:42:59 +0000 (20:42 +0800)]
ramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format

-+-------------------------------------------+-
 |          Model          |       NIC       |
-+-------------------------------------------+-
 | WN-DX1167R/WN-AX1167GR2 |     MT7615D     |
-+-------------------------------------------+-
 | WN-AX2033GR/WN-DX2033GR | MT7603 + MT7615 |
-+-------------------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:21:35 +0000 (20:21 +0800)]
ramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format

-+---------------------------+-
 |  Model  |       NIC       |
-+---------------------------+-
 | AC2100  | MT7603 + MT7615 |
-+---------------------------+-
 | MI4A V2 | MT7603 + MT7613 |
-+---------------------------+-
 | Others  | MT7603 + MT7612 |
-+---------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert MT7915 EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 11:56:05 +0000 (19:56 +0800)]
ramips: mt7621: convert MT7915 EEPROM to NVMEM format

Some MT7915 calibration data consists of two parts. The first part
"eeprom" size is 0xe00. The second part "precal" size is 0x19c10.

Though some devices may not have precal data, it's better to assume
that precal data exists as no users/developers confirm it. On the
other hand, some devices definitely do not contain precal data
because the EEPROM partition size is smaller than the precal NVMEM
cell size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agouqmi: update to git HEAD
Daniel Golle [Tue, 16 Jan 2024 22:22:17 +0000 (22:22 +0000)]
uqmi: update to git HEAD

c3488b8 uqmi: cancel all requests on SYNC indication reception
dfa612e uqmi: improve response detection

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: fix ethernet rx hang issue on MT7981/MT7986
Felix Fietkau [Tue, 16 Jan 2024 18:29:52 +0000 (19:29 +0100)]
mediatek: fix ethernet rx hang issue on MT7981/MT7986

Add patches by Lorenzo/Daniel to use QDMA instead of ADMAv2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoipq806x: DTS format fixup for Fortinet FAP-421E
Christian Marangi [Tue, 16 Jan 2024 14:53:16 +0000 (15:53 +0100)]
ipq806x: DTS format fixup for Fortinet FAP-421E

Small clanup and fixup for DTS format for Fortinet FAP-421E.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:58:01 +0000 (11:58 +0100)]
bcm27xx-gpu-fw: update to latest version

raspberrypi/firmware is about 40G, so getting the full history log isn't an
option.
There have been multiple improvements and also support for the RPi 5 has been
added.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx-userland: update to latest version
Marty Jones [Mon, 25 Dec 2023 00:03:31 +0000 (19:03 -0500)]
bcm27xx-userland: update to latest version

This is the last update for bcm27xx-userland as it has been
deprecated but funcional up to raspberry pi 5.

96a7334 README: Update to make it clear that most code in this repo is deprecated
3c97f76 userland: dtoverlay: /boot/firmware is a valid path
153a235 Assorted clang static analysis fixes
eca070c bcm_host: Update kms/fkms check for pi5
06a7618 dtoverlay: Support bcm2712 as a platform
0489c07 dtoverlay: Add dtoverlay_first/next_subnode
a1c7f81 dtoverlay: Support literal assignments of path strings
44a3953 raspivid: Also flush PTS file if flush is enabled
cc1ca18 userland: dtoverlay: Use os_prefix if set
9d5250f libfdt: Add null-ptr check for prop-data to resolve clang --analyzer warning
50527c6 mmal: Only include Videocore components if not running on Videocore
df245ea tvservice: Update unsupported message to recommend kmsprint
de0cfe8 dtoverlay: Fix clang warnings
0182f05 dtoverlay: Fix various compiler warnings
2a6306b dtoverlay: Fix path rebasing and exports
d1e92d7 dtoverlay: Add support for string escape sequences
b1ee39e gencmd: Add a fallback to mailbox interface if vchiq is not available
54fd97a hello_pi: Fix some build issues

Signed-off-by: Marty Jones <mj8263788@gmail.com>
11 months agolayerscape: refresh patches-6.1
Daniel Golle [Tue, 16 Jan 2024 13:41:06 +0000 (13:41 +0000)]
layerscape: refresh patches-6.1

Patches no longer cleanly apply after commit c2c741ccce ("generic:
6.1: initial backport of at803x PHY driver cleanup"). Refresh patches
to address that.

Fixes: c2c741ccce ("generic: 6.1: initial backport of at803x PHY driver cleanup")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agobmips: drop patches/config for kernel 5.15
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:04:29 +0000 (11:04 +0100)]
bmips: drop patches/config for kernel 5.15

Drop patches/config for kernel 5.15 now that they are not used anymore.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: move to kernel 6.1 by default
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:02:01 +0000 (11:02 +0100)]
bmips: move to kernel 6.1 by default

Move bmips to kernel 6.1 by default.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: dts: remove unneeded cfe alias
Álvaro Fernández Rojas [Tue, 16 Jan 2024 09:59:47 +0000 (10:59 +0100)]
bmips: dts: remove unneeded cfe alias

This is no longer needed after nvmem-layout changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: bcm6328: add Innacomm W3400V6
Sieng-Piaw Liew [Wed, 9 Aug 2023 05:13:57 +0000 (13:13 +0800)]
bmips: bcm6328: add Innacomm W3400V6
Innacomm W3400V6 is an xDSL B/G wireless router based on Broadcom
BCM6328 SoC.

SoC: Broadcom BCM6328
CPU: BMIPS4350 V8.0, 320 MHz, 1 core
Flash: SPI-NOR 8MB, MX25L6406E
RAM: 64 MB
Ethernet: 4x 10/100 Mbps
Switch: Integrated
Wireless: 802.11b/g, BCM4312
LEDs/Buttons: 9x / 2x

Flash instruction, web UI:
1. Set a static IP on your computer compatible with 192.168.1.1, i.e
192.168.1.100.
2. Connect the ethernet cable from your computer to the router.
3. Make sure the router is powered off.
4. Press the reset button, don't release it yet!
5. While pressing reset, power on the router.
6. Wait 10 seconds or more.
Note: The power LED is red at first then turns to solid green when
ready.
7. Release the reset button.
8. Browse to 192.168.1.1
9. Select .bin file.
10. Upgrade the image.
11. Wait for it to reboot.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
[Fix cfe nvmem-layout and pinctrl_leds indentation]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: 6.1: turn on cpu erratum for A72 and disable A53
Yangyu Chen [Mon, 18 Dec 2023 19:21:53 +0000 (03:21 +0800)]
bcm27xx: 6.1: turn on cpu erratum for A72 and disable A53

The original configuration might be copied from bcm2710 which uses
cortex A53 rather than A72 in BCM2711, without errata might be harmful
to system stability and security.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
11 months agobcm27xx: Remove unneeded kernel patch
Hauke Mehrtens [Wed, 10 Jan 2024 21:10:28 +0000 (22:10 +0100)]
bcm27xx: Remove unneeded kernel patch

This problem was fixed upstream in a different way, see:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.1.y&id=f434703fb893ddffcdbc1eec7646ce321e1190a8

Remove this now obsolete patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agoipq40xx: drop PSGMII PHY patch
Christian Marangi [Tue, 16 Jan 2024 00:00:31 +0000 (01:00 +0100)]
ipq40xx: drop PSGMII PHY patch

Drop PSGMII PHY patch as it has been moved to generic in preparation for
the PHY driver to be also used for ipq807x SoC as the same PHY is also
used there.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agogeneric: 6.1: backport FIELD_PREP_CONST patch
Christian Marangi [Mon, 15 Jan 2024 21:47:20 +0000 (22:47 +0100)]
generic: 6.1: backport FIELD_PREP_CONST patch

Backport FIELD_PREP_CONST patch needed for at803x backport patches to
correctly compile and work.

This MACRO is needed to treat values derived from FIELD_PREP usage as
const to be used by switch case or other needed usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agoipq806x: Stabilize LAN 2 MAC address, interface ordering
Bryan Berg [Sun, 26 Nov 2023 21:34:01 +0000 (13:34 -0800)]
ipq806x: Stabilize LAN 2 MAC address, interface ordering

Part 1 of #13629 split.

* Sets the LAN 2 MAC address in the DTS by deriving it from LAN 1's
address. The factory OS derives this from the `eth1addr` u-boot env
variable, but the nvmem_u-boot-env driver doesn't support parsing MAC
addresses from fields other than `ethaddr`. But for all of the device
samples I've checked (~10) it derives the correct MAC.

* Updates 02_network to ensure that interfaces are assigned to roles
correctly and consistently.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
11 months agogeneric: 6.1: initial backport of at803x PHY driver cleanup
Christian Marangi [Mon, 15 Jan 2024 18:54:23 +0000 (19:54 +0100)]
generic: 6.1: initial backport of at803x PHY driver cleanup

Initial backport of at803x PHY driver cleanup. This is in preparation
for split and addition of new PHY Family based on at803x needed for
ipq807x and other IPQ Series SoC.

Other affected patch are automatically refreshed with
make target/linux/refresh

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agogeneric: 6.1: renumber MediaTek SGMII PCS patch
Christian Marangi [Mon, 15 Jan 2024 18:53:06 +0000 (19:53 +0100)]
generic: 6.1: renumber MediaTek SGMII PCS patch

Renumber MediaTek SGMII PCS patch to make space for upcoming at803x
backport patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agobase-files: functions.sh: prepend() always adds separator
Philip Prindeville [Mon, 1 Jan 2024 22:37:34 +0000 (15:37 -0700)]
base-files: functions.sh: prepend() always adds separator

It shouldn't gate on the value, since the value will ostensibly
always be set; instead it should depend on the variable being
prepended to being non-empty.

Fixes #14403

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
11 months agortl838x: debugfs use constants from mach-rtl83xx.h
Peter Körner [Tue, 19 Sep 2023 22:45:14 +0000 (00:45 +0200)]
rtl838x: debugfs use constants from mach-rtl83xx.h

The register constants were duplicated in net/dsa/rtl83xx/debugfs.c and asm
mach-rtl838x/mach-rtl83xx.h. This commit removes this duplication.

Signed-off-by: Peter Körner <git@mazdermind.de>
11 months agortl838x: fix RTL838X_LED_SW_CTRL definition
Peter Körner [Tue, 19 Sep 2023 22:44:39 +0000 (00:44 +0200)]
rtl838x: fix RTL838X_LED_SW_CTRL definition

According to https://svanheule.net/realtek/maple/register/led_sw_ctrl and also
drivers/net/dsa/rtl83xx/debugfs.c LED_SW_CTRL on the RTL838X should be 0xa00c
not 0x0128. Please note, that is is 0x0128 on the RTL8390/cypress SOC family.

Signed-off-by: Peter Körner <git@mazdermind.de>
11 months agortl931x: reformat broken indentation
Peter Körner [Tue, 19 Sep 2023 20:27:11 +0000 (22:27 +0200)]
rtl931x: reformat broken indentation

the given code-format did not correctly express the condition and made the code
harder to read then necessary.

Signed-off-by: Peter Körner <git@mazdermind.de>
11 months agogettext-full: use autoreconf host fixup
Alexander Egorenkov [Thu, 8 Jun 2023 06:34:13 +0000 (08:34 +0200)]
gettext-full: use autoreconf host fixup

To prevent use of host's library path on Void Linux:

   /usr/lib/libacl.so: file not recognized: file format not recognized
   collect2: error: ld returned 1 exit status
   libtool:   error: error: relink 'libgettextlib.la' with the above command before installing it

Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
11 months agofstools: update to Git HEAD (2024-01-15)
Christian Marangi [Mon, 15 Jan 2024 16:31:47 +0000 (17:31 +0100)]
fstools: update to Git HEAD (2024-01-15)

325d63d67006 mount_root: fix compilation error for wrong condition

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agomediatek: GL-MT6000: Change LED colors
Thomas Schröder [Wed, 10 Jan 2024 10:12:10 +0000 (11:12 +0100)]
mediatek: GL-MT6000: Change LED colors

Fine tuning PR: openwrt/openwrt#14355 Ref: 5a82bb909bf1
("mediatek: GL-MT6000: Add missing LED state definitions")

As the only LED is using white in the stock firmware when the device is
running and blue for the bootloader I suggest following changes:
 - Using blue for the BL and preinit+failsafe
 - White for normal operation (like the original FW) and sysupgrade

With this changes it's clear by looking to the LED in which operation
mode the device is and a possible BL stuck can be seen easily.

Tested with [GL-MT6000](https://openwrt.org/toh/gl.inet/gl-mt6000).

Signed-off-by: Thomas Schröder <tschroeder_github@outlook.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
11 months agoipq807x: prpl-haze: enable LED driver on device tree
CheWei Chien [Thu, 4 Jan 2024 10:09:06 +0000 (18:09 +0800)]
ipq807x: prpl-haze: enable LED driver on device tree

Enable LED driver LP5562 on HAZE device tree and include its kernel
module package on default package for HAZE.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
11 months agokernel: add kmod-leds-lp5562 and kmod-leds-lp55xx-common
CheWei Chien [Thu, 4 Jan 2024 05:28:40 +0000 (13:28 +0800)]
kernel: add kmod-leds-lp5562 and kmod-leds-lp55xx-common

Add kernel module for lp5562 LED driver.
The kmod-leds-lp5562 depends on kmod-leds-lp55xx-common.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
11 months agoipq806x: add support for Fortinet FAP-421E
JinGen Lim [Tue, 2 Jan 2024 16:54:52 +0000 (00:54 +0800)]
ipq806x: add support for Fortinet FAP-421E

Hardware
--------

SoC:    Qualcomm IPQ8064
RAM:    235MB
Flash:  128MB NAND (Micron MT29F1G08ABBDAH4)
        32MB SPI-NOR (Spansion FL256SAIFRO)
WLAN2:  Qualcomm Atheros QCA9980
WLAN5:  Qualcomm Atheros QCA9980
ETH:    LAN1 - Atheros AR8035
        LAN2 - Atheros AR8033
USB:    USB-A, 2.0
LED:    Power (yellow/amber)
        LAN1 (yellow/amber)
        LAN2 (yellow/amber)
        WLAN2G (yellow)
        WLAN5G (yellow)
BTN:    Reset
Serial: RJ45 Port (9600 8n1) Cisco console cable, TTL voltage

MAC Address:    LAN1 (label) at APPSBL partition
                LAN2: label + 1
                WLAN2: label + 8
                WLAN5: label + 16

Installation
------------

Connect to the RJ45 console (TTL)
Connect LAN1 to host, set host ip as 192.168.1.10
Start a tftp server to serve the initramfs image
Open console connection (9600n8)
Connect power through the DC jack

`Hit any key to stop autoboot:  5`: press any key
`Enter G,Q,or H:`: press `K` to access the hidden option
`Enter password:`: `fap22b1!$` to access a limited u-boot console
`(FAP) #`: `tftpboot your_initramfs_image_name.itb`
`(FAP) #`: `bootm`

Once OpenWrt has booted, install the firmware through sysupgrade

Signed-off-by: JinGen Lim <openwrt@sn.sg>
11 months agoipq807x: use devinfo MAC for Linksys MX4200
Paweł Owoc [Sat, 6 Jan 2024 16:05:40 +0000 (17:05 +0100)]
ipq807x: use devinfo MAC for Linksys MX4200

Some devices (MX42CF) have a wrong MAC address configuration. The correct one is located only on the devinfo partition.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
11 months agoipq807x: fix whitespace usage
Paweł Owoc [Sat, 6 Jan 2024 15:46:30 +0000 (16:46 +0100)]
ipq807x: fix whitespace usage

Replace with tab and remove unused whitespaces

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
11 months agoimagebuilder: copy from buildroot only target/linux/generic and target/linux/<target...
a-gave [Thu, 11 Jan 2024 10:33:21 +0000 (11:33 +0100)]
imagebuilder: copy from buildroot only target/linux/generic and target/linux/<target> to reduce the size

This reduces the size of a single imagebuilder by about 40MB
In example for the target ath79 it would be the sum of generic and <target> directories, so about 16MB,
instead of the whole size of the target directory, about 53MB:
11M target/linux/generic/
3.9M target/linux/ath79/

Signed-off-by: a-gave <agave@dracaena.it>
11 months agobase-files: add support for rootfs mount options from cmdline
Christian Marangi [Sat, 16 Sep 2023 15:16:04 +0000 (17:16 +0200)]
base-files: add support for rootfs mount options from cmdline

Add support for configuring rootfs mount options from cmdline.

Rootfs mount options can be passed by declaring in the kernel
cmdline as much options as needed prefixed with "rootfs_mount_options."

An example usage is with rootfs with F2FS filesystem to enable
compress_algorithm to reduce flash wear by compressing the files before
writing to flash.

Example usage:
"... rootfs_mount_options.compress_algorithm=zstd ..."

To pass multiple options:
"... rootfs_mount_options.compress_algorithm=zstd rootfs_mount_options.noinline_data ..."

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agofstools: update to Git HEAD (2024-01-15)
Christian Marangi [Mon, 15 Jan 2024 15:37:11 +0000 (16:37 +0100)]
fstools: update to Git HEAD (2024-01-15)

97bacb70138a libfstools: query drivers by priority
41e619ed1352 block: recognize /dev/fit* block devices
bc3b8cdd3de3 libfstools: add uImage.FIT fitblk driver
846302d09246 libfstools: partname: raise priority to 25
1a5695925ecf mount_root: add support for passing args to mount_root start
1858a492c300 mount_root: permit to pass mount options for rootfs mount

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agomediatek: TOTOLINK A8000RU: add missing usb3 package
Chukun Pan [Sat, 23 Dec 2023 15:16:15 +0000 (23:16 +0800)]
mediatek: TOTOLINK A8000RU: add missing usb3 package

This device has a usb 3.0 port, so add it.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: fixes typo for spi properties
Chukun Pan [Thu, 21 Dec 2023 15:16:08 +0000 (23:16 +0800)]
mediatek: fixes typo for spi properties

Same as commit 3674689, correct 'buswidth' to 'bus-width'.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: YunCore AX835: convert to nvmem-layout
Chukun Pan [Tue, 9 Jan 2024 15:15:27 +0000 (23:15 +0800)]
mediatek: YunCore AX835: convert to nvmem-layout

The nvmem-cells is deprecated. Also simplify mac address settings.

Fixes: b4086f4 ("mediatek: add support for YunCore AX835")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: Cudy WR3000: simplify mac address setup
Chukun Pan [Wed, 20 Dec 2023 15:15:31 +0000 (23:15 +0800)]
mediatek: Cudy WR3000: simplify mac address setup

The mac address of the network port under the switch is
the same as the corresponding gmac by default, so there
is no need to repeat the setting. Compile test only.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: Cetron CT3003: move mac address setup to dts
Chukun Pan [Tue, 19 Dec 2023 15:15:38 +0000 (23:15 +0800)]
mediatek: Cetron CT3003: move mac address setup to dts

It looks like we can put the mac address setting
into the device tree. Compile test only.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: filogic: refresh kernel config
Chukun Pan [Mon, 18 Dec 2023 15:15:20 +0000 (23:15 +0800)]
mediatek: filogic: refresh kernel config

Refresh kernel config with 'make kernel_oldconfig'.
Also disable the useless rtl8367s gsw driver.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: mt7622: refresh kernel config
Chukun Pan [Sun, 17 Dec 2023 15:15:08 +0000 (23:15 +0800)]
mediatek: mt7622: refresh kernel config

Refresh kernel config with 'make kernel_oldconfig'.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agorealtek: rtl838x: add Netgear GS110TUP v1 support
Jacob Potter [Sun, 24 Dec 2023 02:37:54 +0000 (21:37 -0500)]
realtek: rtl838x: add Netgear GS110TUP v1 support

The GS110TUP v1 is a managed switch similar to the GS110TPP v1, but with
port 10 as SFP instead of RJ-45 and a total budget of 240 watts. Ports
1-4 support 60-watt 802.3bt PoE and ports 5-8 support 30-watt 802.3at.

The flash layout of the two switches are identical, and the U-Boot
configurations are the same except for having a different magic number,
so installation can be done via the same U-Boot method.

The following command will be needed to enable the port LEDs as per
https://forum.openwrt.org/t/72510/51 :
    fw_setenv bootcmd "rtk network on; boota"

Additionally, port 9 (1000base-T from a separate QSGMII PHY) does not
function without this. Port 10 was not tested as no SFP module was
available.

Signed-off-by: Jacob Potter <jacob@j4cbo.com>
[rebase on merged flash layout]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
11 months agorealtek: rtl838x: join Netgear GSxxx flash layouts
Sander Vanheule [Sun, 7 Jan 2024 14:51:36 +0000 (15:51 +0100)]
realtek: rtl838x: join Netgear GSxxx flash layouts

Flash layouts for GS108Tv3, GS110TPPv1, GS308Tv1 and GS310TPv1 are
almost identical, except for the uimage header magic.

Move the flash layout to the common dtsi, and only place the magic value
in the device dts files.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
11 months agohostapd: add back missing function for updating wpa_supplicant macaddr list
Felix Fietkau [Sat, 13 Jan 2024 15:11:41 +0000 (16:11 +0100)]
hostapd: add back missing function for updating wpa_supplicant macaddr list

Make the call deferred instead of blocking to avoid deadlock issues

Fixes: 3df9322771cc ("hostapd: make ubus calls to wpa_supplicant asynchronous")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agohostapd: fix an exception in hostapd.uc on interface add failure
Felix Fietkau [Sat, 13 Jan 2024 14:22:27 +0000 (15:22 +0100)]
hostapd: fix an exception in hostapd.uc on interface add failure

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoRevert "mac80211: rework interface setup, fix race condition"
Felix Fietkau [Sat, 13 Jan 2024 10:19:07 +0000 (11:19 +0100)]
Revert "mac80211: rework interface setup, fix race condition"

This reverts commit b7f9742da82fa9b122e8d63e48a9a5c0dec298f2.
There are several reports of regressions with this commit. Will be added
back once I've figured out and fixed the cause

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomac80211: rework interface setup, fix race condition
Felix Fietkau [Tue, 14 Nov 2023 12:00:27 +0000 (13:00 +0100)]
mac80211: rework interface setup, fix race condition

Only tell netifd about vifs when the setup is complete and hostapd +
wpa_supplicant have been notified

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomac80211.sh: fix deadlock on configuring multiple PHYs simultaneously
Felix Fietkau [Sun, 22 Oct 2023 16:00:08 +0000 (18:00 +0200)]
mac80211.sh: fix deadlock on configuring multiple PHYs simultaneously

When hitting a timing window where ubus configuration calls are hitting hostapd
and wpa_supplicant simultaneously, they can deadlock waiting for each other.
Fix this by using a lock around the ubus calls.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoci: no longer require real name
Paul Spooren [Wed, 10 Jan 2024 16:21:01 +0000 (17:21 +0100)]
ci: no longer require real name

This goes in accordance with the Linux Kernel:

> using a known identity (sorry, no anonymous contributions.)

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD#n442

Signed-off-by: Paul Spooren <mail@aparcar.org>
11 months agohostapd: make ubus calls to wpa_supplicant asynchronous
Felix Fietkau [Thu, 11 Jan 2024 08:14:59 +0000 (09:14 +0100)]
hostapd: make ubus calls to wpa_supplicant asynchronous

This fixes a deadlock issue where depending on the setup order, hostapd and
wpa_supplicant could end up waiting for each other

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoath79: read back reset register
David Bauer [Tue, 9 Jan 2024 19:52:56 +0000 (20:52 +0100)]
ath79: read back reset register

Read back the reset register in order to flush the cache. This fixes
spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
DRAM chips.

This issue was fixed in the past, but switching to the reset-driver
specific implementation removed the cache barrier which was previously
implicitly added by reading back the register in question.

Link: https://github.com/freifunk-gluon/gluon/issues/2904
Link: https://github.com/openwrt/openwrt/issues/13043
Link: https://dev.archive.openwrt.org/ticket/17839
Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")

Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agouqmi: added timeouts in qmi.sh
Uwe Niethammer [Fri, 10 Nov 2023 01:06:15 +0000 (02:06 +0100)]
uqmi: added timeouts in qmi.sh

Modems which are using qmi do not reply on the 1st sync but they do
on subsequent. Sometimes uqmi is hanging - even when using an early
dummy access to unlock the modem. To always guarantee a proper
initialisation, running or hanging uqmi processes must be stopped
before. All uqmi calls have now a timeout option -t to avoid hanging.

Signed-off-by: Uwe Niethammer <uwe@dr-niethammer.de>
11 months agoramips: mt76x8: add support for TP-Link RE365 v1
Tomasz Maciej Nowak [Wed, 10 Jan 2024 15:39:57 +0000 (16:39 +0100)]
ramips: mt76x8: add support for TP-Link RE365 v1

TP-Link RE365 is a wireless range extender, hardware-wise resembles
RE305 with slight changes regarding buttons and LEDs.

Specification
SoC: MediaTek MT7628AN
RAM: 64 MiB DDR2
Flash: 8 MiB SPI NOR
WiFi: 2.4 GHz 2T2R integrated
      5 GHz 2T2R MediaTek MT7612EN conncted to PCIe lanes
Ethernet: 1x 10/100 Mbps integrated
LEDs: 6x GPIO controlled
Buttons: 4x GPIO controlled
UART: row of 4 holes marked on PCB as J1, starting count from white
      triangle
      1. VCC (3.3V), 2. GND, 3. RX, 4. TX
      baud: 57600, parity: none, flow control: none

Installation
1. Open web management interface.
2. Go to Settings > System Tools > Firmware upgrade.
3. Select "Browse" and select the OpenWrt image with factory.bin suffix.
4. After selecting "Upgrade" firmware writing process will start.
5. Wait till device reboots, power LED should stay solid when it's fully
   booted, then it's ready for configuration through LAN port.

Additional information
With how device manufacturer patrtitioned the flash memory, it's possible
that with default packages set, initial factory.bin image won't be
created. In such case, try to reduce packages amount or use older release
for initial conversion to OpenWrt. Later You can use sysupgrade.bin
image with full set of packages because OpenWrt uses unpartitioned flash
memory space unused by vendor firmware.

Reverting to vendor firmware involves converting firmware using
tplink-safeloader with -z option (can be found in ImageBuilder or SDK)
and forcibly applying converted firmware as sysupgrade.

Known issues
WARNING: after removing casing of the device one is exposed to high
voltage and is in a risk of being electrocuted.

Caution when interfacing whith bootloader, saving its environment either
by issuing "saveenv" or selecting option "1: Load system code to SDRAM
via TFTP." in boot menu, any of those will lead to overwriting part of
kernel. This will lead to need of firmware recovery. The cause of this
issue is bootloader having environment offset on flash at 0x40000,
while kernel starts from 0x20000.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[Wrap long line in DTS]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
11 months agouhttpd: handle reload after uhttpd-mod-ubus installation using postinst
Rafał Miłecki [Wed, 27 Dec 2023 15:20:45 +0000 (16:20 +0100)]
uhttpd: handle reload after uhttpd-mod-ubus installation using postinst

Use postinst script to reload service instead of uci-defaults hack. It's
possible thanks to recent base-files change that executes postinst after
uci-defaults.

This fixes support for uhttpd customizations. It's possible (again) to
adjust uhttpd config with custom uci-defaults before it gets started.

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Fixes: d25d281fd668 ("uhttpd: Reload config after uhttpd-mod-ubus was added")
Ref: b799dd3c705d ("base-files: execute package's "postinst" after executing uci-defaults")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
11 months agortl83xx: dsa: reset PVID to 1 instead of 0
Harshal Gohel [Wed, 3 Jan 2024 15:15:12 +0000 (16:15 +0100)]
rtl83xx: dsa: reset PVID to 1 instead of 0

Before, PVID is reset for all ports and goes out of bounds. Also, PVID
is later changed by dsa configuration by `ip link` and `bridge vlan`
commands, this does not change the CPU port PVID and CPU PVID stays 0.
It does not allow sending packets from OpenWrt to any connected devices
unless default configuration is changed

This change iterates up to and including cpu_port and sets default PVID
to 1. For lan* ports PVID can be configured with `ip link` and `bridge
vlan` commands

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agortl93xx: dsa: Fix 802.1QinQ for trunk ports
Harshal Gohel [Wed, 3 Jan 2024 14:53:47 +0000 (15:53 +0100)]
rtl93xx: dsa: Fix 802.1QinQ for trunk ports

Fix incorrect register value being set for VLAN_PORT_FWD

Before, the 0b1111 would be set for the register which means outgoing
packets would receive an extra tag, corresponding to the PVID of the
port.

On untagged ports, this meant outgoing packets with a single tag.

On tagged ports, this meant outgoing QinQ packets, where the inner tag
was either the PVID of the untagged ingress port, or the already
assigned original (single) tag.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agortl83xx: dsa: Clear duplex bit correctly
Harshal Gohel [Wed, 13 Dec 2023 07:29:36 +0000 (08:29 +0100)]
rtl83xx: dsa: Clear duplex bit correctly

Without this, luci shows 10M full duplex when there is no link. So
explicitly set half duplex and unknown speed.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agortl930x: Rework per port LED configuration
Harshal Gohel [Tue, 12 Dec 2023 14:48:56 +0000 (15:48 +0100)]
rtl930x: Rework per port LED configuration

Use led_setX to determine number of LEDs per port. Introduce macros to
calculate register value and shift for particular LED in a particular
set.

Problem with previous implementation is that it uses is10G status to
determine leds per port. However with usxgmii, driver sets 10g, 5g and
2.5g so even though there are only 2 leds per port it selects 4 leds per
port

This implementation relies on configured led_set node.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agortl83xx: dsa: Do nothing when vid 0
Harshal Gohel [Mon, 27 Nov 2023 16:09:55 +0000 (17:09 +0100)]
rtl83xx: dsa: Do nothing when vid 0

Following other dsa drivers, vid 0 is no-op

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agortl83xx: dsa: disable VLAN filtering on CPU port
Harshal Gohel [Mon, 27 Nov 2023 16:09:27 +0000 (17:09 +0100)]
rtl83xx: dsa: disable VLAN filtering on CPU port

Before driver code
 - enabled egress filter for cpu and non-cpu ports
 - enabled ingress filter for non-cpu ports

This patch explicitly enables ingress and egress filtering for non-cpu
ports and disables ingress and egress filtering for cpu port.

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agortl838x: Enable jumbo frames by default
Harshal Gohel [Mon, 27 Nov 2023 16:08:04 +0000 (17:08 +0100)]
rtl838x: Enable jumbo frames by default

Increase DEFAULT_MTU and max-mtu size
Increase truncate length on rx of jumbo frame

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
11 months agomediatek: fix BPI-R3 wifi mac address
Felix Fietkau [Tue, 9 Jan 2024 14:15:08 +0000 (15:15 +0100)]
mediatek: fix BPI-R3 wifi mac address

Setting/clearing bits on the first byte of the mac address causes collisions
when using multiple SSIDs on both PHYs. Change the allocation to alter the
last byte instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomac80211: do not emit VHT160 capabilities if channel width is less than 160 MHz
Felix Fietkau [Tue, 9 Jan 2024 13:36:42 +0000 (14:36 +0100)]
mac80211: do not emit VHT160 capabilities if channel width is less than 160 MHz

Fixes compatibility issues with VHT160 capable clients

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agohostapd: add missing NULL pointer check on radar notification
Felix Fietkau [Tue, 9 Jan 2024 10:05:45 +0000 (11:05 +0100)]
hostapd: add missing NULL pointer check on radar notification

Fixes a race condition that can lead to a hostapd crash

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agolibubox: work around recent macOS linker change
Felix Fietkau [Thu, 21 Dec 2023 16:29:45 +0000 (17:29 +0100)]
libubox: work around recent macOS linker change

rpath handling seems to be more restrictive now. To deal with this,
link the libubox library from STAGING_DIR_HOST to STAGING_DIR_HOSTPKG, so that
packages installed to STAGING_DIR_HOSTPKG can pick it up. This mainly affects
ucode, but possibly other host builds as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomediatek: disable btif for mt7622 devices
Felix Fietkau [Thu, 21 Dec 2023 20:20:17 +0000 (21:20 +0100)]
mediatek: disable btif for mt7622 devices

It breaks built-in SoC WLAN. Can be re-enabled after we've figured out the cause

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomediatek: add support for YunCore AX835
Leon M. Busch-George [Fri, 13 Oct 2023 10:44:11 +0000 (12:44 +0200)]
mediatek: add support for YunCore AX835

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 16MB NOR
  RAM: 256MB
  Ethernet: 2x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset
  Power: DC 12V 1A, PoE 802.3af 48V

Flash instructions:

Option #1 - SSH

  I was able to SSH into the stock firmware of my device.

  1. Attach the router to the network
  2. Use scp (-O) to copy the sysupgrade image
  3. Connect using SSH and run `sysupgrade -n`

Option #2 - U-Boot

  One way to use the bootloader for flashing is using TFTP:

  1. Connect to the router using an ethernet cable
  2  Spin up a TFTP server serving the sysupgrade file
  3. Open the case and attach a UART
  4. Attach power to the router and interrupt the countdown by pressing
     any key
  5. Select option #2 (Upgrade firmware)
  6. Enter IP address information and image name
  7. Wait patiently

Co-Authored-By: Enrique Rodríguez Valencia <enrique.rodriguez@galgus.net>
Co-Authored-By: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
11 months agomediatek: GL-MT6000: Add missing LED state definitions
Hannu Nyman [Sat, 6 Jan 2024 17:59:13 +0000 (19:59 +0200)]
mediatek: GL-MT6000: Add missing LED state definitions

Adjust LED names and provide the OpenWrt status indicator aliases
to actually use LEDs by the OpenWrt boot & sysupgrade processes.

* Name both LEDs clearly by the color
* Add the missing OpenWrt LED status indicator aliases and
  remove the now unnecessary default status from blue LED

After this commit, the LEDs are used as:

* bootloader, really early Linux boot: blue LED is on
* preinit/failsafe: white LED blinks rapidly
* late boot: white LED blinks slowly
* boot completed, running normally: blue LED is on

* sysupgrade: white LED blinks

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
11 months agoipq-wifi: fix PKG_MIRROR_HASH
Manuel Fombuena [Mon, 8 Jan 2024 01:49:58 +0000 (01:49 +0000)]
ipq-wifi: fix PKG_MIRROR_HASH

Incorrect PKG_MIRROR_HASH introduced on #14356

Fixes: 934873f4514b ("ipq-wifi: bump version to 2024-01-06-71f45cff")
Signed-off-by: Manuel Fombuena <mfombuena@innovara.co.uk>
11 months agoscripts: fix installed-size calculation
Paul Spooren [Sat, 6 Jan 2024 17:10:29 +0000 (18:10 +0100)]
scripts: fix installed-size calculation

Previously the script would calculate the size of the compressed archive
which isn't the size installed in the overlayfs.

This commit uses zcat in combination with wc to calculate the
umcompressed size.

Signed-off-by: Paul Spooren <mail@aparcar.org>
11 months agopackages: add PKG_URL variable
Paul Spooren [Sat, 6 Jan 2024 17:50:00 +0000 (18:50 +0100)]
packages: add PKG_URL variable

Using PKG_URL one may set the URL for all sub packages, which is usually
shared anyway. Future packages should only use PKG_URL instead of adding
it per sub-package.

Signed-off-by: Paul Spooren <mail@aparcar.org>
11 months agopackages: store URL in Manifest
Paul Spooren [Sat, 6 Jan 2024 17:48:46 +0000 (18:48 +0100)]
packages: store URL in Manifest

The manifest should provide as much information as possible about the
package, including the project URL. With this commit the URL is stored
as it's own attribute instead of at the end of the description.

Signed-off-by: Paul Spooren <mail@aparcar.org>
11 months agokernel: backport more NVMEM changes queued for v6.8
Rafał Miłecki [Fri, 5 Jan 2024 10:31:26 +0000 (11:31 +0100)]
kernel: backport more NVMEM changes queued for v6.8

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
11 months agoipq-wifi: bump version to 2024-01-06-71f45cff
Manuel Fombuena [Sun, 7 Jan 2024 01:04:36 +0000 (01:04 +0000)]
ipq-wifi: bump version to 2024-01-06-71f45cff

673662f ipq8074: add Wallys DR8072V01 BDF
7e8b237 ipq40xx: add ZyXEL WSQ50 QCA4019 BDF
831c1bd ipq40xx: add ZyXEL WSQ50 QCA9984 BDF
f9ff251 ipq40xx: add ASUS MAP-AC2200 QCA9888 BDF
71f45cf ipq8074: Update MX4200 BDF

Signed-off-by: Manuel Fombuena <mfombuena@innovara.co.uk>
Reviewed-by: Robert Marko <robimarko@gmail.com>
11 months agoath79: add support for UniFi UK-Ultra
David Bauer [Fri, 5 Jan 2024 16:18:09 +0000 (17:18 +0100)]
ath79: add support for UniFi UK-Ultra

Hardware
--------
CPU:   Qualcomm Atheros QCA9563
RAM:   128M DDR2
FLASH: 16MB SPI-NOR
WiFi:  Qualcomm Atheros QCA9563 2x2:2 802.11n 2.4GHz
       Qualcomm Atheros QCA9880 2x2:2 802.11ac 5GHz

Antennas
--------
The device features internal antennas as well as external antenna
connectors. By default, the internal antennas are used.

Two GPIOs are exported by name, which can be used to control the
antenna-path mux. Writing a logical 0 enables the external antenna
connectors.

Installation
------------
1. Download the OpenWrt sysupgrade image to the device. You can use scp
   for this task. The default username and password are "ubnt" and the
   device is reachable at 192.168.1.20.

   $ scp -O openwrt-sysupgrade.bin ubnt@192.168.1.20:/tmp/firmware.bin

2. Connect to the device using SSH.

   $ ssh ubnt@192.168.1.20

3. Disable the write-protect

   $ echo "5edfacbf" > /proc/ubnthal/.uf

4. Verify kernel0 and kernel1 match mtd2 and mtd3

   $ cat /proc/mtd

5. Write the sysupgrade image to kernel0 and kernel1

   $ dd if=/tmp/firmware.bin of=/dev/mtdblock2
   $ dd if=/tmp/firmware.bin of=/dev/mtdblock3

6. Write the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtd4

7. Reboot the device

   $ reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agoath79: move UniFi AC template into common
David Bauer [Fri, 5 Jan 2024 16:02:01 +0000 (17:02 +0100)]
ath79: move UniFi AC template into common

This allows us to embrace alphabetical sorting for the UK-Ultra.

Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agomac80211: avoid crashing on invalid band info
David Bauer [Thu, 30 Nov 2023 06:32:52 +0000 (07:32 +0100)]
mac80211: avoid crashing on invalid band info

Frequent crashes have been observed on MT7916 based platforms. While the
root of these crashes are currently unknown, they happen when decoding
rate information of connected STAs in AP mode. The rate-information is
associated with a band which is not available on the PHY.

Check for this condition in order to avoid crashing the whole system.
This patch should be removed once the roout cause has been found and
fixed.

Link: https://github.com/freifunk-gluon/gluon/issues/2980
Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agokernel: copy only *.ko for debug info
Chuanhong Guo [Sun, 7 Jan 2024 15:56:05 +0000 (23:56 +0800)]
kernel: copy only *.ko for debug info

Previous commits installed non-elf files into /lib/modules/$VER/.
COLLECT_KERNEL_DEBUG tries to strip all files and these two files
break the build.
Fix it by copying only kernel modules for debug info collection.

Fixes: e1d8e57614 ("kernel: include modinfo for built-in modules")
Fixes: 29f6da4340 ("kernel: include built-in module list")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
11 months agoramips: add alternative name to Etisalat (Sercomm) S3
Mikhail Zhilkin [Sun, 3 Dec 2023 15:05:40 +0000 (15:05 +0000)]
ramips: add alternative name to Etisalat (Sercomm) S3

This commit adds alternative name to Etisalat (Sercomm) S3 router.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
11 months agoramips: sercomm s1500: enable wlan LEDs activity blinking
Mikhail Zhilkin [Sun, 3 Dec 2023 12:42:47 +0000 (12:42 +0000)]
ramips: sercomm s1500: enable wlan LEDs activity blinking

This commit enables wireless LEDs activity blinking for Sercomm S1500
devices (Beeline Smartbox PRO, WiFire s1500.nbn).

Run-tested: WiFire s1500.nbn

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
11 months agoramips: update leds & buttons dts description
Mikhail Zhilkin [Sun, 3 Dec 2023 12:40:46 +0000 (12:40 +0000)]
ramips: update leds & buttons dts description

This commit:
1. Removes deprecated "label" property from the dts leds subnnodes;
2. Updates buttons and leds dts description according to kernel docs
   examples.

Scope: devices well known to me.

Run-tested: TP-Link ec330-g5u, WiFire S1500.nbn

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
11 months agoath79: support MikroTik RouterBOARD 911G-5HPacD
Lech Perczak [Sat, 18 Nov 2023 15:54:59 +0000 (16:54 +0100)]
ath79: support MikroTik RouterBOARD 911G-5HPacD

The MikroTik RouterBOARD 911G-5HPacD is a stripped-down version of
RB921GS-5HPacD, removing the SFP cage.
This ports the board from ar71xx, and is based on support for
RB921GS-5HPacD.

Disable mdio1 and eth1 nodes in routerboard-92x.dtsi, then re-enable
them in devices using that, so the newly-added device has the port
disabled properly.

See https://mikrotik.com/product/RB911G-5HPacD for more info.

Specifications:
 - SoC: Qualcomm Atheros QCA9558 (720 MHz)
 - RAM: 128 MB
 - Storage: 128 MB NAND
 - Wireless: external QCA9892 802.11a/ac 2x2:2
 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in

Working:
 - NAND storage detection
 - Ethernet
 - Wireless
 - 1x user LED (blinks during boot, sysupgrade)
 - Reset button
 - Sysupgrade

Installation:
 - Boot initramfs image via TFTP and then flash sysupgrade image

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
11 months agoath79: mikrotik: add rssileds support for Routerboard 911G and RB912UAG
Lech Perczak [Sat, 18 Nov 2023 15:54:18 +0000 (16:54 +0100)]
ath79: mikrotik: add rssileds support for Routerboard 911G and RB912UAG

LEDs 1 through 5 are used for RSSI monitoring on factory firmware.
Reflect that by creating appropriate rssileds configuration.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
11 months agoath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD
Lech Perczak [Sat, 18 Nov 2023 15:53:45 +0000 (16:53 +0100)]
ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD

This is a stripped-down version of RB912UAG-(2,5)HPnD, without USB,
miniPCIe and SIM sockets.
This board has been supported in the ar71xx.

Add support based on RB912UAG board, by splitting out the common part to
.dtsi, and creating separate device tree for the stripped-down version.

Links:
* https://mikrotik.com/product/RB911G-2HPnD
* https://mikrotik.com/product/RB911G-5HPnD
* https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb911g-5hpnd

Hardware:
* SoC: Atheros AR9342,
* RAM: DDR 64MB,
* SPI NOR: 64KB,
* NAND: 128MB,
* Ethernet: x1 10/100/1000 port with passive POE in,
* Wi-Fi: 802.11 a/b/g/n (depending on band variant)
* LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
  Ethernet phy LED,
* Button,
* Beeper.

Flashing:
* Use the RouterBOARD Reset button to enable TFTP netboot,
boot kernel and initramfs and then perform sysupgrade.
* From ar71xx OpenWrt firmware run:
  $ sysupgrade -F /tmp/<sysupgrade.bin>
For more info see: https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>