openwrt/staging/nbd.git
2 months agomac80211: ath12k: prevent ltssm crash
Janusz Dziedzic [Mon, 24 Jun 2024 16:48:46 +0000 (18:48 +0200)]
mac80211: ath12k: prevent ltssm crash

Fix ltssm crashes on BPI-Rx boards.
Seems read32/write32 using wrong address which
is not a problem on x86/64 PCI controllers.
But have issues on BPI-Rx boards.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15945
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agolinux-firmware: qualcomm: add WCN7850 firmware
Janusz Dziedzic [Sat, 24 Feb 2024 10:25:15 +0000 (10:25 +0000)]
linux-firmware: qualcomm: add WCN7850 firmware

Add option to add WCN7850 ath12k firmware.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15945
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomac80211: add ath12k PCI support
Janusz Dziedzic [Sat, 24 Feb 2024 11:10:56 +0000 (11:10 +0000)]
mac80211: add ath12k PCI support

Add upstream ath12k 802.11BE driver support.
Allow to build and use it from openwrt.

Tested on BPI-R4/BPI-R64 with:
 - Qualcomm Technologies, Inc WCN785x Wi-Fi 7(802.11be) 320MHz 2x2 [FastConnect 7800] (rev 01)

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15945
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomac80211: ath: add qcom-qmi-helpers as package
Janusz Dziedzic [Sat, 24 Feb 2024 11:08:48 +0000 (11:08 +0000)]
mac80211: ath: add qcom-qmi-helpers as package

Allow to build ath11k and other drivers using
qcom-qmi-helpers together (eg. ath12k).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15945
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoath79: disable ath79 USB phy drivers by default
Shiji Yang [Fri, 13 Sep 2024 11:52:30 +0000 (19:52 +0800)]
ath79: disable ath79 USB phy drivers by default

We already have an kernel module package "kmod-phy-ath79-usb" to
drive the ath79 USB. It will be selected by the usb base package
"kmod-usb2" and "kmod-usb-ohci".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16380
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: usb: improve support for ath79 target
Shiji Yang [Fri, 13 Sep 2024 11:52:30 +0000 (19:52 +0800)]
kernel: usb: improve support for ath79 target

1. Remove outdated symbol CONFIG_USB_OHCI_ATH79.
The ath79 OHCI USB was already supported by the generic driver
kmod-usb-ohci. And this kernel symbol has been dropped since
upstream commit:
53d473fc1e38 ("usb: host: Remove the deprecated ATH79 USB host config options")

2. Add ath79 USB phy package to the OHCI dependencies.
Both EHCI and OHCI require it on the ath79 target.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16380
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agouboot-mediatek: support GL.iNet GL-X3000 and GL-XE3000
Chris Webb [Mon, 10 Jun 2024 08:54:23 +0000 (09:54 +0100)]
uboot-mediatek: support GL.iNet GL-X3000 and GL-XE3000

Add u-boot support based on the kernel dts introduced in d1016446 and
the GL-MT6000 u-boot support in fe10f974.

The pcie-mediatek-gen3 kernel driver doesn't like hotplug, so to work in
PCIe mode, the 5G modem on this device needs to be switched on by u-boot
before starting the kernel. Include an init_modem step in the boot_system
action to set the relevant gpios. (The factory bootloader does the same,
using Mediatek SDK-specific gpio_power_clr and gpio_pull_up.)

Ideally the modem would be started using gpio-hog in the device tree, but
this will need to wait until mediatek gpio-hog support is fixed upstream:

  https://lore.kernel.org/u-boot/6ef2583e85eea60560d7776377d662779e7c44e5.1722419839.git.chris@arachsys.com/

The bootloader can be replaced using the built-in web interface of the
factory bootloader. Hold the reset button for five seconds while powering
on the device and it will boot into a recovery http server.

http://192.168.1.1/uboot.html and http://192.168.1.1/bl2.html can then
be used to upload openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip
and openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin respectively.

Alternatively, from a root shell on the running system, unlock the boot
partition with

  echo 0 >/sys/block/mmcblk0boot0/force_ro

then write openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip to
/dev/mmcblk0p4 and openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin
to /dev/mmcblk0boot0.

Signed-off-by: Chris Webb <chris@arachsys.com>
Link: https://github.com/openwrt/openwrt/pull/15645
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agocomgt: directip: add delegate option support
Chen Minqiang [Wed, 15 May 2024 14:57:06 +0000 (22:57 +0800)]
comgt: directip: add delegate option support

Ipv6 delegate option is not respected by proto directip
this add support for it.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agocomgt: directip: add sourcefilter option support
Chen Minqiang [Wed, 15 May 2024 14:51:55 +0000 (22:51 +0800)]
comgt: directip: add sourcefilter option support

This make source based IPv6 routing option available for directip

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoqmi: add delegate option support
Chen Minqiang [Wed, 15 May 2024 14:48:32 +0000 (22:48 +0800)]
qmi: add delegate option support

Ipv6 delegate option is not respected by proto qmi
this add support for it.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoncm: add delegate option support
Chen Minqiang [Wed, 15 May 2024 14:46:08 +0000 (22:46 +0800)]
ncm: add delegate option support

Ipv6 delegate option is not respected by proto ncm
this add support for it.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agombim: add delegate option support
Chen Minqiang [Wed, 15 May 2024 14:43:03 +0000 (22:43 +0800)]
mbim: add delegate option support

Ipv6 delegate option is not respected by proto mbim
this add support for it.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoppp: add delegate option support
Chen Minqiang [Wed, 15 May 2024 14:05:23 +0000 (22:05 +0800)]
ppp: add delegate option support

Ipv6 delegate option is not respected by proto of ppp/pptp/pppoe/pppoa
this add support for them.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agohostapd: fix `UPDATE_VAL` fail in `uc_hostapd_iface_start`
Jianhui Zhao [Wed, 15 May 2024 02:45:13 +0000 (10:45 +0800)]
hostapd: fix `UPDATE_VAL` fail in `uc_hostapd_iface_start`

If the `intval` obtained from `info` is indeed 0, it cannot be set to `conf`.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15495
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agohostapd-common: add missing ingredients for standalone EAP server
Lev A. Melnikovsky [Thu, 8 Aug 2024 18:22:58 +0000 (21:22 +0300)]
hostapd-common: add missing ingredients for standalone EAP server

Namely radius_server_auth_port and radius_server_clients arguments. Below is a working config example:

config wifi-iface 'enterprise1'
        option device 'radio1'
        option mode 'ap'
        option network 'lan'
        option ssid 'openwrt'
        option encryption 'wpa2'
        option dh_file '/etc/hostapd/dh.pem'
        option eap_server '1'
        option eap_user_file '/etc/hostapd/eap_user'
        option ca_cert '/etc/hostapd/ca.pem'
        option server_cert '/etc/hostapd/server.crt'
        option private_key '/etc/hostapd/server.key'
        option radius_server_clients '/etc/hostapd/radius_clients'
        option radius_server_auth_port 1812

config wifi-iface 'enterprise2'
        option device 'radio2'
        option mode 'ap'
        option network 'lan'
        option ssid 'openwrt'
        option encryption 'wpa2'
        option dh_file '/etc/hostapd/dh.pem'
        option auth_server '127.0.0.1'
        option auth_secret 'radius_secret'
        option auth_cache '0'

Signed-off-by: Lev A. Melnikovsky <melnikovsky@gmail>
Link: https://github.com/openwrt/openwrt/pull/16112
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotools: firmware-utils: update to git HEAD
Sander Vanheule [Sun, 22 Sep 2024 21:06:37 +0000 (23:06 +0200)]
tools: firmware-utils: update to git HEAD

Improve device compatibility:
  - commit ed9c97fa3305 ("tplink-safeloader: bump EAP610-V3 compat_level")

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 months agoramips: Add support for D-Link DIR-2150-R1
Alan Luck [Wed, 10 Jul 2024 11:57:11 +0000 (21:57 +1000)]
ramips: Add support for D-Link DIR-2150-R1

Hardware Specification:
SoC: Mediatek MT7621DAT (MIPS1004Kc 880 MHz, dual core)
RAM: 128 MB
Storage: 128 MB NAND flash
Ethernet: 5x 10/100/1000 Mbps LAN1,LAN2,LAN3,LAN4 & WAN
Wireless: 2.4GHz: Mediatek MT7603EN up to 300Mbps (802.11b/g/n MIMO 2x2)
Wireless: 5GHz: Mediatek MT7615N up to 1733Mbps (802.11n/ac MU-MIMO 4x4)
LEDs: Power (white & amber), Internet (white & amber)
LEDs: 2.4G (White), 5Ghz (White)
Buttons: WPS, Reset
USB: Front V3.0 & Rear V2.0

MAC Table
Label xx:xx:xx:xx:xx:38
LAN xx:xx:xx:xx:xx:39
2.4Ghz xx:xx:xx:xx:xx:3A
5Ghz xx:xx:xx:xx:xx:3C
WAN xx:xx:xx:xx:xx:38

Flash Instructions:
D-Link normal OEM firmware update page
1. upload OpenWRT factory.bin like any D-Link upgrade image

D-Link Fail Safe GUI:
1. Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable.
2. Give it ~30 seconds, to boot the fail safe GUI
3. Connect your client computer to LAN1 of the device
4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0
5. Call the fail safe page for the device at http://192.168.0.1/
6. Use the provided fail safe web GUI to upload the factory.bin to the device

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16269
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomac80211: rt2x00: fix eeprom load issue for PCIe NICs
Shiji Yang [Sat, 17 Aug 2024 04:04:43 +0000 (12:04 +0800)]
mac80211: rt2x00: fix eeprom load issue for PCIe NICs

The support for assigning PCIe eeprom via device tree was
accidentally removed when adding NVMEM eeprom patches.

Fixes: bea4f5020790 ("mac80211: rt2x00: improve EEPROM load patches")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: add back the missing periph clock for Ralink RT3883
Shiji Yang [Tue, 6 Aug 2024 12:52:55 +0000 (20:52 +0800)]
ramips: add back the missing periph clock for Ralink RT3883

periph clock is the parent clock of some other clocks.

Link: https://lore.kernel.org/all/CAMhs-H_NS-n2tx5SZpCMiVZtBFzX_nTa_vnS8We0UevkwFq93Q@mail.gmail.com/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: merge dtsi included file for Belkin F9K1109
Shiji Yang [Tue, 6 Aug 2024 12:50:23 +0000 (20:50 +0800)]
ramips: merge dtsi included file for Belkin F9K1109

Only one device uses the dtsi file "rt3883_belkin_f9k110x.dtsi".
So there is no need to split the device tree.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: disable 2 GHz band for Belkin F9K1109 V1
Shiji Yang [Tue, 6 Aug 2024 12:23:36 +0000 (20:23 +0800)]
ramips: disable 2 GHz band for Belkin F9K1109 V1

2 GHz WiFi doesn't work on the wmac of this device.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotoolchain/nasm: update to 2.16.03
Yanase Yuki [Thu, 12 Sep 2024 12:19:11 +0000 (21:19 +0900)]
toolchain/nasm: update to 2.16.03

Use gzip archive to avoid xz usage.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/16373
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agogeneric: mtd: spinand: winbond: more serial NAND flash types
Mieczyslaw Nalewaj [Tue, 27 Aug 2024 16:47:28 +0000 (18:47 +0200)]
generic: mtd: spinand: winbond: more serial NAND flash types

Add support for W25N01JW, W25N02JWZEIF, W25N512GW, W25N02KWZEIR and W25N01GWZEIG.
Add support for W25N04KV.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16272
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: Add support for Ruijie RG-EW1200G PRO v1.1
Yahor Leonenka [Mon, 19 Aug 2024 16:19:33 +0000 (19:19 +0300)]
ramips: Add support for Ruijie RG-EW1200G PRO v1.1

    SoC: MediaTek MT7621
    Flash: 16MB (Macronix MX25L12805D)
    RAM: 128MB
    Serial: As marked on PCB, baudrate is 57600, DO NOT CONNECT 3.3V!!!
    Ethernet: 4x 10/100/1000 Mbps (3x LAN + WAN)
    WIFI0: MT7615 2.4GHz 802.11b/g/n
    WIFI1: MT7615 5GHz 802.11ac
    Antennas: 6x external (3 per radio), non-detachable
    LEDs: Programmable power-LED (blue-colored)
    Buttons: Reset

INSTALLATION:

    Get rootshell using insructions from https://gist.github.com/ZIKH26/18693c67ee7d2f8d2c60231b19194c37

    Download and flash image
    On computer:
    python -m http.server
    On router:
    cd /tmp
    wget http://:8000/factory.bin
    mtd -r write factory.bin firmware

Device should reboot at this point.

Reverting to stock:
Download archive with firmware from Ruijie's site and
get .bin file from it. Then write that binary to firmware
partition. After reboot, factory-reset the router using
reset button.

Signed-off-by: Yahor Leonenka <staryjakau@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16202
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: add support for ELECOM WSC-X1800GS
INAGAKI Hiroshi [Tue, 10 Sep 2024 14:47:52 +0000 (23:47 +0900)]
ramips: add support for ELECOM WSC-X1800GS

ELECOM WSC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh extender,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 2x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/2x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 10.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:6E (Factory, 0x3fff4 (hex))
2.4 GHz: 04:AB:18:xx:xx:6F (Factory, 0x3fffa (hex))
5 GHz  : 04:AB:18:xx:xx:70 (Factory,     0x4 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: add support for ELECOM WMC-X1800GST
INAGAKI Hiroshi [Tue, 10 Sep 2024 14:47:52 +0000 (23:47 +0900)]
ramips: add support for ELECOM WMC-X1800GST

ELECOM WMC-X1800GST is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh router,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 3x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/5x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 11.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally with "Router" mode
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:BF (Factory, 0x3fff4 (hex))
WAN    : 04:AB:18:xx:xx:C0 (Factory, 0x3fffa (hex))
2.4 GHz: 04:AB:18:xx:xx:C1 (Factory,     0x4 (hex))
5 GHz  : 04:AB:18:xx:xx:C2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoath79: qca955x ag71xx upstream driver fix
Oskari Lemmela [Sun, 4 Aug 2024 07:02:09 +0000 (10:02 +0300)]
ath79: qca955x ag71xx upstream driver fix

Fix mdio probe in qca95xx devices and add mandatory clocks to dtsi

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: modules: add irq support for pca953x
Oskari Lemmela [Thu, 11 Jul 2024 07:47:36 +0000 (10:47 +0300)]
kernel: modules: add irq support for pca953x

Enable interrupt controller support for PCA953x kernel module

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: netdevices: add leds support
Oskari Lemmela [Thu, 11 Jul 2024 08:01:32 +0000 (11:01 +0300)]
kernel: netdevices: add leds support

Compile LED support to swconfig and phy modules

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: netdevices: add dsa support
Oskari Lemmela [Sun, 8 Oct 2023 07:33:50 +0000 (10:33 +0300)]
kernel: netdevices: add dsa support

Add support for building DSA switch drivers as kernel modules.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: netdevices: add phy modules
Oskari Lemmela [Wed, 10 Jul 2024 16:34:47 +0000 (19:34 +0300)]
kernel: netdevices: add phy modules

Add support for building multiple phy drivers as kernel modules

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: netdevices: add ag71xx modules
Oskari Lemmela [Wed, 10 Jul 2024 15:52:38 +0000 (18:52 +0300)]
kernel: netdevices: add ag71xx modules

Add support for building both upstream and downstream ag71xx drivers
as modules.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoath79: rename downstream ag71xx driver
Oskari Lemmela [Wed, 10 Jul 2024 07:55:16 +0000 (10:55 +0300)]
ath79: rename downstream ag71xx driver

Rename the downstream ag71xx driver to ag71xx-legacy.
It allows both upstream and downstream drivers to be compiled into modules.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoath79: rb91x_nand: use dev_err_probe
Rosen Penev [Thu, 15 Aug 2024 02:21:54 +0000 (19:21 -0700)]
ath79: rb91x_nand: use dev_err_probe

Simplifies the error path and avoids having to handle -EPROBE_DEFER
manually.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16416
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agolibusb: update to 1.0.27
Yanase Yuki [Thu, 12 Sep 2024 11:49:27 +0000 (20:49 +0900)]
libusb: update to 1.0.27

- Remove unnecessary SourceForge mirror
- Use HTTPS url

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/16372
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agombedtls: update to 3.6.1
Yanase Yuki [Thu, 12 Sep 2024 12:02:06 +0000 (21:02 +0900)]
mbedtls: update to 3.6.1

- This release fixes CVE-2024-45157, CVE-2024-45158, CVE-2024-45159
- Use official release archive instead of git mirror
- Update website url

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/16371
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotcpdump: update to 4.99.5
Ivan Pavlov [Mon, 16 Sep 2024 04:49:40 +0000 (07:49 +0300)]
tcpdump: update to 4.99.5

Changes: https://git.tcpdump.org/tcpdump/blob/4a789712f187e3ac7b2c0044c3a3f8c71b83646e:/CHANGES

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16402
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agolibpcap: update to 1.10.5
Ivan Pavlov [Mon, 16 Sep 2024 04:48:06 +0000 (07:48 +0300)]
libpcap: update to 1.10.5

Changes: https://git.tcpdump.org/libpcap/blob/bbcbc9174df3298a854daee2b3e666a4b6e5383a:/CHANGES

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16401
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorockchip: rework LED configurations for the NanoPi R6C/R6S
Antonio Flores [Mon, 2 Sep 2024 02:24:35 +0000 (22:24 -0400)]
rockchip: rework LED configurations for the NanoPi R6C/R6S

This commits fixes the LED on the NanoPi R6 series
after changes in the DTS
https://lore.kernel.org/all/20240612205056.397204-4-seb-dev@mail.de
Reported by Github user: gSpotx2f

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16275
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agouboot-rockchip: patches: add version when were applied upstream
Antonio Flores [Fri, 30 Aug 2024 11:41:45 +0000 (07:41 -0400)]
uboot-rockchip: patches: add version when were applied upstream

This patch add a version to uboot patches to help identify in
futures updates when they were upstreamed.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16275
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorockchip: fixes and improve for NanoPi R6 series
Antonio Flores [Tue, 27 Aug 2024 21:16:02 +0000 (17:16 -0400)]
rockchip: fixes and improve for NanoPi R6 series

Improvement and fixes for the nanopi r6 series, pending on the kernel mailing list
https://lore.kernel.org/all/20240612205056.397204-1-seb-dev@mail.de

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16275
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorockchip: add FriendlyElec NanoPi R6C
Antonio Flores [Tue, 27 Aug 2024 20:36:02 +0000 (16:36 -0400)]
rockchip: add FriendlyElec NanoPi R6C

Hardware Spec
 -SoC: Rockchip RK3588S
       CPU: Quad-core ARM Cortex-A76(up to 2.4GHz) and quad-core Cortex-A55 CPU (up to 1.8GHz)
       GPU: Mali-G610 MP4, compatible with OpenGLES 1.1, 2.0, and 3.2, OpenCL up to 2.2 and Vulkan1.2
       VPU: 8K@60fps H.265 and VP9 decoder, 8K@30fps H.264 decoder, 4K@60fps AV1 decoder, 8K@30fps H.264 and H.265
       NPU: 6TOPs, supports INT4/INT8/INT16/FP16
 -RAM: 64-bit 4GB/8GB LPDDR4X at 2133MHz
 -Flash: 32GB/None eMMC, at HS400 mode
 -Ethernet: one Native Gigabit Ethernet, and one PCIe 2.5G Ethernet
 -USB: one USB 3.0 Type-A and one USB 2.0 Type-A
 -PCIe: one M.2 Key M connector with PCIe 2.1 x1
 -HDMI:
       compatible with HDMI2.1, HDMI2.0, and HDMI1.4 operation
       support up to 7680x4320@60Hz
       Support RGB/YUV(up to 10bit) format
 -microSD: support up to SDR104 mode
 -GPIO:
       30-pin 2.54mm header connector
       up to 1x SPI, 3x UARTs, 3x I2Cs, 2x SPDIFs, 1x I2Ss, 3x PWMs, 20x GPIOs
 -Debug: UART via 3-Pin 2.54mm header, or on-board USB-C to UART
 -LEDs: 4 x GPIO Controlled LED (SYS, WAN, LAN, LED1)
 -others:
        2 Pin 1.27/1.25mm RTC battery input connector for low power RTC IC HYM8563TS
        MASK button for eMMC update
        one user button
 -Power supply: USB-C, support PD, 5V/9V/12V/20V input
 -PCB: 8 Layer, 62x90x1.6mm
 -Ambient Operating Temperature: 0℃ to 70℃

Installation:

Uncompress the OpenWrt sysupgrade and write image to the SD card using dd (dd if=*.img of=/*)

eMMC Installation:

Boot from the SD card
Uncompress the OpenWrt sysupgrade image
fash to eMMC : dd if=*.img of=/dev/mmcblk1
sync
remove SD card
reboot

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16275
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agouboot-rockchip: add FriendlyElec NanoPi R6C
Antonio Flores [Tue, 13 Aug 2024 02:15:28 +0000 (22:15 -0400)]
uboot-rockchip: add FriendlyElec NanoPi R6C

1- The NanoPi R6C is a SBC by FriendlyElec based on the Rockchip RK3588s.
   It comes with 4GB or 8GB of RAM, a microSD card slot, optional 32GB eMMC
   storage, one M.2 M-Key connector, one RTL8211F 1GbE and one RTL8125
   2.5GbE Ethernet port, one USB 2.0 Type-A and one USB 3.0 Type-A port, a
   HDMI port, a 30-pin GPIO header as well as multiple buttons and LEDs.
2- Renamed 000-backport-upstream-dts-sync.patch -> 000-v2024.10-rc1-backport-upstream-dts-sync.patch
   to add the version when was applied upstream

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16275
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotools/meson: update to 1.5.1
Yegor Yefremov [Thu, 19 Sep 2024 12:11:45 +0000 (14:11 +0200)]
tools/meson: update to 1.5.1

Changelog: https://mesonbuild.com/Release-notes-for-1-5-0.html

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/16425
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months ago6in4: add 'nohostroute' option
Aleksandr V. Piskunov [Tue, 16 Jul 2024 13:58:11 +0000 (16:58 +0300)]
6in4: add 'nohostroute' option

Same as 'nohostroute' option for GRE tunnels (commit 0f8b9addfc)
and IPIP tunnels (commit 46ce629fe0)

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15961
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months ago6in4: Support fqdn as remote tunnel endpoint
Aleksandr V. Piskunov [Tue, 16 Jul 2024 13:44:35 +0000 (16:44 +0300)]
6in4: Support fqdn as remote tunnel endpoint

Same as fqdn support in GRE (commit a79f3d11b3) and IPIP (commit 311682905e)

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15961
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months ago6in4: allow specifying tunnel device name
Aleksandr V. Piskunov [Tue, 16 Jul 2024 13:39:17 +0000 (16:39 +0300)]
6in4: allow specifying tunnel device name

Accept 'device' option, allowing to specify custom l3 device name,
instead of default autogenerated one (prefix "6in4-" + interface name)

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15961
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agols-mc: bump to 10.39.0
Pawel Dembicki [Mon, 9 Sep 2024 10:35:40 +0000 (12:35 +0200)]
ls-mc: bump to 10.39.0

Update ls-mc to latest 10.39.0 version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16360
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agols-dpl: bump to 10.39.0
Pawel Dembicki [Mon, 9 Sep 2024 10:35:00 +0000 (12:35 +0200)]
ls-dpl: bump to 10.39.0

Update ls-dpl to latest 10.39.0 version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16360
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agols-rcw: Bump to lf-6.6.23-2.0.0
Pawel Dembicki [Mon, 9 Sep 2024 10:34:09 +0000 (12:34 +0200)]
ls-rcw: Bump to lf-6.6.23-2.0.0

Bump ls-rcw package to lf-6.6.23-3.0.0.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16360
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorestool: bump to lf-6.6.23-2.0.0
Pawel Dembicki [Mon, 9 Sep 2024 10:32:56 +0000 (12:32 +0200)]
restool: bump to lf-6.6.23-2.0.0

This commit bumps restool layerscape package to lf-6.6.23-2.0.0 version.

Patch was refreshed.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16360
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agouboot-layerscape: bump to lf-6.6.23-2.0.0
Pawel Dembicki [Mon, 9 Sep 2024 10:15:29 +0000 (12:15 +0200)]
uboot-layerscape: bump to lf-6.6.23-2.0.0

This commit bumps u-boot layerscape package to lf-6.6.23-2.0.0 version.

Manually rebased:
0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16360
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotfa-layerscape: Bump to lf-6.6.23-2.0.0
Pawel Dembicki [Mon, 9 Sep 2024 10:06:42 +0000 (12:06 +0200)]
tfa-layerscape: Bump to lf-6.6.23-2.0.0

This commit bumps tfa-layerscape package to version lf-6.6.23-2.0.0

Manually rebased:
001-fiptool-hostbuild-fixes.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16360
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorockchip: backport upstream updates for nanopc t6
Tianling Shen [Fri, 6 Sep 2024 07:27:25 +0000 (15:27 +0800)]
rockchip: backport upstream updates for nanopc t6

Backport ir-receiver/minipcie/poweroff/spi/usb-c support and other
minor fixes for the NanoPC T6 board.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/16443
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agobuild: remove ac_cv_header_netinet_sctp_h=no from pre-cached variables
Aleksey Vasilenko [Sat, 21 Sep 2024 14:00:39 +0000 (17:00 +0300)]
build: remove ac_cv_header_netinet_sctp_h=no from pre-cached variables

We have <netinet/sctp.h> header in lksctp-tools package,
but having this var set to 'no' prevents package's configure
to detect it.

Signed-off-by: Aleksey Vasilenko <aleksey.vasilenko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16441
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: TP-Link EC220-G5 v2: swap WLAN leds assignment
Mieczyslaw Nalewaj [Thu, 5 Sep 2024 07:37:56 +0000 (09:37 +0200)]
ramips:  TP-Link EC220-G5 v2: swap WLAN leds assignment

Swap incorrect WLAN leds assignment between WLAN 2.4 and 5 GHz for TP-Link EC220-G5 v2

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16331
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomvebu: improve sysupgrade for FortiGate/FortiWiFi devices
INAGAKI Hiroshi [Mon, 16 Sep 2024 20:43:58 +0000 (05:43 +0900)]
mvebu: improve sysupgrade for FortiGate/FortiWiFi devices

Update sysupgrade script (fortinet.sh) for Fortinet devices in
mvebu/cortexa9 and fix the following issues,

- Some individuals of FortiGate/FortiWiFi 30E/5xE devices has wrong
  kernel/rootfs offsets in "firmware-info" partition and they are not
  updated with the current sysupgrade script for Fortinet devices
  (fortinet.sh).
  As a result, the bootloader tries to load kernel data from the wrong
  address and boot with it after OpenWrt installation.
  The new script handles offsets in addition to length values.

and improve the following points.

- Only 2 bytes are handled with the current sysupgrade script
  (fortinet.sh) for kernel/rootfs length. The new script handles 4 bytes
  instead.

- The image names of image0/image1 are not handled and not updated when
  sysupgrade. The new sysupgrade script handles it and update to
  "<dist> <version> <revision>" if firmware metadata is available.
  (ex.: "OpenWrt SNAPSHOT r27440-25384026")

log of new sysupgrade script (fortinet.sh):

Tue Sep 17 10:29:16 UTC 2024 upgrade: Performing system upgrade...
Image Index: 0
Image Name : "OpenWrt SNAPSHOT r27440-25384026"
             --> "OpenWrt SNAPSHOT r27441-b3a0806a05"

  kernel:
    old: 0x003c4e00@0x00200000
    new: 0x003c4e00@0x00200000

  rootfs:
    old: 0x005c0200@0x00800000
    new: 0x005c0200@0x00800000

Unlocking kernel ...

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomvebu: update triggers of "SPEED" LEDs on FortiGate/FortiWiFi devices
INAGAKI Hiroshi [Sat, 14 Sep 2024 06:38:46 +0000 (15:38 +0900)]
mvebu: update triggers of "SPEED" LEDs on FortiGate/FortiWiFi devices

The mdio bus number of mv88e6xxx was changed to '0' from '1' and the
"mv88e6xxx-1:<addr>:<speed>" triggers are unavailable now.
Update triggers for "SPEED" LEDs to make working that LEDs again.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomvebu: fix "compatible" of regulator for FortiGate/FortiWiFi devices
INAGAKI Hiroshi [Sat, 14 Sep 2024 06:37:02 +0000 (15:37 +0900)]
mvebu: fix "compatible" of regulator for FortiGate/FortiWiFi devices

The driver for fixed voltage regulater uses "regulator-fixed" for
compatible string, not "fixed-regulator".

Fixes: 102dc5a625 ("mvebu: add support for FortiGate 50E")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: dna_valokuitu-plus-ex400: build sysupgrade.bin
Hauke Mehrtens [Sun, 22 Sep 2024 12:07:26 +0000 (14:07 +0200)]
ramips: dna_valokuitu-plus-ex400: build sysupgrade.bin

Rename the sysupgrade.tar step to sysupgrade.bin. The sysupgrade.tar is
used in other places and we prefer a sysupgrade.bin instead.

Fixes: fea2264d9fdd ("ramips: mt7621: Add DNA Valokuitu Plus EX400")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: tp-link er605-v2: Remove sysupgrade-tar image
Hauke Mehrtens [Sun, 22 Sep 2024 12:03:22 +0000 (14:03 +0200)]
ramips: tp-link er605-v2: Remove sysupgrade-tar image

The sysupgrade-tar image build is not defined for this target, do not
add a build instruction for it. The build system will use the definition
from the dna_valokuitu-plus-ex400 board and the build will fail.

This fixes the build of the ramips target.

Fixes: 665c2154ef12 ("ramips: add basic support for tp-link er605-v2")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoinclude: remove kernel 6.1 version file
Mieczyslaw Nalewaj [Sun, 22 Sep 2024 06:29:56 +0000 (08:29 +0200)]
include: remove kernel 6.1 version file

Remove unused kernel 6.1 version file.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16450
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agohostapd: fix OWE ssid update on configuration changes
Felix Fietkau [Wed, 18 Sep 2024 16:26:45 +0000 (18:26 +0200)]
hostapd: fix OWE ssid update on configuration changes

Refresh OWE transition IEs on updating BSS interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agowpa_supplicant: fix num_global_macaddr handling
Felix Fietkau [Sat, 21 Sep 2024 18:30:01 +0000 (20:30 +0200)]
wpa_supplicant: fix num_global_macaddr handling

Pass num_global_macaddr via ubus in the top level config_set call

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agohostapd: fix num_global_macaddr and mbssid config handling
Felix Fietkau [Sat, 21 Sep 2024 18:13:51 +0000 (20:13 +0200)]
hostapd: fix num_global_macaddr and mbssid config handling

Store the config values in the correct field and apply them on restart too

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agohostapd: fold extra APuP patches into main patch + src/
Felix Fietkau [Wed, 18 Sep 2024 16:10:25 +0000 (18:10 +0200)]
hostapd: fold extra APuP patches into main patch + src/

Simplifies maintenance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agohostapd: improve ucode bss notifications
Felix Fietkau [Wed, 17 Jul 2024 16:33:43 +0000 (18:33 +0200)]
hostapd: improve ucode bss notifications

Reduce code duplication, add extra callback for bss create

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agonetifd: update to Git HEAD (2024-09-21)
Felix Fietkau [Sat, 21 Sep 2024 16:28:40 +0000 (18:28 +0200)]
netifd: update to Git HEAD (2024-09-21)

24f9a93a9559 interface: fix regression on adding hotplug devices to interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agoath79: fix I2C pins on GL-AR750
Ryan Salsbury [Tue, 17 Sep 2024 00:49:21 +0000 (17:49 -0700)]
ath79: fix I2C pins on GL-AR750

Change I2C pin flags to GPIO_ACTIVE_HIGH and change SDA to GPIO1.

On my late production GL-AR750 (purchased 2024):
SCL = GPIO16
SDA = GPIO1

Bug report:
I2C bus doesn't work in GL-AR750
https://github.com/openwrt/openwrt/issues/16319

Signed-off-by: Ryan Salsbury <ryanrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16406
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoconfig: build: make STRIP_KERNEL_EXPORTS depend on BROKEN
Robert Marko [Sat, 21 Sep 2024 11:31:28 +0000 (13:31 +0200)]
config: build: make STRIP_KERNEL_EXPORTS depend on BROKEN

STRIP_KERNEL_EXPORTS is currently broken on kernel 6.6 and since this
is the only kernel currently supported, we should rather make it depend
on BROKEN instead of a kernel version until its fixed.

Link: https://github.com/openwrt/openwrt/pull/16440
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomac80211: CVE-2024-46760: rtw88: schedule rx work after everything is set up
Antonio Flores [Wed, 18 Sep 2024 15:06:12 +0000 (11:06 -0400)]
mac80211: CVE-2024-46760: rtw88: schedule rx work after everything is set up

link: https://lore.kernel.org/all/2024091842-CVE-2024-46760-1eb3@gregkh
Description
===========

In the Linux kernel, the following vulnerability has been resolved:

wifi: rtw88: usb: schedule rx work after everything is set up

Right now it's possible to hit NULL pointer dereference in
rtw_rx_fill_rx_status on hw object and/or its fields because
initialization routine can start getting USB replies before
rtw_dev is fully setup.

The stack trace looks like this:

rtw_rx_fill_rx_status
rtw8821c_query_rx_desc
rtw_usb_rx_handler
...
queue_work
rtw_usb_read_port_complete
...
usb_submit_urb
rtw_usb_rx_resubmit
rtw_usb_init_rx
rtw_usb_probe

So while we do the async stuff rtw_usb_probe continues and calls
rtw_register_hw, which does all kinds of initialization (e.g.
via ieee80211_register_hw) that rtw_rx_fill_rx_status relies on.

Fix this by moving the first usb_submit_urb after everything
is set up.

For me, this bug manifested as:
[    8.893177] rtw_8821cu 1-1:1.2: band wrong, packet dropped
[    8.910904] rtw_8821cu 1-1:1.2: hw->conf.chandef.chan NULL in rtw_rx_fill_rx_status
because I'm using Larry's backport of rtw88 driver with the NULL
checks in rtw_rx_fill_rx_status.

The Linux kernel CVE team has assigned CVE-2024-46760 to this issue.

Affected and fixed versions
===========================

Fixed in 6.6.51 with commit c83d464b82a8
Fixed in 6.10.10 with commit 25eaef533bf3
Fixed in 6.11 with commit adc539784c98

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-46760
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/wireless/realtek/rtw88/usb.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/c83d464b82a8ad62ec9077637f75d73fe955635a
https://git.kernel.org/stable/c/25eaef533bf3ccc6fee5067aac16f41f280e343e
https://git.kernel.org/stable/c/adc539784c98a7cc602cbf557debfc2e7b9be8b3

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agopackages: remove remnants of kernels below 6.6
Mieczyslaw Nalewaj [Sat, 21 Sep 2024 07:19:11 +0000 (09:19 +0200)]
packages: remove remnants of kernels below 6.6

Remove remnants of kernels below 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16432
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoath79: Refresh kernel patches
Hauke Mehrtens [Sat, 21 Sep 2024 09:24:40 +0000 (11:24 +0200)]
ath79: Refresh kernel patches

Make the patches apply cleanly again.

Fixes: 3660ddb8ab6e ("generic: ar8216: remove support for Linux before version 6.1")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: add Adtran SmartRG SDG-8733A
Daniel Golle [Tue, 20 Aug 2024 22:14:30 +0000 (23:14 +0100)]
mediatek: add Adtran SmartRG SDG-8733A

Specification is similar to other devices of the MT Stuart series:
 * Mediatek MT7988D (3x Cortex-A73, up to 1.8 GHz clock speed)
 * 8 GiB eMMC
 * 2 GiB DDR4 RAM
 * 2500M/1000M/100M LAN port
 * 10000M/5000M/2500M/1000M/100M/10M WAN port
 * MT7992 Tri-band (2.4G, 5G, 6G) 2T2R+3T3R+3T3R 802.11be Wi-Fi
 * Renesas DA14531MOD Bluetooth
 * 2 buttons (Reset, Mesh/WPS)
 * uC-controlled RGB LED via I2C
 * 2x LED for the 2.5G port, 3x LED for the 10G port
 * 3.3V-level 115200 baud UART console via 4-pin Dupont connector
   exposed at the bottom of the device
 * USB-C PD power input

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agogeneric: phy: aquantia: add pending patch to force MDI pair order
Daniel Golle [Wed, 21 Aug 2024 22:46:10 +0000 (23:46 +0100)]
generic: phy: aquantia: add pending patch to force MDI pair order

Import pending patch to force MDI pair order.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agobpf-headers: update to version 6.6
Felix Fietkau [Fri, 20 Sep 2024 21:17:28 +0000 (23:17 +0200)]
bpf-headers: update to version 6.6

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agoqosify: update to Git HEAD (2024-09-20)
Felix Fietkau [Fri, 20 Sep 2024 21:15:24 +0000 (23:15 +0200)]
qosify: update to Git HEAD (2024-09-20)

850cc271083d qosify: add support for keeping stats
1501e0935175 bpf_skb_utils.h: add missing include to fix build against newer kernel headers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agogeneric: remove support for older kernels from swconfig
Daniel Golle [Fri, 20 Sep 2024 18:26:52 +0000 (19:26 +0100)]
generic: remove support for older kernels from swconfig

The legacy swconfig switch driver framework supports kernels older than
Linux 6.6 by using #ifdef'ery with LINUX_VERSION_CODE. Remove all that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agogeneric: ar8216: remove support for Linux before version 6.1
Daniel Golle [Fri, 20 Sep 2024 18:24:17 +0000 (19:24 +0100)]
generic: ar8216: remove support for Linux before version 6.1

Drop support for older kernel versions from legacy AR8216 switch driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agogeneric: drop 6.1 support
Daniel Golle [Fri, 20 Sep 2024 17:55:32 +0000 (18:55 +0100)]
generic: drop 6.1 support

Drop config and files for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agokirkwood: remove left-over files-6.1 folder
Daniel Golle [Fri, 20 Sep 2024 17:53:46 +0000 (18:53 +0100)]
kirkwood: remove left-over files-6.1 folder

Remove folder with DTS files for Linux 6.1 which has already been
dropped.

Fixes: f142ce87d9 ("kirkwood: remove 6.1 support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoarmsr: remove left-over patches for kernel 6.1
Daniel Golle [Fri, 20 Sep 2024 17:48:01 +0000 (18:48 +0100)]
armsr: remove left-over patches for kernel 6.1

Support for Linux 6.1 has already been removed from the armsr target.
Remove left-over patches-6.1 folder as well.

Fixes: fd47fdf527 ("armsr: Remove kernel 6.1 configuration")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agolayerscape: remove left-over config-6.1 files
Daniel Golle [Fri, 20 Sep 2024 17:46:18 +0000 (18:46 +0100)]
layerscape: remove left-over config-6.1 files

Remove left-over config-6.1 files which should have been removed
when removing kernel 6.1 support.

Fixes: f20987c161 ("layerscape: remove kernel 6.1 support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agopistachio: drop files for Linux 6.1
Daniel Golle [Fri, 20 Sep 2024 17:45:07 +0000 (18:45 +0100)]
pistachio: drop files for Linux 6.1

Drop obsolete config and patches for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoipq40xx: add PoE passthrough GPIO
David Bauer [Sat, 14 Sep 2024 17:10:10 +0000 (19:10 +0200)]
ipq40xx: add PoE passthrough GPIO

Add the GPIO pin of the PoE passthrough switch on the Aruba AP-303H.
Power is activated when the pin is low. It enables a PSE chip, so power
is only supplied to downstream devices when they are 802.3af/at
compliant devices.

Ensure you use a sufficient power supply when chaining a consuming
device after the AP.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 months agoqoriq: drop 6.1 support
Mieczyslaw Nalewaj [Sun, 8 Sep 2024 08:11:15 +0000 (10:11 +0200)]
qoriq: drop 6.1 support

Drop config for Linux 6.1.

Link: https://github.com/openwrt/openwrt/pull/16120
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agoqoriq: use kernel 6.6 by default
Mieczyslaw Nalewaj [Fri, 9 Aug 2024 15:47:02 +0000 (17:47 +0200)]
qoriq: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Link: https://github.com/openwrt/openwrt/pull/16120
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agoat91: drop 6.1 support
Mieczyslaw Nalewaj [Fri, 9 Aug 2024 16:00:21 +0000 (18:00 +0200)]
at91: drop 6.1 support

Drop config and files for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agoat91: use kernel 6.6 by default
Mieczyslaw Nalewaj [Fri, 9 Aug 2024 15:57:23 +0000 (17:57 +0200)]
at91: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agotools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems
Felix Fietkau [Fri, 20 Sep 2024 14:55:45 +0000 (16:55 +0200)]
tools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems

Avoids picking up an incompatible libuuid from util-linux

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agogeneric: 6.6: mtk_eth_soc: increase QDMA RESV_BUF size
Daniel Golle [Thu, 19 Sep 2024 13:33:15 +0000 (14:33 +0100)]
generic: 6.6: mtk_eth_soc: increase QDMA RESV_BUF size

Increase QDMA RESV_BUF from 2K to 3K for netsys v2 to match Mediatek SDK.
This helps reduce the possibility of Ethernet transmit timeouts.

Link: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/19d8456c3051e5f6dabf42fa770916a2126ea4bf
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agogeneric: 6.6: mtk_eth_soc: reset all TX queues on DMA free
Daniel Golle [Wed, 18 Sep 2024 01:12:24 +0000 (02:12 +0100)]
generic: 6.6: mtk_eth_soc: reset all TX queues on DMA free

The purpose of resetting the TX queue is to reset the
byte and packet count as well as to clear the software
flow control XOFF bit.

MediaTek developers pointed out that netdev_reset_queue would only
resets queue 0 of the network device.
Queues that are not reset may cause unexpected issues.

Packets may stop being sent after reset and "transmit timeout" log may
be displayed.

Import fix from MediaTek's SDK to resolve this issue.

Link: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/5746a94456f466446cc0dcdfbd9078df6df31b63
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoucode: another fix for host installation
Felix Fietkau [Fri, 20 Sep 2024 09:23:24 +0000 (11:23 +0200)]
ucode: another fix for host installation

The previous host installation fix accidentally moved the rpath settings
out of CMAKE_HOST_OPTIONS and into CMAKE_OPTIONS.

Fixes: ae42ecaad4e7 ("ucode: fix host installation")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agopackages: remove kernel 5.15 remnants
Mieczyslaw Nalewaj [Wed, 18 Sep 2024 08:48:03 +0000 (10:48 +0200)]
packages: remove kernel 5.15 remnants

Remove kernel 5.15 remnants.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16417
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: drop 5.15 support
Mieczyslaw Nalewaj [Tue, 17 Sep 2024 20:02:06 +0000 (22:02 +0200)]
generic: drop 5.15 support

Drop config and files for Linux 5.15.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16417
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: drop 5.15 support
Mieczyslaw Nalewaj [Tue, 17 Sep 2024 19:59:28 +0000 (21:59 +0200)]
realtek: drop 5.15 support

Drop config and files for Linux 5.15.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16417
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoramips: add support for netis N6
Mikhail Zhilkin [Sat, 31 Aug 2024 14:21:06 +0000 (14:21 +0000)]
ramips: add support for netis N6

This commit adds support for netis N6 WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (ESMT PSU1GA30DT)
- WLAN      : MT7905DAN + MT7975DN
  - 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x5 (1x WAN, 4x LAN)
- USB       : 1x 3.0
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
              1x WPS
- LEDs      : 1x Power (green)
              1x System (green)
              1x WAN (green)
              1x WiFi 2.4 GHz (green), controlled by phy
              1x WiFi 5 GHz (green), controlled by phy
              1x WPS (green)
              1x USB (green)
              5x ethernet leds (green), controlled by switch
- Power     : 12 VDC, 1.5 A

Installation
------------
1. Update the router using stock firmware web interface and OpenWrt
   factory.bin image.

Recovery and return to stock
----------------------------
1. Assign your PC a static IP 192.168.1.2 and connect to the router using
   the ethernet cable;
2. Power off the router;
3. Press Reset button, power on the router and wait until ethernet led
   start blinking;
4. Release the button;
5. Open http://192.168.1.1/ (N6 System Recovery Mode) in your browser;
6. Upload OpenWrt factory.bin (or stock firmware *.bin) image and proceed
   with upgrade.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | dc:xx:xx:49:xx:04 |
| WAN     | dc:xx:xx:49:xx:05 |
| WLAN 2g | dc:xx:xx:19:xx:06 |
| WLAN 5g | dc:xx:xx:79:xx:06 |
+---------+-------------------+
The WLAN MAC prototype was found in 'Factory', 0x4
The LAN MAC was found in 'Factory', 0x7ef20
The WAN MAC was found in 'Factory', 0x7ef26

Known issue
-----------
2.4 GHz WLAN doesn't start with mt76 driver.

Probable reason:
   Original Netis N6 EEPROM contains wrong MT_EE_WIFI_CONF value (0xd2).
   Other routers with the same WLAN hardware (e.g., Routerich AX1800)
   have MT_EE_WIFI_CONF = 0x92.

Workaround (already included in this commit):
   Extract EEPROM to a file at the first time boot and change
   MT_EE_WIFI_CONF (offset 0x190) value from 0xd2 to 0x92. See
   /etc/hotplug.d/firmware/11-mt76-caldata for details.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: fix wrong dts files permissions
Mikhail Zhilkin [Sat, 31 Aug 2024 14:05:39 +0000 (14:05 +0000)]
ramips: fix wrong dts files permissions

This files are executable:
   target/linux/ramips/dts/mt7621_openfi_5pro.dts
   target/linux/ramips/dts/mt7621_winstars_ws-wn536p3.dts
Has to be fixed.

Fixes: 5560791 ("ramips: add support for OpenFi 5Pro Travel Router")
Fixes: 2da2705 ("ramips: add support for WINSTARS WS-WN536P3")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotools/expat: update to 2.6.3
Yanase Yuki [Fri, 13 Sep 2024 10:22:28 +0000 (19:22 +0900)]
tools/expat: update to 2.6.3

This release fixes CVE-2024-45490, CVE-2024-45491 and
CVE-2024-45492.

Changelog:
https://github.com/libexpat/libexpat/blob/R_2_6_3/expat/Changes

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/16379
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: bump 6.6 to 6.6.52
John Audia [Wed, 18 Sep 2024 19:29:06 +0000 (15:29 -0400)]
kernel: bump 6.6 to 6.6.52

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

Removed upstreamed:
backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch[1]
backport-6.6/819-v6.8-0011-nvmem-u-boot-env-use-nvmem_add_one_cell-nvmemsubsys.patch[2]
backport-6.6/819-v6.8-0012-nvmem-u-boot-env-use-nvmem-device-helpers.patch[3]
backport-6.6/819-v6.8-0013-nvmem-u-boot-env-improve-coding-style.patch[4]
backport-6.6/822-v6.11-0011-nvmem-u-boot-env-error-if-NVMEM-device-is-too-small.patch[5]

Manually rebased:
starfive/patches-6.6/0048-riscv-dts-starfive-Add-full-support-except-VIN-and-V.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=820b1b981aeb8b8e60db2835ddd430c9d1bc6072
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=ae91c9c7b67d4d47206fe8cbb2ab89687d283dcc
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=2eea394c31cbc3d853a26ef2ddb8f5bd24d4d002
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=368fa77b7945bdbdf0e3bb26b5abcae4fba25a20
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=2278629c3ebb1a912fe0a1f19f088312600742a4

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16422
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>